{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

1
vote
1answer
57 views

Customizing torus diagram in pgfplots

I'm trying to produce a nice torus diagram to illustrate its parametrization. I have this: but would like to have this: There's a list of things I can't figure out how to do: Move axis labels ...
2
votes
0answers
65 views

PGFplots, polar plot, extrema of values and fill segmented area

i have some testdata and want to create a polar plot, divided into some segments (21-24, 31-35, 41-42, ...). From the testdata i greate about 50 graphs (Var 1 ... Var x). Up to this everything works ...
2
votes
0answers
37 views

Add regression line to data from file [duplicate]

I would like to display a regression line, as well as a legend for it, reading the raw data from an external file. My code is: \documentclass{report} \usepackage{pgfplots, pgfplotstable} ...
0
votes
0answers
28 views

Lines to zero PGFplot diagram [duplicate]

I want to create a PGFplot wich looks like this one that describes vertical forces. Waht I´m searching for at mot is the vertical lines between zero and the plot line. How can I create those?
2
votes
0answers
58 views

Arrows with charts, labels, tkiz and pgf

I would like to draw an arrow from the K in the first chart to the E in the x-label of the second chart. Normal arrows are working but nodes in the axis labels don't seem to work. Do you have any ...
2
votes
1answer
68 views

pgfplots boxplot first column as draw position

I have data like this in a file. 1 0.1 0.2 0.3 0.8 ... 5 0.3 0.5 0.6 0.9 ... 10 0.2 0.3 0.7 0.10 .. ... How do I tell boxplot to use the first column as draw position and compute the box for the ...
5
votes
1answer
91 views

Adding wavelength co-ordinates to pgfplots Smith Chart?

I have currently been using the pgfplots smith chart \documentclass{standalone} \usepackage{pgfplots} \usepackage{amsmath} % Required for \varPsi below \usepackage{steinmetz} ...
3
votes
1answer
30 views

Vertically align pgf plots with y-axis

I want to vertically align my two graphs, so that the y-axes are aligned. The problem is that the one y-axis has double digits and the other has single digits as the units. ...
5
votes
1answer
60 views

xtick in polaraxis useless

As a followup question to my answer here, I have a problem with the polaraxis of pgfplots. When I try to define xtick, nothing changes compared to dropping the option. MWE \documentclass{standalone} ...
0
votes
0answers
20 views

TexShop 2.47 on iMac9,1 mac os 10.6.8 does not see the pgfplots package

I have just started to study pgfplots. I am using three macs: two MacBooks and an iMac, all running Snow Leopard (10.6.8). TexShop uses pgfplots without troubles on my MacBooks, but on my iMac it ...
1
vote
1answer
24 views

Removing the line from a graph label in pgf

I've produced a graph with the following code: \begin{tikzpicture} \begin{axis}[ trig format plots=rad, axis lines = middle, enlargelimits, clip=false, ticks=none ] ...
2
votes
1answer
54 views

Individual Tick style for each Tick

I would like to raise the left Tick over the x-axis so it doesn't clip into the graph. However If I add a second "Extra x ticks" definition the first definition gets overwritten. How can I achieve an ...
8
votes
2answers
1k views

Using LaTeX commands inside pgfplotsset

Is there any way to use LaTeX commands inside \pgfplotsset? For instance, the following code produces an error indicated in the \pgfplotsset line, whereas if one replaced \contents in the ...
1
vote
1answer
80 views

How to fill the parameters of `boxplot prepared` with data from table using PGFPlots?

I want to draw a boxplot using boxplot prepared@ Page 469 of pgfplots-manual; v1.13, with the values of lower whisker, lower quartile, median, higher quartile, and higher whisker from a data file. ...
1
vote
0answers
21 views

pgfforeachungrouped with three arguments

This is a follow-up to a previous question of mine, with a slight addition. I would like to loop over data in a file and give the plot styles as a list. In the old question I gave only a color and an ...
3
votes
1answer
105 views

Prism with curved surfaces with pgfplots

How can I reproduce the 3D prisms shown below using pgfplots (even if they'll be a collection of surfaces is ok)? My main problem is the generation of the bottom and top surfaces. I also tried to use ...
13
votes
1answer
2k views

Multiple Files input to one pgfplotstable

I have several data files that I would like to combine into one table using pgfplots table. Specifically, I would like to use one file to set the first three columns and then have each data file fill ...
2
votes
0answers
18 views

pgfplots: don't 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 ...
3
votes
1answer
79 views

Shading parts of a plot using pgfplots

I have the following plot that I need for my presentation. I have a minimal code for the same, however the shading is an issue. I am yet to be fully in grips over using PGFPlots. \usepackage{tikz} ...
3
votes
1answer
42 views

Positioning with `current axis` depending on limits?

I try to specify the x axis label position below the x axis arrow at the same baseline like the xticklabels. It works fine for most plots. However, when modifying the range of the y axis with ...
1
vote
2answers
70 views

how to set plot box aspect ratio

How can I set the box plot (i.e. axis) ratio of a usual 2D plot to a given value, say 4:3. I don't want to use unit vector ratio since the quantities of the independent and dependent variables are of ...
1
vote
2answers
73 views

How can I set a legend outside subfigures?

I'm making a figure with three subfigures inside of it. I'd then like to create a legend on the top left of the figure. Currently I've created the legend in the third subfigure but it would be ideal ...
2
votes
1answer
44 views

Strange behavior x tick label style versus y tick label style

I've made a graph with this code: \documentclass[11pt,a4paper]{article} % use larger type; default would be 10pt \usepackage{pgfplots} \usepackage{tkz-euclide} \begin{document} ...
1
vote
1answer
43 views

pgfplots: how to make the axis thick?

I can't make the axis thick and with an arrow. This is my code: \begin{tikzpicture}[xscale=0.8,yscale=0.8] \begin{axis}[axis line style = thick, domain=0:1, samples=50, axis lines*=middle, ...
3
votes
0answers
13 views

Undesired jitter in pgfplots when consecutive values are close [duplicate]

I need to plot data where some of the consecutive coordinates are very close to each other. There seems to be something weird jitter appearing when this is done using thick lines, as may be seen in ...
39
votes
3answers
2k views

Tufte like axis with pgfplots

How to achieve this kind of axis with pgfplot ? Image taken from Szymon Beczkowski's awesome PhD thesis design (thesis link) I may provide you with some data to play with. ...
11
votes
4answers
379 views

How to point an equation to a curve

I have the following code: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.7} \begin{document} \begin{tikzpicture}[>=latex] \begin{axis}[grid=both, axis x ...
2
votes
1answer
124 views

Is it possible to user-define the percentages for lower/upper whisper in boxplot of PGFPlots?

According to Section 5.12.1 of the manual of PGFPlots; Revision 1.13 (2016/01/06), boxplot visualizes (see Page 472): Median is the 0.5–quantile of the input data. Lower quartile is the ...
4
votes
1answer
49 views

Plot composite functions using tikz

I'm trying to plot something which I thought was very simple: sin(ln(x)) But this exact line in my plot doesn't work: \addplot[draw=red]{sin(deg(ln(x)))}; The error that I receive is: Missing ...
8
votes
3answers
294 views

Faster calculation of complex functions

I want to draw some complex functions using pgfplots. The problem is that drawing takes really a lot of time, especially some of sub-functions are repeated (calculated several times). For example ...
0
votes
0answers
57 views

Gaussian/Normal plots from a data distribution in scientific notation

I am new to Tex and trying to plot a gaussian distribution from a set of values. I have the following set of values and would like to plot a normal distribution for them. 2.9954E-09 3.1314E-09 ...
1
vote
1answer
30 views

offset triangle on log-log pgfplot

Every post I've seen where they use pgfplot for plotting a log-log scale usually use a triangle to give the slope of the curve, something like the following: \documentclass{article} ...
2
votes
2answers
77 views

Exponent location of second y axis in pgfplots

A minimum working example for using a second y-axis in pgfplots is the code below \begin{tikzpicture} \begin{axis}[scale only axis, axis y line*=left] \addplot[no marks, blue] {x^2}; \end{axis} ...
3
votes
1answer
63 views

AIAA Latex template and tikzexternalize

I am using the AIAA class v3.8 from Texlive 2014 distribution for a communication paper. I try to use the export feature of Tikz, with tikzexternalize, as described in the documentation. For me, ...
1
vote
1answer
48 views

PGFPlots external crossref updates

I’m using the PGFPlots package along with its external library for my dissertation. Overall, it's worked great and has been extremely helpful. But I've had issues when trying to update ...
4
votes
1answer
57 views

Adding number from text file to axis label

I have a bunch of standalone tikz images that I need to add a number to the axis label. The number that I add to each label is in a text file that may change depending on which dataset I use. Is there ...
3
votes
1answer
108 views

Common colorbar over groupplot

I have results that I want to present in a groupplot that share a common result range. Naturally, I don't want to show multiple colorbar next to each picture next to each individual picture but one ...
1
vote
0answers
70 views

How to set a fixed bin width for pgfplots histogram?

I want to plot multiple histograms next to each other using pgfplots, and I found the nice statistics library. However, I can't find how I can set the bin width at a fixed size instead of the amount ...
2
votes
1answer
63 views

animated plot axis label werid moving

When I use the animate package the axis labels start to dance and bounce as the scale moves, how do I stop this from happening? Also: How do I make the animation smoother? Increasing the framerate ...
11
votes
1answer
1k views

grouping options problem in `pgfplots.groupplots` when also using `units` library

I have a problem with the grouping options of pgfplots.groupplots. Besides the labels I have also units defined. With the option xlabels at=edge bottom only the label, but not the unit is moved to the ...
1
vote
0answers
30 views

How to get only two `yticklabels` using `groupplots` library

Having several subplots generated using groupplots library, I would like to automatically detect the data range in each subplot, and specify two yticklabels only (ymin and ymax). Because the data ...
3
votes
1answer
82 views

force \groupplot to start from the bottom left corner

Using \groupplot, subplots are generated starting from the upper left corner as shown in the following illustration: Is it possible to force it to start from the bottom left corner, i.e : Here is ...
2
votes
1answer
76 views

Automatically align 104 subplot in pgfplots

Using Matlab2tikz I generated a file containing 104 subplots aligned in a very specific manner. I then inserted \pgfplotsset{yticklabel style={text width=2em,align=right},}, compiled and obtained the ...
6
votes
2answers
164 views

PGFPLOTS Marginal Histogram with date data

I took Jake's code from Scatterplot with Marginal Histograms and ran into a problem with trying to histogram date data on the x axis. The scatterplot and y axis histogram work well, revealing: The ...
6
votes
0answers
61 views

Barchart with Different Colors and Labels for Positive or Negative

I have a simple bar chart below and I'd like to change the color of the bars if the value associated with it is positive or negative. I'd also like to change the Y labels to use different labels ...
2
votes
0answers
34 views

Control yticks using a mathematical formula

I am trying to define the yticks using a mathematical function of $ymin$ and $ymax$. Although the $y_{min}$ $y_{max}$ are known, I can't insert explicit values for yticks because I have to do this ...
3
votes
1answer
37 views

Show tick labels on both edgess in groupplot

I would like to put quite many small plots in a groupplot environment and provide ticklabels on all adges of the groupplot (no labels at individual plots). In the following example, I've set the ...
4
votes
1answer
49 views

Trouble with pgfplots ternary diagram

I've been trying to help my wife with a ternary diagram that she needs for her master thesis, but I'm having unexpected trouble with pgfplots. The following code, which I got from an answer from ...
3
votes
1answer
44 views

filter pgfplots data more than once (e.g. with discard if)

I want to filter a dat file more than once (i.e., filter on multiple columns), and the usual solution with "discard if" and "discard if not" doesn't seem to work. I.e., the following (were file.dat ...
2
votes
1answer
36 views

pgfplots: minor tick num on one axis

I was just wondering if it was possible to use minor tick num on one axis only. \begin{axis}[ axis x line = bottom, axis y line = left, minor tick num=4, xlabel={$t(s)$}, xmin=0,xmax=5, ...