{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
1answer
41 views

Placing node relative to legend

Sorry for the lengthy example but when I tried shorting it I just messed things up. Don't mind the overlapping bars. If used in the main document the lines are properly sized. I have been trying ...
7
votes
1answer
115 views

Adding horizontal lines to pgfplots bar

I am using a pgfplots stacked bar to display the aggregated energy demand of a houshold and the associated price. When the energy demand exceeds a certain threshold, than a higher price has to be ...
3
votes
1answer
100 views

Problem when using pgfplots and pgfornament

I am trying to solve a peculiar problem, but until now no success. Here is the issue: I am writing a long document (a thesis) which consists of plots, decorations, and tables. When I plot the graph ...
1
vote
1answer
39 views

AUCTeX/ RefTeX: ignore files by extension

I'm writing a very long document with dozens of figures that are all generated with matplotlib and exported as pgf files. Each figure environment then looks something like \begin{figure} ...
4
votes
1answer
49 views

pgfplots externalize with hyperref

I'm using pgfplots with externalize because my document has a lot of plots which causes problems with memory limitation in LaTeX. In one of my plots I have a reference to an equation. In the file ...
2
votes
1answer
60 views

What is the overflow limit for a named path in tikz / pgfplots?

I asked this question FillBetween library sometimes works and sometimes does not which led to this answer and discussion http://tex.stackexchange.com/a/180926/6908. There seems to be a limit of data ...
0
votes
0answers
40 views

Loading table with zero values in pgfplots

I'm trying to create a stacked bar plot where the data is loaded using the pgfplotstableread command. I want to use a logarithmic scale rather than a normal scale. However, when I change theaxis ...
3
votes
2answers
87 views

FillBetween library sometimes works and sometimes does not

I have the following MWE using the relatively new FillBetween library from pgfplots. \documentclass{article} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween, decorations.softclip} ...
2
votes
1answer
63 views

How do I get open points into my graphs in pgfplots?

I wanted to have a discontinuity at $x=0$ where I spliced together the two graphs. But things aren't visually working out the way I wanted them to. \documentclass[border=6pt]{standalone} ...
2
votes
1answer
104 views

Pgfplots 1.10 boxplot style options

I have been trying to add boxplots to my barcharts and I've finally got some where. After many hours of tearing through these forums and their examples and exhausting the PGFPLOTS 1.10 Manual I got ...
11
votes
1answer
154 views

Building a 2D histogram with PGFPlots

What I want to achieve The framework ROOT can create 2D histogram plots with colored boxes indicating count rate that looks something like: My question is really only: can I produce this kind of ...
2
votes
2answers
55 views

pgfplots- Adding a mark at the origin

I'm trying to show the beginning of a sketch of the graph y=xe^x, and this is what I have: \documentclass[10pt]{article} \usepackage{tikz} \usepackage{pgfplots} ...
2
votes
0answers
13 views

pgfplots: dont plot each point from table [duplicate]

I have a large file with data which I want to plot using pgf. Since I don't want to edit the file and it consists of roughly 5000 data points, compiling takes quite a while. Is there any way to tell ...
5
votes
1answer
126 views

pgfplots: unable to affect cycle list name while using \pgfplotsinvokeforeach

I am unable to use custom colors from cycle list name with pgfplotsinvokeforeach. Some pointers could be gauged from this post, which discusses execution of various steps in a plot function. In the ...
6
votes
2answers
123 views

How can I smooth out the corners of a pgfplots plot

