{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

4
votes
1answer
44 views

Wrong ticks in colorbar using pgfplots

I'm using pgfplots and addplot3 to show a 3D function, provided by the following csv: 100,2.0,100 500,2.0,500 1000,2.0,1000 1500,2.0,1500 2000,2.0,2000 100,2.1,158.489 500,2.1,930.823 ...
4
votes
2answers
144 views

Using tikzpicture or pgfplots to draw a uniform grid

I want to use pgfplots or tikzpicture to draw a uniform grid as illustrated in below. The grid size in the figure is 8×8. I want to be able to define a parameter that gives me the ability to draw ...
5
votes
2answers
51 views

Reduce vertical size of tikz plot

The following code generates a color mapped plot. I would like to reduce the vertical size however, and cannot figure out how. Can anyone give me a hint? \documentclass[a4paper,twocolumn]{article} ...
2
votes
0answers
43 views

Histogram and nodes near coords [duplicate]

When using pgfplots's hist in combination with nodes near coords, the nodes are misplaced on the edges of the bars and the last node is shown twice. Is this a bug or is nodes near coords not meant to ...
5
votes
1answer
63 views

plotting data from rows instead of columns in latex

How can I use the addplot table command to select data from rows to be plotted instead of columns? Thank you.. I tried that but still I got errors.. here is my script: \documentclass{article} ...
4
votes
1answer
61 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
85 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
121 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
77 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
82 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
65 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
63 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
59 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
104 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
89 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
114 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
48 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
101 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
33 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
135 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
39 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
94 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
42 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
62 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
333 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
43 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
61 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
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
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 ...
8
votes
2answers
120 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
85 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
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 ...
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} ...
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} ...
5
votes
2answers
244 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
295 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
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 ...
2
votes
1answer
59 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
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
2answers
54 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
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. ...
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 ...
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
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 ...
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
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.