{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.
3
votes
1answer
95 views
get max/min value in a table column with pgfplot
I'd like to get the max/min value from a specific column table via function \findmax and \findmin in order to use it in ymin and ymax.
I really dont get how \pgfplotstablesort function works. What ...
5
votes
2answers
281 views
TikZ Function Number Too Big
I want to draw two beta distributions comparing a prior and posterior distribution but it seems that the coefficients are too large for LaTeX? How do I fix it without changing the function? It has a ...
11
votes
5answers
290 views
Create image from statistical data automatically
I am looking for a way to automatically create images like the one below:
There is no MWE because all I have, for now, is this image (created, I believe, by SPSS, but I have nothing to do with that ...
2
votes
0answers
79 views
Pgfplots: How to make the plot exceed the axes
I am plotting a spike using pgfplots. I want to make the y-axis until (4) only. However I want the plot of the spike itself to continue beyond the y-axis (say until 10).
Is there a possible way to do ...
3
votes
1answer
86 views
How to fill a rectangle with two corners on the function
I would like to be able to apply the same thing in the following figure for any function:
Right now my code is like this(which is an edited version of some post here in Tex.sx):
Wich only fills ...
4
votes
2answers
76 views
How to align two plots horizontally
I want to align these two plots horizontally:
\begin{tikzpicture}
\begin{axis}[
xmin=1995,
xmax=2010,
ymode=log,
xtick={1975,1980,...,2015},
...
3
votes
0answers
86 views
How to autoscale a horizontal barchart (pgfplots)
I need to export statistics from a database into PDF files, with a program. The database contains several tests and they need to be displayed as barcharts. Here is an example:
The problem is clear: ...
4
votes
1answer
107 views
Plotting the frequency bandwidth
I do not have almost any experience with pgfplot and I am having some problems with something which seemed really easy.
What I want to do is filling the area between a function and two vertical ...
7
votes
1answer
135 views
How to avoid connecting discontinuities in graphs when plotting data?
I would like to plot a graph that has a discontinuity in the sense that it jumps from 180 degree to -180 degree at one point. Unfortunately, the points at 180 and -180 get connected. See the figures ...
2
votes
0answers
92 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}
...
4
votes
1answer
90 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 ...
1
vote
1answer
85 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
148 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:
...
3
votes
0answers
92 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
213 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
49 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
63 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})]
...
12
votes
2answers
165 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
1answer
89 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
57 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
67 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
...
2
votes
1answer
68 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
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:
...
3
votes
1answer
98 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:
...
3
votes
1answer
74 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 ...
6
votes
2answers
244 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 ...
2
votes
1answer
163 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
49 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?
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:
...
11
votes
1answer
341 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 ...
3
votes
0answers
138 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. ...
6
votes
1answer
92 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
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 ...
7
votes
2answers
145 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
97 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
108 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
90 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?
9
votes
3answers
159 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)};
...
3
votes
1answer
114 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
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 ...
2
votes
0answers
132 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 ...
20
votes
3answers
504 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
189 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
213 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.
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:
...
6
votes
1answer
102 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
119 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
78 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 ...
5
votes
1answer
120 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 ...





