{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

5
votes
1answer
88 views

Usage of /pgf/number format/cd

I'm trying to fix the amount of digits the colorbar has, because the plot is shrinking in size and I wish to animate this plot, so a fixed height and width is mandatory. I still want LaTeX to do the ...
2
votes
2answers
98 views

Wrong placement (and/or size) of picture / plot with groupplot of table (… and discontinuity)?

Consider this MWE: \documentclass{article} % \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.5.1} \usetikzlibrary{pgfplots.groupplots} \usepackage{pgfplotstable} ...
7
votes
3answers
137 views

Tikz and pgfplot problem with plotting

I'm using pgfplots. The graph is clipped where it shouldn't, how can I fix it? \documentclass{article} \usepackage{tikz} \usepackage{siunitx} \usepackage{pgfplots} \begin{document} ...
3
votes
1answer
98 views

PGF Math Error: Could not parse input

Trying to plot a BER vs SNR function using erf function. However I get an error saying " Package PGF Math Error: Could not parse input '' as a floating point number, sorry. The unreadable part was ...
4
votes
0answers
95 views

Pgfplots histogram with density less than one

I want to plot two histograms over each other in order to compare densities of two different datasets. The problem is that the second dataset has less observations than the first one, and I want its ...
4
votes
2answers
75 views

Weird undefined control sequence with \nextgroupplot (solved with “globalization”)?

Consider the following MWE: \documentclass{article} \usepackage{calc} %\widthof \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{adjustbox} \usepackage{tikz} ...
4
votes
1answer
71 views

Triangular mesh in PGFPlots instead of rectangular

Recently I had to reinstall my OS, and with it the LaTeX system also. Now if I compile the same code as before, on surface plots PGFPlots generates triangular mesh instead of the wanted and usual ...
3
votes
1answer
64 views

Align bar charts from different sources with one xlabel each

I have a pgfplot that reads from two files. I want a bar chart where the values (bars) of one file appear over one xlabel and the values from another file over another (A and B in this example). My ...
1
vote
1answer
135 views

Engineering notation (scientific) as tick labels with pgfplots (maybe via siunitx)?

I would like to have numbers on the ticks labels formatted in engineering notation -- but unlike in How to control pgfplots axis scaling for engineering notation (multiple of 3 exponent)?, I would ...
9
votes
1answer
99 views

Pgfplots grid not showing

I'm having trouble with setting up a grid for this plot using pgfplots. Here's my code. \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[ /pgf/declare ...
5
votes
2answers
127 views

Animating a plot with pgfplots

I'm creating a beamer presentation and I want to animate a plot with pgfplots. This is a MWE of the graphics: \documentclass{beamer} \usepackage{tikz,pgfplots} \begin{document} \begin{frame} ...
1
vote
0answers
60 views

pgfplots: Explicitly Setting 'Line and Mark Intersection' In Plot

Is there a way to specify where a line intersects a 'mark' on a pgfplot? MWE: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{figure}\begin{tikzpicture} ...
6
votes
1answer
107 views

Graphing an astroid - parametric curves in pgfplots

So I am trying to create a plot of an astroid in pgfplots which has the parameterization x = cos(t)^3 y= sin(t)^3 and tikz is giving me an error that it is giving up on a path and wondering if I ...
3
votes
0answers
36 views

Independent coloring of contour and 3D plot in pgfplots [duplicate]

I have a problem with pgfplots where the addition of a contour plot at the bottom of a 3D plot changes the coloring of the surface plot. This is a simple example: ...
3
votes
3answers
216 views

Problem aligning multiple pgfplots due to different axis label sizes

I have two plots that comes back to back in my paper. One of these plots is generated from 1000 data samples while the other one from 320. The problem that I'm, facing right now, is that plots are ...
2
votes
0answers
41 views

Problematic rendering of mark=+ in pgfplots

Consider the following MWE: \documentclass{article} \usepackage{pgfplots} \usepackage{tikz} \pgfplotsset{compat=1.5.1} \xdef\doPlotCoords{} \foreach \r in {0,1,...,10}{% \xdef\tempCoords{} % ...
1
vote
1answer
126 views

String column tick labels and plotting selected samples on y axis with groupplots?

I have seen other relate questions (like Basic bar chart with text as x axis labels), but still cannot figure out where the problem is in my example. The MWE below contains a snippet of a .csv table ...
3
votes
0answers
48 views

My boxplot draws but the coordinates are NaN when I try to label the plot

I have been slowly getting my barchart with a boxplot to come together. My current project is to label the whiskers, quartiles and median. Using examples from the manual, no label is printed. This is ...
2
votes
1answer
64 views

plot points depending on x value?

Is there any options to replace each nth point={100} for something dependent on column value? My table is something like: x y 0 5 1 4 2 5 3 3 3 -3 2 -4 1 -1 0 0 I just want to ...
23
votes
1answer
345 views

How to get a Waddington landscape?

The idea is to make a plot like this Source: http://figshare.com/articles/_Waddington_s_8220_Epigenetic_Landscape_8221_/620879 But only with 2 wells in the front, not 4. Also the colors don't ...
2
votes
1answer
56 views

Plot not plotted with pgfplots' \nextgroupplot and discontinuities?

I'm trying to do Multiple axis discontinuities with pgfplots, and so based on Axis break in pgfplots, I produced this MWE: \documentclass{article} \usepackage{calc} %\widthof \usepackage{pgfplots} ...
2
votes
1answer
76 views

Add single bar to a stacked bar plot

In order to show the difference between three measurements against a single one, I need to combine a regular bar plot and with a stacked one. However, once I use a stacked bar plot, the single datum ...
7
votes
1answer
146 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
46 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 ...
8
votes
2answers
128 views

pgfplots: Syntax of Piecewise Defined Functions

I read about piecewise defined functions today and saw this post which was actually about something else: Label plots in pgfplots without entering coordinates manually This is taken from there. ...
5
votes
1answer
94 views

TikZ “scale” key not behaving at all in the expected way when scaling tikzpicture

I am having difficulty with TikZ remembering node positions, or just reconciling things between different coordinate systems (such as nodes named within a given coordinate system and then refered from ...
0
votes
0answers
51 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 ...
2
votes
1answer
72 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} ...
1
vote
1answer
43 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} ...
5
votes
2answers
266 views

pgfplots: Clipping Everything Outside a Specific Area

I want to add information to each column of a histogram. every node near coord is probably the best approach. It works well with bar plots but not with the histogram: \documentclass{article} ...
12
votes
1answer
316 views

pgfplots: Coloring a Single Column in a Histogram Differently

I have a huge data file and want to visualize the data using histograms. I would like to color a single columns differently than the rest. Here's an example from the documentation (Section 5.11.2 ...
2
votes
1answer
128 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 ...
2
votes
1answer
61 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 ...
3
votes
2answers
99 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
2answers
64 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 ...
6
votes
2answers
133 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
66 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
85 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. ...
11
votes
1answer
201 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 ...
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 ...
1
vote
0answers
105 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
162 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 ...
3
votes
1answer
114 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
2answers
76 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.
3
votes
1answer
128 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 ...
7
votes
2answers
229 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} ...
9
votes
1answer
138 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} ...
3
votes
1answer
94 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 ...
0
votes
0answers
59 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 ...