{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

0
votes
1answer
32 views

pgfplots: percentage in matrix plot

I'm trying to draw a matrix plot with the shown values in percentage. I already tried: nodes near coords = {\pgfmathprintnumber\pgfplotspointmeta\%} Unfortunately this didn't work out. Here is my ...
2
votes
1answer
29 views

Change color in addplot in for loop of pgfplots

I am looping over several files and plotting the content on an axis in pgfplots. I would like to plot each entry as a different color (a shade of blue, for example). While the plotting works fine, I'm ...
2
votes
0answers
54 views

pgfplot draw background color as a polar function

I want to illustrate the path of a light beam refracted in the athmosphere. Using Matlab, i have calculated some numerical solutions to my differential equation. These solutions are in polar ...
5
votes
2answers
318 views

pgfplot legend on top of grid but below graphs in axis as well as groupplot

Is there a way to specify the order of layers of elements in a pgfplots-axis? In my certain case I'd like to have the legend on top of the grid, but below the actual graphs: I know for this ...
2
votes
1answer
37 views

\addplot doesn't work outside of tikzpicture or axis environment

I wrote this code: \documentclass{article} \usepackage{pgfplots} \usepackage{tikz} \begin{document} \begin{axis} \draw[->,thick] (-0.5,0) -- ++(11,0) node[below left]{$t$}; ...
1
vote
0answers
31 views

Error when using eps2pgf [closed]

I am trying to convert an eps file to pgf code, using the Java command line tool Eps2pgf. I have an eps file called cuspsurface, which is saved in the same folder as Eps2pgf. When I enter the line ...
2
votes
1answer
64 views

How I can change values on the Y-axis

\documentclass{article} \usepackage[sc]{mathpazo} \usepackage{pgfplots,amsmath} \usepackage{tikz} \usepackage{tkz-fct,tkz-base} \usepackage{tkz-tab,tkz-euclide} \usepackage[miktex]{gnuplottex} ...
2
votes
1answer
62 views

Multiple graphs in tikzpicture

I am trying to draw the picture below. The four graphs are each a density probability function; the distribution in case 1 and case 2 is unimodal, in case 3 it's normal, and in case 4 it's bimodal. ...
21
votes
4answers
19k views

specify the step of pgfplots axis

Now the numbers on the x-axis are 0, 0.5, 1, 1.5, 2 I want to show integer only: 0, 1, 2 How can I do that? My code: \begin{tikzpicture} \begin{axis}[ xlabel=threads, ...
1
vote
1answer
33 views

boundary for x axis for plot in tikz

I have a problem with my plot, I want to have a boundary at x=4000 and don't know how to do. My current plot is the one below and here is the code that I have now \makeatletter ...
6
votes
1answer
109 views

Is there a TikZ and PGFplot HTML manual online?

This builds up on the question TikZ manual newest version online?: I know where to find the latest version of the TikZ (or PGFplots, or ...) manual online, in PDF form. But sometime, answering to a ...
4
votes
1answer
39 views

pgfplotstableread{mydata.csv} VS table {mydata.csv} efficiency and capability for csv files pgfplots

I am trying to plot a very large .csv file with multiple columns using pgfplots. I want to use the first column for all my plots. My usual routine is to do something like: \addplot [solid] table ...
1
vote
1answer
45 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
61 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 ...
0
votes
1answer
42 views

Draw pgfplot markers whose origin is outside the xmin-xmax,ymin-ymax range?

As a followup of this question, i am coping with drawing certain markers. And the solution by John Kormylo works fine for the presented MWE in that question. Here, I would like to extend the plot by ...
2
votes
0answers
36 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
55 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
62 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
82 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
28 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
55 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
16 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
49 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
71 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
19 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
98 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
75 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
49 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
59 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
40 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
40 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
360 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
123 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
43 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
290 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
50 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
25 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
70 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
57 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
45 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
83 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 ...