{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.
4
votes
1answer
93 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 ...
6
votes
2answers
248 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 ...
12
votes
2answers
167 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 ...
2
votes
0answers
93 views
Stacked bargraph nodes near coords too bunched up vertically tikz
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}
...
1
vote
1answer
87 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 ...
8
votes
1answer
392 views
TikZ datavisualization or pgfplots?
I want to create a few plots that should have the same style as my main document and it seems tikz is more than capable of achieving that.
Now while browsing the current tikz documentation (2.10 ...
3
votes
0answers
94 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 ...
3
votes
0answers
221 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
50 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 ...
4
votes
1answer
82 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 ...
4
votes
1answer
125 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:
...
0
votes
1answer
66 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})]
...
2
votes
1answer
92 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 ...
5
votes
1answer
63 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
68 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
...
3
votes
1answer
74 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 ...
3
votes
1answer
106 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:
...
4
votes
1answer
37 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:
...
2
votes
1answer
171 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, ...
3
votes
1answer
77 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 ...
3
votes
0answers
139 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. ...
1
vote
0answers
50 views
Import external eps into pgfplot
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?
6
votes
1answer
96 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 ...
7
votes
2answers
146 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 ...
4
votes
1answer
96 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 ...
5
votes
1answer
495 views
How to make a pgfplots stacked xbar plot with bar-“explicit meta” labels computed from input table data
I am making a pgfplots stacked xbar plot where each bar has a distinct
label, in addition to a numeric bar length. Each pair of bars also
has a common label. I would like to mark each bar with its ...
3
votes
1answer
98 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 ...
20
votes
3answers
508 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 ...
3
votes
1answer
112 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}
...
4
votes
0answers
92 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?
11
votes
1answer
177 views
Place point on helix
Pasted below is a helix created with PGFPlots package and now I need to add points to a helix. What I was able to get so far is pasted below. I also included a figure depicting desired output I ...
9
votes
3answers
162 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)};
...
5
votes
1answer
81 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
68 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 ...
3
votes
1answer
116 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 ...
2
votes
0answers
133 views
How do I replace an XYZ coordinate system on an already available plot?
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 ...
3
votes
2answers
86 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:
...
2
votes
1answer
194 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 ...
11
votes
2answers
215 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.
6
votes
1answer
104 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}
...
4
votes
2answers
121 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 ...
5
votes
1answer
122 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 ...
3
votes
1answer
228 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 ...
5
votes
1answer
253 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
...
7
votes
1answer
152 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 ...
0
votes
1answer
154 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 ...
3
votes
0answers
170 views
Matlab2tikz adds extra legend entries
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 ...
2
votes
1answer
224 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 ...
2
votes
0answers
72 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 ...
3
votes
1answer
88 views
Problem with snake ticks in pgfplots for bell shaped normal distribution
I want to draw two sided created region for normal distribution (see figure below). I have issue with snake ticks proper alignment and area looks suspicious to me. Am I missing something here? Any ...



