{pgfplots} is a package for creating 2D and 3D plots of mathematical functions and numerical data, using the PGF graphics framework. For questions about the inbuilt plotting functionality of TikZ/PGF, use {tikz-pgf} instead.

learn more… | top users | synonyms

3
votes
2answers
290 views

Custom axis line location for PGFplots table with tikzpicture

I am trying to change the axis y line location from 0 to 100 from these questions (1, 2). Say that the error bars represent confidence intervals on percentage scale, so 100% is no difference. Here is ...
3
votes
1answer
655 views

pgfplots: How to change color of boxplot?

How is it possible to change the color of a boxplot from pgfplots? Black would be wounderful! Here is an MWE: \documentclass{scrartcl} \usepackage{pgfplots} \usepgfplotslibrary{statistics} ...
3
votes
1answer
811 views

Alignment of several pgfplots of different widths inside subfigures

I try to fit six pgfplots created with matlab2tikz onto a page by placing them inside subfigures. So my document looks something like this: \documentclass[a4paper,11pt, BCOR=12mm, ...
3
votes
1answer
96 views

place 'axis' at specific coordinates

Is there any way to put axis environment at specific coordinates? For example if I want the function plot to be a secondary part of a big tikzpicture. This is a MWE: \documentclass{standalone} ...
3
votes
1answer
474 views

Cyrillic text in symbolic x coords

I make bar plot with pgfplots: \documentclass{report} \usepackage[T2A]{fontenc} % Поддержка русских букв \usepackage[utf8]{inputenc} % Кодировка utf8 \usepackage[english, russian]{babel} % Языки: ...
3
votes
1answer
314 views

plot pgfplots graph similar to facet_wrap from ggplot2

I need to plot a 2x2 grid of graphs as shown below: Note: The above graph was generated using the ggplot2 library from the statistical programming language R. Graph taken from link. Here are the ...
3
votes
1answer
343 views

How to define optional arguments for custom pgfplots style

I see from other question that it is possible to create styles with parameters. Like \pgfplotsset{ custom style/.style 2 args{ % code that uses #1 and #2 } } However, I can't find a way of ...
3
votes
1answer
417 views

tick mark separation

My graphs have two ticks on the x-axis. I'd like to have 3 graphs across a page and include y-axis labels. Right now that wont fit. Is it possible to move the x-tick marks closer together so the ...
3
votes
1answer
78 views

How to put legend graphic representation to the right of the label

All the pgfplots examples I could find have the graphic (e.g. symbol) to the left of the label (see example below) in the legend. I think this default is very good but due to space constrains I have ...
3
votes
1answer
83 views

Access label, title in pgpfplots

I would like to know if is possible to access the standard nodes in pgfplots such as ylabel, xlabel, title. I am pretty sure this is quite easy, since each node should have a name by which it can be ...
3
votes
1answer
93 views

Too much transparancy in pgfplots

I try to embed pngs including transparancy into pgfplots. The problem is, that the transparancy is only around the main object of the png. However, as demonstrated by the MWE, it seems also to affect ...
3
votes
2answers
207 views

alignment of pgfplot's figures

I'm trying to put to put 2 graphs aligned, here is my MWE: \documentclass[11pt, letterpaper]{article} \usepackage{pgfplots} \usepackage{tikz} \usepackage{caption} \usepackage{subcaption} ...
3
votes
1answer
679 views

How to increase numbers precision in TikZ histogram

I entered fixed point numbers in the following code: \begin{tikzpicture} \centering \begin{axis}[xbar,bar width=0.2cm,legend style={at={(0.5,-0.15)}, xmin=0,xmax=0.8,anchor=north,legend ...
3
votes
1answer
1k views

pgfplots - Number above one of the bars in the bar chart

I want to put a number above only one of the bars in the bar chart. For example, above the bar A, I want to put a number say 200. Other bars will not have any number at the top. This is my code. ...
3
votes
1answer
364 views

What does error bars/.cd do?

In pgfplots, if you want error bars, you have to write error bars/.cd into each addplot that should have error bars. What does it mean and what does it do and why do I need it?
3
votes
1answer
216 views

Shift y labels, stop y labels being dropped

I have a const plot with intervals on the y-axis. I'd like my y labels to be centered in each bar, as it would be if this were an xbar interval graph. Also, and more importantly, I'd like more ...
3
votes
2answers
515 views

How to reference an axis label, e.g. xlabel

I'm new to that forum but it already helped a lot, thanks for this! But now I really got stuck. Basically I'm looking for a possiblity to reference the xlabel of an axis in a TikZ picture. The ...
3
votes
1answer
151 views

One pgfplot per page in single PDF file

I'd like to reduce my redundancy when making plots with pgfplots. I want to have a single PDF file, such that I can include them on a per-page basis with graphicx. The multi class option for the ...
3
votes
1answer
170 views

How can I fix the formatting of my axis using pgfplots so the axis titles aren't on top of the numbers?

How can I offset my ylabel so it doesn't smudge with the numbers? code \begin{figure}[H] \centering \begin{tikzpicture} \begin{axis}[ scale=1.8, xmin=-15,xmax=15,xlabel={Current $mA$}, ...
3
votes
1answer
5k views

Dashed Line with marker when adding plot from table

In the pgfplot, I would like to have a line plot from a table which is read from a .csv file. I would like to have a line which is dashed and has a marker. I put the code like this - \addplot ...
3
votes
1answer
448 views

pgfplots: drawing areas from a table starting “above” an axis

Please let me explain the motivation behind this a bit more broadly. I'd like to draw measured benchmark values as follows: background/nothing between the x-axis and the minimum value a green area ...
3
votes
1answer
955 views

How to draw a dashed line with *-mark + error marks + a line in foreground in the same plot with pgfplots?

I create a plot with pgfplots with the following code: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.6} \begin{filecontents}{ExampleData.txt} xValue1 ...
3
votes
1answer
220 views

Why do I get an incorrect graph when I plot a function with multiplication expressed by parentheses?

When plotting certain expressions with pgfplots it seems to give the wrong result. Consider the following \documentclass{article} \usepackage{pgfplots} \pgfplotsset{ compat=1.7, no marks } ...
3
votes
1answer
928 views

pgfplots: scatter plot with interpolation

Today I have a question about scatter plots: Is it possible to interpolate scatter plots? In my work I often use "intensity plots" (that's how we call them). In these plots x and y are positions, ...
3
votes
1answer
2k views

Problem with subfig and pgfplots' graphs

I have a problem with the subfigenvironment. My two graphs created with pgfplots are too large to stay together. How can I fix that? % Graphique \begin{figure} \centering \subfloat[]{$\tau = ...
3
votes
1answer
1k views

Properly squish a pgfplot bar chart

I am trying to make a bar chart with the following lengthy data: Character X-Position Probability space 1 0.18211 e 2 0.10083 t 3 0.07298 h 4 0.06721 a 5 0.05862 o 6 ...
3
votes
1answer
656 views

PgfPlots duplicate x-axis labels

I have some repeated numbers on my X-Axis. Here is my code- \begin{tikzpicture} \pgfplotstableread{Figures/measurements.dat} \datatable \begin{axis}[symbolic x ...
3
votes
1answer
2k views

TikZ: bars width and size of plot

This is a followup on my previous question. I have tried to plot my data and I see the following now. Would it be possible to define the size of the area that is used for the plot? I have tried to ...
3
votes
1answer
444 views

PGFPlots staggered axis

Why in this plot the axis are all staggered ? \documentclass[12pt,% % corpo del font principale a4paper,% % carta A4 % ...
3
votes
1answer
921 views

How to get the domain for the line of best fit w/pgfplots to be all real numbers?

Although I already worked around this problem by finding the x-intercept with the linear regression equation I calculated w/gnuplot, I'm still curious to know how pgfplots can do it without me ...
3
votes
1answer
739 views

How to make pgfplots to center a text in a xticklabel

In pgfplots I've used the text width option in the definition of xticklabel style and I wonder how to center the labels text?
3
votes
1answer
626 views

How can I create an angled grid in a 2D PGFPlots plot?

Is it possible to make PGFPlots display 45° height lines in an axis? Basically, what I am looking for is a grid defined by y=-x + k*1000, k being a natural number. My numbers are rather large, e.g. y ...
3
votes
1answer
81 views

How to control where curves are in tikz

I am attempting to draw the following graph in tikz. My attempt so far has gotten me to here. \documentclass[border=3mm]{standalone} \usepackage[dvipsnames]{xcolor} \usepackage{pgfplots} ...
3
votes
1answer
36 views

pgfplots: loglogaxis dual axis tick transform

I have an image I'm trying to recreate in pgfplots. We have a loglogaxis plot, onto which we would like to add an extra set of axis to show what these values correspond to under a simple ...
3
votes
1answer
87 views

Bar diagram strange behaviour

My code is: \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[title = some title, xbar, y axis line style = { opacity = 0 }, ...
3
votes
1answer
35 views

Insert border to area under plot

This post is building from the post found here. How do I go about adding a border to the shaded area under the curve to look like this: \documentclass{book} \usepackage{tikz} \usepackage{pgfplots} ...
3
votes
1answer
57 views

More visible legend entries for only filled pgfplots bar chart

How can I get more visible legend images next to the textual legend entries A, B, C? The default for only filled bar charts seems to consist only of a hair thin vertical line, which makes it quite ...
3
votes
1answer
45 views

Define a systematic method to include pgf plots into jpg photos

I am including images into my LaTeX document and, overlapped to each image, I am adding a PGFplot, showing (a graph with) the environmental conditions when the photo was taken. I have the time-series ...
3
votes
1answer
266 views

PDF file not printed

I am using MikTeX to compile the following code. Why isn't the pdf file printed? If I remove \usepackage{pgfplots} \pgfplotsset{compat=1.11} from the preamble of the code, a pdf file is printed. ...
3
votes
1answer
51 views

Incorrect pgfplot dateplot - shifted by a day

Using dateplot the data is horizontally shifted by a day I and cannot see the reason why. This is my MWE: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} ...
3
votes
1answer
86 views

Horizontal space between xticks in pgfplots

I want to create a bar graph for my master thesis. I have huge numbers on the x-axis. The problem is, that the space between the xticks corresponds to the numbers, what is of course correct. But it ...
3
votes
1answer
95 views

Node position with \addplot

I don't understand why the blue "Below" label does not appear right below the "Above" label (near the expected position showed by the red "Below" label). Any idea? \documentclass{standalone} ...
3
votes
1answer
63 views

pgfplots with big data: dimension too large

I am trying to plot a big file of data http://www.warcomeb.it/private/load.csv.zip with this code: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{/pgf/number format/use ...
3
votes
1answer
95 views

How to hide empty (value 0) ybars with pgfplots?

I'm making a ybar graph (vertical bars) where the y axis maximum reaches 150+, but a lot of values are 0's. I would like the final graph would not show a minimum bar in this 0 values, since we this ...
3
votes
1answer
66 views

ytick lists in loglogaxis and semilogyaxis

How can I specify ticks and ticklabels lists in loglogaxis or semilogyaxis without explicitly write all the list, but using ,..., form? For example, I would like to change the following code ...
3
votes
1answer
50 views

Multiple Histograms Help

I've been trying to get these bars next to each other rather than one in front of the other but I haven't been able to figure it out. Here's a snippet of the code \begin{tikzpicture} \begin{axis}[ ...
3
votes
1answer
79 views

Animate a pgfplots 3d-plot

This question is related to This. but not the same I guess as here I want to animate the view. This issue came up in my previous question here, I want to show the maximum and minimum of the function ...
3
votes
1answer
237 views

pgfplot - remove “top-border-line” and spacing between x-axis and bars

I am currently trying to create a bar chart using pgfplots. My objective is to create a bar chart in which the bars are directly "sitting on top" of the x-axis AND there should be no ...
3
votes
2answers
116 views

`Missing = inserted for \ifnum` when using addplot

I'm trying to plot a normalized sinc function with PGFPlots/TikZ. As this is somewhat tricky because of the limiting value at 0, I used a suggestion provided by percusse. Here's a minimal example ...
3
votes
1answer
76 views

Edge thickness of the faces in a surface plot

Is it possible to change the drawing thickness of the edges of the faces in a surface plot in PGFplots? For example, in the minimum working example \documentclass[margin=1cm]{standalone} ...