{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
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
66 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
53 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
29 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
124 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
37 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
70 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
90 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
157 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
111 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
110 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
135 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
60 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
72 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
76 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
110 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
54 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
26 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
73 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
62 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 ...
3
votes
1answer
119 views

How to draw a 3D path from points generated within tikz

Let me be specific by posting an example: The following small code draw a piece of helix (an ugly one) \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{tikz} \begin{document} ...
4
votes
2answers
71 views

Problem with vertical alignment and centering of caption for pgfplot

I am having a problem keeping the vertical alignment of the plots. Also, my caption text is not centered. This is what I get in my document: Can you assist me in getting the graphs to align ...
2
votes
1answer
36 views

Change pgfplots markers colors and shape

In my MWE below, I am not getting the markers of the plots to colors that I wanted. Also, I would like to change the red squares in the last plot to cyan circles. Thanks. Here is my code: ...
2
votes
2answers
105 views

Combine pgfplots and other shapes in the same Tikz picture

I would like to put both a pgf plot other tikz elements in the same figure, but I cannot figure out what is the height and the width of the plot, so that I can scale other elements to it. Here is an ...
2
votes
1answer
129 views

Draw a surface on a ternary diagram with pgfplots

I'd like to draw a surface on a ternary diagram. Until now, I can plot density maps on a ternary diagram (cf. density map). But I would like to replace the density map by a surface, like on figs a ...
3
votes
2answers
99 views

fairly specific cartesian graph help

I have been trying for an hour or two to draw a TikZ plot with varied results. I am trying to draw a plot whose x axis has ticks for each x unit n*(1) and each y unit n*($\sqrt{-5}$). I then need to ...
7
votes
4answers
174 views

How to use colors from a pgfplots colormap in own draw

Let's consider a set of ellipses (or say a signal), here 3, but in general that might be a huge array of 64x64 \documentclass{standalone} \usepackage{tikz,pgfplots} \usetikzlibrary{calc} ...