How do I smooth out the corners in the following graph? \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[>=latex] \begin{axis}[ every axis/.append ...
4
votes
1answer
62 views

Strange underfull hbox?

I'm not sure if I found a bug or I'm just missing an argument somewhere, but I get an underfull hbox with the following code, and I have no idea where it's coming from: \documentclass[10pt]{article} ...
2
votes
2answers
64 views

Pgfplots: let legend show two linestyles

I do have a double axis plot which which compares two different things (part 1 on the left axis in solid, part two on the right axis in dashed) for different paramters which are common for both plots. ...
5
votes
1answer
67 views

Plots with “no marks” have marks in references

I want to plot some functions without marks and reference them in my text - the problem is that in the text there are some random marks and i can't turn them off somehow. \documentclass{article} ...
3
votes
0answers
21 views

change position of tick multiplier [duplicate]

I have a plot like this and want to change the position of the 'tick multiplier', i.e. change where the $10^{-3}$ or $10^{-4}$ actually occurs. I don't want to change where ticks occur or remove the ...
5
votes
1answer
385 views

TikZ graph not aligning

I am having two issues with TikZ pictures. I have three graphs side by side, and I am having issues, but only with some of them, which is very odd. First the x-axis is going out of alignment (some ...
1
vote
0answers
83 views

PGFPLOTS: Insert a boxplot outside the chart axis labels, much like GNU R

I have some code that plots a horizontal barchart. What I would like to do is put a boxplot or confidence interval above my horizontal axis which is on top of the chart. GNU R (see R In Action, Robert ...
5
votes
1answer
154 views

Recommended way to draw sets in Euclidean plane

I was wondering which is the most appropriate tool to draw sets in the Euclidean plane (with axis) such as the plane minus a given ray or the points in the plane which have a y coordinate between 2 ...
25
votes
3answers
2k views

Is there an easy way of using line thickness as error indicator in a plot?

I have several curves/datasets (obtained from Monte Carlo simulations) with x-dependent y errors I would like to plot with the errors somehow indicated. Since each curve consists of quite a large ...
3
votes
1answer
115 views

Stacking plots in animation using fill between library (with dynamic calculation of intersection segments?)

As a followup question to Filling the area under a graph based on intersection with another graph, I'm looking to create the following effect: Fill based on the coordinates of the intersection ...
1
vote
2answers
69 views

Control pgf/tikz semilog factor

I'm currently using the semilogy environment and wondering on how to control whether they actually take 10 log or 20 log.
7
votes
2answers
210 views

Filling the area under a graph based on intersection with another graph

I'm trying to produce this: But I can't get any further than this: This is my code: \documentclass{minimal} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usetikzlibrary{intersections} ...
19
votes
2answers
3k views

Fill the area determined by two pgfplots graphs

I need to fill the region determined by two (Gaussian) curves and the right red line (the region is brushed in green in the figure below). I also wonder what is the best way to draw vertical line ...
9
votes
1answer
113 views

Drawing a semicircle in 3D with pgfplots

I'm trying to make a plot of a torus with a semicircle drawn on its surface. The following MWE \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} ...
4
votes
0answers
101 views

Add fitting line to histogram plot created by pgfplots [duplicate]

I have created a histogram plot with pgfplots as following \begin{tikzpicture} \begin{axis}[small,ymin=0,title=\texttt{hist}] \addplot [ hist, fill=orange!75, draw=orange!50!black] table [y ...
3
votes
1answer
82 views

Global pgfplotset messing up error bars

I have a plot with some error bars generated with this code, but the error bars are messed up. \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \pgfplotsset{ every ...
2
votes
1answer
69 views

Conditional alignment of labels in pgfplots bar chart

I'm trying to make a bar chart with pgfplots. I'd like the labels to be plotted inside the bars, except when there is not enough space. In that case the label should be shown next to the bar. I've ...
0
votes
0answers
46 views

matlab2tikz not maintaining subplot dimensions

The following Matlab script gives me the two plots of the time series object T204 a1=subplot(3,1,[1,2]) plot(T204) a2=subplot(3,1,3) plot(T204) It looks like this in Matlab: Then I use ...
6
votes
1answer
381 views

Tikz Stacked Bar Chart with Text

I have the following stacked bar chart and want to put some text behind each bar element and some text into each of the colored areas. Do you have some ideas, how I could achieve that? The ...
1
vote
0answers
39 views

“Dimension too large” error with pgfplot generated with matlab2tikz [closed]

I would like to insert a tikz plot generated with matlab2tikz in my code. This is the code to generate the matlab image X1=[7.4632 8.0349 8.5251 8.8176 9.2251 9.5559 9.9214 ...
3
votes
1answer
525 views

pgfplots, plot options ignored when using “restrict expr to domain”

This is my first post here. I want to use pgfplots (wonderful piece of software/code) to display some data (A,B,C) from a experiment. In some diagrams I want to plot x=A and y=B but only for some ...
0
votes
0answers
52 views

Break y axis for values exceeding range

Related to this question regarding values that exceed the axis range (which also provides the code for a MWE), I would like to modify the output slightly: instead of displaying the numbers above the ...
8
votes
2answers
141 views

How to do linear regression in pgfplots for data with nan?

I am trying to use pgfplots to plot a linear regression to my data. If there is a nan in my data set, no fit is generated, with the warning: NOTE: coordinate (1,nan) has been dropped because it is ...
3
votes
1answer
53 views

pgfplots linear regression for the wrong column

The following MWE correctly plots the Y column when it is plotted directly (black points). However, a linear regression specified for the Y column actually fits to the Z column if the Y column is the ...
4
votes
2answers
83 views

Ticks for Chart with odd style

I am trying to plot some data where the X axis is somehow in bytes. The values grow exponentially, so I scaled them by hand to obtain a better chart. However, I don't want to show the log but the real ...
7
votes
2answers
105 views

Tightly packed and differently colored bars with pgfplots

I have CSV data representing the time in nanoseconds for calls to my custom malloc(), realloc() and free() implementations. The data looks like this: function,time malloc,331 malloc,386 malloc,326 ...
4
votes
1answer
93 views

Pgfplot second intersection point

As it can be seen in the figure i added a line from the first intersection (y=2x and y=6-x) to x(2). But i couldn't add a line from second intersection (y=x and y=6-x) to x(3). i tried intersection-2 ...
4
votes
1answer
135 views

TikZ: How to pass a specific table to \pgfplotstableset if used for tikzpicture

I have created the following code that appears to do what I want it to. Namely add an additional row to the table \IDA that is the average of four values. This row can then be used for a plot in ...
7
votes
3answers
165 views

Plotting Multiple Normal distributions with pgfplots

Output MWE \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \begin{document} \pgfmathdeclarefunction{gauss}{3}{% \pgfmathparse{1/(#3*sqrt(2*pi))*exp(-((#1-#2)^2)/(2*#3^2))}% } ...
3
votes
1answer
59 views

pgfplots + animate + foreach: Starting with one plot

I want to generate an animation where the number of lines increases one by one. It works very well but the start image always has two lines. \documentclass{article} \usepackage{pgfplots} ...
4
votes
2answers
56 views

How can I place an external image of given dimensions at the center of a pgfplot?

Let's say I would like to place a certain picture at the center of my plot, such that it matches some given dimension on the scale of my pgfplot. I was thinking at first that I could include an ...
3
votes
1answer
61 views

Tikz legend cannot be added?

I thought I can add a legend to a tikz picture by \addlegendentry{...}. But as soon as I uncomment the command the compiler complains about missing }. But when I comment the lines again, then it ...
3
votes
1answer
55 views

Opacity of a legend fill in pgfplots

I am forced to make rather small plots that need to have a legend. This means that it is unavoidable that part of the plot gets covered by the legend. To retain legibility of the plot, I would like ...
4
votes
1answer
60 views

problems “xtick”,“ytick”, add legend… in Gaussian with pgfplots

I have the following code: \documentclass[12pt,a4paper]{article} \newcounter{conto} \setcounter{conto}{\time} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} ...
2
votes
1answer
84 views

Problem with pgfplots/pgfkeys: “I do not know the key '/tikz/use units'”

Problem in short: I'm using pgfplots but I can't use units in the labels. I tried this minimal example (from http://pgfplots.sourceforge.net/gallery.html) and get an error message: ...
1
vote
1answer
64 views

Can I make an xbar plot based on an external file?

I'd like to use the, imho, most common value alignment of x- and y-values in an external file and then produce an xbar with it. It shall look like the examples here (the better example because there ...