{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

2
votes
2answers
63 views

pgfplots: annotate each bar in a group with custom values

how can I add custom annotations to each bar in a grouped bar chart? I know how to display the values from the the bars (with every node near...), but the values I need to display, above or below the ...
5
votes
2answers
112 views

Surface plus filled projection in pgfplots

Can something like this be done with pgfplots? It was generated with whe following gnuplot script: set view equal xy set view 72,32 set xyplane relative 0.2 unset key unset colorbox set samples 21 ...
1
vote
0answers
32 views

Protecting \@ifnextchar inside pgfplots

I'm having trouble figuring out what I need to do in order for my definition of \sin to be accepted by pgfplots. I've looked up stuff about using \protected but it's vague to me how I'm supposed to ...
1
vote
1answer
30 views

Using the tikzexternal.sty package together with legend to name feature

I am using the following TeX code (minimal example), which compiles fine, when running pdflatex then run make -f filename.makefile and repeat the procedure a second time to also include the referenced ...
2
votes
1answer
37 views

show last number in x-axis data on pgfplot

How can I get the last number on the x-axis (in this case 40^7) to show up on the plot also? Here is my code: \documentclass[11pt]{book} \usepackage{graphicx} \usepackage{tikz} \usepackage{float} ...
3
votes
1answer
131 views

Colormap with Tikz

What I have tried so far \documentclass[a4paper]{article} \usepackage{pgfplots} \begin{document} \pagestyle{empty} \begin{tikzpicture} \begin{axis}[view={0}{90}, ...
1
vote
0answers
30 views

24h format in the x axis along a whole week

I want to show the evolution of a variable (var) along a week. My data is in a text file (available here). The time data is given in hours as shown in the following plot. Do you know how to show ...
2
votes
1answer
52 views

Using pgfplots to create 2-D parameterized parametric plot

I am attempting to create a parametric plot, actually two parametric plots on one axis. Nothing is coming out right and I think I need help. I admit to having less than an hour of time practicing on ...
6
votes
1answer
67 views

PGFPlots gnuplot contour … dimension too large?

I'm trying to make a contour plot with pgfplots and gnuplot, but I get the error "dimension too large". Why? That seems like a TeX error, I thought gnuplot was doing the calculations? ...
1
vote
0answers
45 views

drawing a tangent on a graph in pgfplots [duplicate]

I need to draw a tangent to a graph at time = 4, 10, 16, and 24 on this graph. How would I go about drawing a tangent on it and measuring the gradient of the tangent? \begin{tikzpicture}[rotate=90] ...
0
votes
0answers
55 views

different line colors for intersectioned curve with pgfplots

I'm trying to use different line colors for a curve which is intersected by vertical lines. Everything works well if a \addplot[smooth,..] is used (solid,green/blue/orange curve), but for ...
4
votes
1answer
157 views

Specify ticks as micro seconds

I am trying to create a tick which uses e-6 as x axis. Now it automatically scales to e-5. \documentclass[tikz,border=10pt]{standalone} \usepackage{tikz} \usepackage{siunitx} \usepackage{pgfplots} ...
2
votes
1answer
30 views

PGFPlots cycle list skips first definition after every cycle

I got some problems with self-created cycle lists in PGFPlots. As you can see, the plots skip the first definition of my cycle list after every run through the cycle list. Are there any coding ...
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. ...
5
votes
1answer
79 views

Multiple Gaussian curves in different locations in one Tikz figure

I want to have multiple Gaussian curves in different locations in one Tikz figure. I am unable to place each Gaussian curve on top of its intended point (2, 6 and 12 in the following code). Also, two ...
4
votes
2answers
106 views

How I can customize a legend on pgfplots?

I am trying to design a legend like picture. it has two column and each column has head text. Also, how I can control which item in first column and which one in second column? ...
1
vote
2answers
125 views

the graph of f(x) = a + b.sin(cx + d), for d not null

I have a problem: the graph of $f(x) = a + b.sin(cx + d)$, for d not null do not work in tikz/pgfplot. Can anyone help, please. The problem, I think, is that I don't know how tikz/pgfplot convert to ...
1
vote
0answers
38 views

using pgfplotsinvokeforeach with addplot table

I have this minimal file: \documentclass[]{scrartcl} \usepackage{filecontents} \usepackage{pgfplots} \pgfplotstableset{ header=true, trim cells=true, col sep=comma, } \begin{document} ...
5
votes
1answer
51 views

String concatenation macro to find file in pgfplots groupplots

I have a strange problem with pgfplots and using a macro to return a string to a file to be included. MWE Code: \documentclass[a4paper,10pt]{article} \usepackage{pgfplots} ...
2
votes
1answer
57 views

Adding plots from large data files

I have the following "stardard file" for plotting data files from simulation results: \documentclass[tikz,border=10pt]{standalone} \usepackage{tikz} \usepackage{siunitx} \usepackage{pgfplots} ...
2
votes
1answer
71 views

tikzpicture[ ] and axis[ ] do not align

I would like to combine figures drawn outside of the scope of axis but inside the scope of \tikzpicture with figures inside the \axis environment. However they seem to leave in a different reference ...
5
votes
1answer
93 views

\addplot command fails to generate graph for function with rational exponents

I'm trying to plot the graph (x+2)^{1/2}(x-7)^{2/3}, using the code below, but after compiling the axis is present, but the plot is empty. Could anyone point out what I am missing? Any assistance ...
3
votes
1answer
41 views

Fix bounding box in pgfplots

I want to do the following: Do some draw or plot commands in pgfplots and then fix the bounding box. I.e. all plots which come afterwards shouldn't influence the bounding box. How can I do this? I ...
2
votes
1answer
58 views

Pgfplotstable: display numbers exact as written in file

My file is U(V) I(A) I/U 0.00 0.000 0 0.31 0.020 0.065 1.15 0.075 0.065 1.82 0.120 0.0659 2.73 0.178 0.0652 3.42 0.224 0.0655 5.08 0.333 0.0656 6.24 ...
3
votes
3answers
159 views

Draw a spline with pgfplots

Is it possible to simplify the code, that is to say not to use three times the command \addplot[] ? \documentclass[tikz]{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...
3
votes
0answers
56 views

Doing surf plot with user defined colormap

I want to make pgfplot surf with my colormap rainbow. The funny thing is that I get error I do not know the key '/pgfplots/colormap/rainbow' and I am going to ignore it. Perhaps you misspelled it. ...
3
votes
1answer
31 views

pgfplot is joinint my first and last point

Here is a minimal working example: \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{enumerate} \usepackage{tikz} \usepackage{xcolor} \usepackage{tikz-3dplot} \usepackage{hyperref} ...
3
votes
1answer
77 views

PGFPlots — custom colors for ticks labels

Is there any way to change a color of a single tick label? I need some labels to be black and others to be blue and red. \documentclass[png,border=4pt]{standalone} \usepackage{tikz} ...
4
votes
1answer
112 views

I am trying to plot area vs volume

I am writing a lab report in chemistry discussing the surface of catalysts. I want to show that area doesn't increase proportionally to volume. I have been trying to plot a function vs against another ...
3
votes
1answer
34 views

bug in pgfplots+subcaption?

I'm using pgfplots (with the excellent matlab2tikz), pgfplotstable and subcaptionbox together, and for some inexplicable reason (at least to me), the command \pgfplotsforeachungrouped seems to break ...
1
vote
1answer
118 views

pgfplot axis title position

I would like to obtain the result that appear on the right (compiling the following MWE) by using title style: \documentclass{standalone} \usepackage{calc} \usepackage{tikz} ...
2
votes
1answer
99 views

Give a threshold value to automated ymin and ymax

In pgfplot, is it possible to give the automated scaling of your axis a minimal/maximal value? In other words; I want to have y=0 always on the vertical axis in a way like: ...
2
votes
1answer
67 views

Pgfplots: vertical bar char prints only labels at one bar

I want to create a vertical bar charts with two bars in it. At the x-axis the bars shall be labeled with A and B. The label A is printed although it is not exactly properly positioned, but the label B ...
1
vote
0answers
11 views

pgfplot groupplot fillbetween - problem comes up again with newer version of texlive [duplicate]

I have had this problem before, I asked it here and got a solution: pgfplot groupplot fillbetween Now I have texlive 2015 and my old codes don't work \documentclass[class=scrartcl,14pt]{standalone} ...
9
votes
1answer
136 views

Photoelectron Spectroscopy Scan Simulation

I would like to reproduce a plot similar to this: Credits to: PPLATO University Each peak represents the binding energy of the electrons in each subshell. The energy values for each peak can be ...
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} ...
1
vote
1answer
62 views

Adding a second scale above the figure in pgfplot

Is it possible to add a second scale above the figure on the horizontal axis for the same figure? I want to combine the date with the number of days since a reference date. The illustration should ...
3
votes
1answer
73 views

pgfplots : duplicate y-axis label

I would like to a plot a line graph. The coordinates y are values from 0 to 0.035. However, the y label ticks are completely wrong, with duplicate values, e.g. there are two '0.03' labels. The plot ...
5
votes
1answer
77 views

Move common legend to top right of plots in pgfplots

in my code below, I wanted some help to move my common legend to the top right of the plots like this: Can you assist me with this? Thanks. Here is my code: \documentclass[11pt]{book} ...
1
vote
1answer
34 views

Change y-axis limits in pgfpltots

I am not sure why my graph is not taking the data from the \filecontents data.csv file, but I wanted to change the scale of the y-axis to go from 0 to .005. Thanks for your help. Here is my code: ...
4
votes
1answer
112 views

increasing hard coded memory limits of latex

I am drawing a 3d-surface plot with pgfplots, with input data from some simulation results. As the shader-option faceted interp results in huge pdf-files, I wanted to switch to faceted and increase ...
3
votes
1answer
56 views

How to set pgfplot dateplot increment?

With pgfplot and dateplot, How can I set the date increment on the horizontal axis? This is what I have so far: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} ...
1
vote
1answer
27 views

Common x-axis label in different rows of pgfplots mult

I am trying to get this effect in my code: Bascially I want to move the titles and x-axis label to the center between the two plots in each row. Can you direct me as to how I can accomplish this? ...
8
votes
1answer
83 views

Struggle with floor- and ceiling-functions in pgfplots

Could anyone help me with this struggle? I don't get, why the floor- and ceil-functions in the axis-environment of pgfplots and in floating text differ from each other. Aren't they both processed by ...
4
votes
0answers
70 views

Pgfplots Tick Position [duplicate]

Similar to this question, I want to hide some ticks in a pgfplots axis. However, I'm trying to manipulate a 3D plot. I used the proposed answer and reread the documentation at: "4.15.2 Tick ...
1
vote
0answers
14 views

Same y-axis and x-axis label for multiplots in pgfplots [duplicate]

I am trying to get one y-axis label, "Absolute Parameter Error ABS (Estimated - Actual)" spanning the three rows of the plots. Also, the same x-axis label each of the two plots with the label "Number ...
0
votes
1answer
21 views

Common Legend in pgfplot - having problems compiling

I am trying to get a common legend for the six plots that I have. I tried to implement the code found here, but could not get my program to compile. I tried to get the legend at the bottom of the ...
2
votes
3answers
75 views

Reading an unusual coordinates file in PGFPlots

I have a pgfplot (which works fine), but I want to automatically load the data from a file: data.dat: ( 0 , 0.295027 ) ( 1 , 0.295027 ) ( 2 , 0.25965 ) ( 3 , 0.219873 ) ( 4 , 0.197843 ) ...
1
vote
1answer
65 views

pgfplots: Bar graph with confidence intervals (error)

I would like to put a confidence interval (error bars) in my bar graph, but I tried the += and -= and it did not work. Here is the code: \begin{tikzpicture} \begin{axis}[ width = ...
1
vote
1answer
36 views

Change font properties of math expression in axis label pgfplots

I thought it was simple just to change the font of the axis label by using: ylabel={$\frac{Su}{\sigma_{pc}^{'}}$ x}, ylabel style={font=\Huge}, However it does NOT work, I really don't understand ...