{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
48 views

scatterplot exceeds memory capacity

I am trying to do an overlay of a scatterplot and a barplot. When I try to execute my code, I get, TeX capacity exceeded, sorry [main memory size=3000000]. \pgfplotsapplistXXpushback@smallbufoverfl ...
0
votes
1answer
53 views

How I can create a water triple jump graphic - pgfplot?

How can I create a water triple jump graphic like the one in the picture \documentclass[border=3mm]{standalone} \usepackage{pgfplots} \usetikzlibrary{intersections} \begin{document} ...
3
votes
1answer
51 views

pgfplots - insufficient precision

I am having the following problem: Using pgfplots to plot some convergence graphs, I have to load a text file and do some computations. Most of the time everythings works just fine. But in some ...
2
votes
1answer
39 views

Use single plot marker in manual “group” legend entries

I have an axis which contains several plots. These plots can be divided into two groups, of which each has a common plot marker. The plots are styled using a combined cycle list. I would then like ...
0
votes
1answer
43 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 ...
1
vote
0answers
56 views

Plot data file using pgfplots

I have a very large data file (.txt) organized as the following example: 0 1 1 . . 1 1 1 . . 2 1 1 . . . . . . . I classically plotted a complex function ...
2
votes
1answer
40 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 ...
2
votes
1answer
40 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
32 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
67 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. ...
1
vote
1answer
35 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 ...
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 ...
1
vote
1answer
55 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
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
57 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 ...
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. ...
2
votes
1answer
67 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
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
19 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 ...
5
votes
1answer
90 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} ...
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 ...
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
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} ...
1
vote
1answer
79 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. ...
3
votes
1answer
101 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 ...
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
59 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 ...
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 ...
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, ...
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 ...
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} ...
0
votes
0answers
56 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
29 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
76 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} ...
2
votes
1answer
66 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} ...
3
votes
1answer
62 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
0answers
67 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
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 ...
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 ...
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 ...
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
1answer
35 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, ...
4
votes
1answer
48 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 ...
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
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 ...
5
votes
1answer
29 views

Discard values = 0 in pgfplots

In the code below, how do I go about removing all the enteries where the y1 AND y2 value = 0? Thanks for your help. Here is the original code that was masterfully written by Stefan Pinnow found ...
0
votes
1answer
51 views

Straight lines from x-axis to markers in pgfplots part 2

This post is building from the post found here that has an elegant solution proposed by JMP. I wanted to append just red markers to the existing plot so that the plot looks like: In summary, I ...