{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
0answers
186 views

Stacked bargraph nodes near coords too bunched up vertically tikz [duplicate]

How do I center the coordinates in their bars vertically? This shows horizontally in ybar \documentclass[tikz,border=12pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{...
4
votes
1answer
562 views

line legend for mesh plots

I am doing a group plot of related curves. Since they are related by a parameter, I want to color them according to (a function of) that parameter. For that purpose, I used the mesh option, and then ...
2
votes
1answer
791 views

Change axis number format for external tikz file

I'm using \input{filename.tikz} to include .tikz graphs created by matlab2tikz in my LaTeX document. As shown in a comment on this question it is possible to change the plot marker size when the ...
4
votes
1answer
678 views

Grid lines in top-view surface plot

I'm almost satisfied with my graphs, only grid lines are missing. What I'm basically doing is a sort of density plot / color plot by letting pgfplots generate a surface and viewing it from the top: \...
6
votes
1answer
812 views

Scale markers in external Tikz file

I use external .tikz files to include graphics in my LaTeX document. These .tikz files are generated by matlab2tikz. The scatter plots that come out though have very small markers. I want to scale ...
5
votes
1answer
2k views

pgfplots - how to create a horizontal line plot in a bar chart with symbolic x axis labels

I was wondering if there was a way to get the line plots "Unseamed" and "Requirement" to span the whole width of the graph not just from the centre points of the first and last x axis labels. Is there ...
1
vote
1answer
238 views

Bad horizontal alignment in pgfplots figure

If I try to horizontally align two nodes by giving the same y-coordinate, the text $D_{\textrm{X-ray}}$ and $D_{\textrm{C-ion}}$ is still not aligned properly, which has apparently to do with the ...
0
votes
1answer
574 views

Plotting from MATLAB with matfig2pgf: some plots do not show up in the pdf

I am ploting from Matlab with matfig2pgf. I plot two lines put only part of them show up in the .pdf, once it's compiled: dat1= [-500:1000, rand(1501,1}] dat2= [-500:1000, cos(rand(1501,1})] XLimm=[...
12
votes
2answers
658 views

How can I do an affine coordinate transformation in pgfplots?

It is possible to perform a general affine coordinate transformation in TikZ by combining the shift, x, and y keys (or just the generalized cm key to set the coordinate matrix and shift). This allows ...
3
votes
1answer
469 views

Wrong plot alignment when using colorbar and groupplot

The alignment of the plot is wrong when I use colorbar, see figure. How can I fix this? Further I would like to know how I can make the small axis ticks black in stead of gray? Now you can't really ...
10
votes
1answer
490 views

using more than 2 arguments in a pgfplots style

Based on How to plot data from multiple filters using pgfplots I got a follow up one. I would like to filter not only for one value of P for each plot but for also for X values that are smaller than a ...
1
vote
0answers
687 views

Undefined control sequence. \pgfplots@already@computed@legend@node [closed]

I got following error in my computer only. Undefined control sequence. \pgfplots@already@computed@legend@node ..._{\text {des}}$};\\\pgfplots@show@.....
4
votes
1answer
558 views

How to plot data from multiple filters using pgfplots

I'm searching for a way to apply multiple filters to a data input and plot the result of each filter in one axis environment. I found the following question which applies one filter but uses the ...
4
votes
1answer
263 views

How can I setup my data so I can create pgfplots boxplots and update the x-indices for multiple series?

I have been using this box plot code to great effect recently. I am making a large amount of plots in my thesis and would like to be able to do the following data format: \begin{filecontents}{dataOne....
6
votes
1answer
5k views

How to single label a point in pgfplots with text?

This seems like it should be straightforward but I'm new to using pgfplots. I have been using this awesome box plot code and would like to be able to add a single point How can I make: \addplot[...
5
votes
1answer
1k views

pgfplots: Points with no marks but errorbars?

How can I plot data points with pgfplots that have no marks, but error bars? If I try marks=none and enable errobars, I get big filled circles with errobars. If I change my mark to mark=+, for example,...
6
votes
2answers
623 views

Rindler coordinate chart (family of parametric curves) in TikZ

Is it possible to make a plot like this with TikZ or other drawing packages? This plot visualizes a two parameter family of curves, given by T = x Sinh(t) X = x Cosh(t) The pink curves are ...
3
votes
2answers
827 views

Plotting floating point data with pgfplots

Is there a binary file structure supported by pgfplots to allow floating point numbers to be loaded and plotted? I understand the time taken to convert floating point data to a text file is small, ...
1
vote
0answers
199 views

Import external eps into pgfplot [closed]

I have some flow image files in .eps format which I would like to import in pgfplots. What is the practical way to do so?
10
votes
1answer
3k views

How to draw on axis from pgfplots?

How can I draw on an axis from pgfplots? I already found out, that I somehow have to use axis cs: in front of the coordinates (what does cs mean?), but the following example does not draw the ellipse: ...
16
votes
1answer
2k views

Tikz: intersection of line and plane

I am struggling with drawing a plane and a intersecting line. I would like to have the line C,P',P in the image, disappear if it is "behind" the plane and have it reappear if it is not behind the ...
7
votes
1answer
792 views

Resizing pgf plots in an A0 beamer poster

I am creating a A0 scientific poster with the beamerposter package and I want to include TikZ/PGF plots. However, if I typeset these plots, the line width for the axis and for the data are too small. ...
7
votes
1answer
525 views

Why does \addplot shift my graph of a \pgfmathdeclarefunction function to the right?

When plotting a \pgfmathdeclarefunctioned function the graph gets an offset to the right that is proportional to the number of times the function is called in the formula. I have boiled my initial ...
4
votes
1answer
1k views

PGFplots axis scale and value manipulation

I'm a tikz-pgf beginner and try to do two simple things: i have x-values between 2^20 and 2^30 (the size, always a power of two). How can i modify the xticks respectivly (not having a power of ten)?...
8
votes
2answers
2k views

add unit circle to a plot

I have a point-by-point plot (pgfplots option only marks) in which I display the real and imaginary part of some points in the complex plane. I would like to add the unit circle to the plot, for ...
3
votes
1answer
482 views

pgfplots chart labels too close and not spaced evenly

i have a set of numbers as x-coordinates:{2.08, 2.09, 2.7, 4.9, 12.8, 29.3, 64.2}. the left part of the diagram is too tight because 2.08 and 2.09 are very close. i want to evenly distribute the set ...
3
votes
1answer
596 views

removing the numbering of the axis pgfplots

How can I remove the axes numbers on this plot Helix as well as the box enclosing it? Would it be possible to now add a tikz 3d axis with pgf plots? \tdplotsetmaincoords{72}{120} \begin{tikzpicture}[...
5
votes
0answers
411 views

Is it possible to create a bar chart with confidence intervals? [closed]

Is it possible to build a chart like in this older question but to add confidence intervals? How to create a bar chart in which the y-axis is expressed in percents?
12
votes
3answers
8k views

Label a single coordinate (pgfplots)

I have the following plot: \begin{tikzpicture} \begin{axis}[grmin=-5:5 -5:5] \addplot[mark=none] {x^2/4}; \addplot[mark=none] {-1}; \addplot[mark=*] coordinates {(0,1)}; ...
9
votes
1answer
2k views

Why does loading pgfplots after tikz break the default layers in a tikzpicture?

Taking the MWE from Jake's answer to the question Background rectangles with equal width but 'fitting' height, I get an error when loading pgfplots after the tikz packages but not before. I'm assuming ...
5
votes
1answer
273 views

pgfplots: Read expression from file

For my lab reports I often have to do complex fitting and transformations to my data (like fitting cauchy distributions or FFT). Fitting with gnuplot sometimes fails and including it directly in the \...
3
votes
1answer
254 views

PGFPlot handling all my data, do I need to pre-process the data?

I will be writing a report in which I analyse the performance of a piece of software. I would like to show my data using PGFPlot. My plan of attack is to schedule a script to run on the machine I am ...
2
votes
0answers
394 views

How do I replace an XYZ coordinate system on an already available plot? [closed]

I have an eps file looking like this: I have no access to the original dataset, so replotting it is not an option. I would like to replace the ugly 80s style coordinate system (Both the captions ...
20
votes
3answers
1k views

Isometric Elevation Grid in TikZ

Is there a (simplistic?) way to draw a 3D elevation grid like this in Tikz or PGFPlots? The blue line should be able to move up or down and, eventually, submerge the interior blocks. I've looked ...
2
votes
1answer
806 views

Trouble including a Matlab surf plot (pdf or png) with pgfplots

I have successfully used \addplot graphics before. Now I have a surf plot in Matlab, which I exported as png and pdf and I would like to include the image with \addplot3 graphics. I found some ...
13
votes
2answers
899 views

Can PGF plot the integral of any specified function?

How can I use the pgf maths engine to plot the integral of any function? For example \addplot {int(cos(x))} does not work.
4
votes
2answers
870 views

pgfplot axis xlabel right justified at east end of axis

I would like to draw an x axis with the axis label not centered, but on the right side of the axis. Something like anchor=east and pos=east for the xlabel. Is this possible? Simple example: \...
6
votes
1answer
670 views

yticklabel in Thousands of pounds/dollars/euros pgfplots

I'd like to display the yticklabel as Thousands \euro or \pounds, but doesn't quite looks right, what do you think? \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} ...
7
votes
2answers
939 views

pgfplots - highlighting/filling an area in a data file

How does one highlight a specific domain range of a datafile in pgfplots? For example I'd like do do something like: \begin{tikzpicture}[baseline,trim axis left] \begin{axis}[ ylabel=frequency, y ...
4
votes
1answer
487 views

External coordinates breaks alignment of groupplots

This answer showed how to make overlay drawings with nodes defined in previous plots using TikZ. However, that solution (ie. adding cell picture=if necessary to the axis) does not work with groupplots....
9
votes
1answer
2k views

Automatic calculation of error in pgfplots

When taking in data through a file (such as table[x index=0, y index=1, y error index=2]{plots/mydata.table};) is it possible to automatically calculate the error bars (instead of putting them in ...
7
votes
1answer
3k views

2D surface on a 3D surface plot external data in a file

I am drawing a 3D surface from external data. Here they are: 0 0 -0.64 1 0 -0.5 2 0 -0.4 3 0 -0.31 4 0 -0.23 5 0 -0.2 6 0 -0.24 7 0 -0.32 8 0 -0.42 9 0 -0.59 10 0 -0.76 0 1 -0.54 1 1 -0.4 2 1 -0.27 ...
3
votes
1answer
2k views

Bell curve with multiple x-axes and annotations

I've just started working with pgfplots and I'm getting good results, but I'm having difficulties getting this one done in LaTeX: The curve itself is not a problem, but the multiple x-axes (I don't ...
2
votes
1answer
2k views

gnuplot and TexnicCenter setup

I just downloaded and ran the gnuplot setup exe. Now, how do I setup TeXnicCenter and gnuplot so I can use gnuplot with TikZ? So I have been able to add --enable-write18 but the inverted cycloid ...
0
votes
1answer
2k views

tikz pgfplots forget plot

I'm having problems finding how to use forget plot in tikz. I need only 2 legendentries like this: but get a massive long list of every object in the graph. This post addresses the problem but seems ...
8
votes
1answer
582 views

For stacked bar chart, how to render zero height bars as invisible?

I am creating a stacked bar chart using the nifty pgfplots package. It turns out that many of my data values are zero -- only a few columns have nonzero entries in a given layer. Using the ybar ...
2
votes
0answers
227 views

elsarticle with latest version of pgfplots [closed]

I want to submit a paper to Elsevier using it's elsarticle class. My document uses some commands from the latest version of pgfplots. However, Elsevier uses a TeXlive distrubution with pgfplots v1.2.2....
5
votes
0answers
978 views

Matlab2tikz adds extra legend entries [closed]

The legend from a boxplot figure is not being created properly. I get this: Instead of thiS: But really only need 2 legend entries. Any Ideas why all the objects in this plot are being given ...
3
votes
1answer
823 views

How to draw the outlines of a patch in pgfplots?

In pgfplots the patch plot library allows to basically draw 3D bezier planes easily. This is very helpful if the exact mathematical form of a plane is not known or not important. What I have not ...
12
votes
1answer
3k views

3D line plot in pgfplots

I have the following problem with pgfplots and \addplot3. I have a graph in [0,1]x[0,1] that should display a mesh plot and a line plot that traces a particular line across the mesh. The line plot is ...