{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

5
votes
1answer
107 views

Random decoration of plot axis messes up direction of axis arrow

I've been experimenting with "xkcdifying" a plot I want to make, based on the information found here and some pasting from other sources (this is my first time using pgfplots). Everything worked fine ...
1
vote
0answers
61 views

Proper referencing to programmatic nodes in pgfplots axis? (no shape is known, ill-formatted floating point number …)

This is going to be a slightly messy/unclear question, but here it goes. Basically, I want to work with a plot in pgfplots, where I want to also generate programmatically some nodes (maybe as result ...
3
votes
1answer
83 views

missing tick labels for symbolic coords in second plot

I am attempting to draw two plots in the same axis environment. Both plots use symbolic X coordinates (and symbolic Y coordinates) but X values that don't appear in the first plot will not make it ...
3
votes
1answer
130 views

How to draw density estimate on histogram by pgfplots?

I know how to draw a density histogram using pgfplots from this answer: Is it possible to "transform" a histogram into a density plot in pgfplots?. But how can I draw an estimate line on ...
3
votes
1answer
50 views

No scientific in ybar of pgfplots

I'm wondering how to disable scietific notation in lables of ybar. here is the tex code: \begin{axis} [width=6cm, height=6cm, yticklabel style={/pgf/number format/fixed}, ybar=5pt, ...
6
votes
0answers
79 views

Move a pgf plot, after its drawn, (on a layer) behind another plot in same axis? [closed]

I have already seen Filling path in pgfplot and pushing into background? - that doesn't help me much because it's simply about axis on top. I've also seen Why does pgfplots package cause tikz layer to ...
0
votes
0answers
16 views

Get (obtain/print/typeout) the width of a (standalone) pgfplot? [duplicate]

I'm using the tikz2pdf script, which I think internally uses the standalone class, to compile my tikz and pgfplots figures. Say, I have this simple example: \begin{tikzpicture} \begin{scope} ...
4
votes
3answers
181 views

Bessel function with pgfplots

I want to plot a vibrating membrane and therefor I need the bessel functions. As I'm using pgfplots, I wondered if there is anything pgf-related that can be used to create a corresponding output. I'm ...
4
votes
1answer
77 views

PGFplot Histogram with Large Amount of Data over a Long Time Span

I'd like to plot data files with multiple values per x-coordinate using pgfplots, ranging over the time span of a month (max. 31 days) per file. The problem is, that if I don't plot these values ...
3
votes
1answer
134 views

Automatically get (ymin,ymax) and (xmin,xmax) in pgfplots

I am plotting some 2D data from a file using pgfplots. Is it possible to automatically get (ymin,ymax) and (xmin,xmax) from the file I am trying to plot? I don't want to keep changing these each time ...
8
votes
2answers
277 views

Tikz: function and node's position

With the following code I am able to create three normal distributions with different means. Although the graph looks good, I have some problems in placing the nodes in the right coordinates. It is ...
4
votes
1answer
52 views

shader=faceted interp does not compile in Xelatex

I am using pgfplots \begin{figure} \centering \begin{tikzpicture} \begin{axis}[width=\linewidth] \addplot3[surf, mesh/cols=41,mesh/ordering=colwise,faceted color=black,shader=faceted ...
3
votes
1answer
40 views

Same ymin in loglogscale

I want to obtain the same y axis for multiple plots. Here is a MWE: \documentclass[preview=true]{standalone} \usepackage{pgfplots} \begin{document} \begin{preview} \begin{tikzpicture} \begin{axis}[ ...
28
votes
4answers
2k views

Draw somewhat random function

I am trying to reconstruct this image here I am not very happy with the code, as it uses hacking and adding white boxes and alike. My problem is now how do I draw the somewhat arbitary function in ...
9
votes
2answers
95 views

Creating a new environment containing a tikz environment

I would like to create a new environment in order to ease the process of making plots. It should be able to something like this: \begin{graph} \addplot [domain=-10:10, samples=1000]{x)}; \end{graph} ...
2
votes
2answers
57 views

y label is stuck on the right side of the graph

I try to get y label on the right side of the figure, but the label is still stuck on the left side. Below is an example borrowed from another user here. It must be something very simple, but just I ...
2
votes
1answer
39 views

Trouble including graphics from csv file into Pgftable, commands are dissapearing (local maybe?)

I've been trying to add eps graphics with the filename in a csv file. Take a look at the CSV to get an idea of what I mean: ...
4
votes
1answer
109 views

Ugly two ordinates plot

For some reason the plot generated from this code looks extremely ugly. The two series look like they were hand-painted. I thought the smooth property would help but still the same ugly plot. ...
5
votes
1answer
117 views

pgfplots import data from table with comma as decimal separator

I am trying to plot data from data files which are using the comma as decimal separator instead of a point (as is normal in SI style (French version): ...
4
votes
1answer
74 views

Trim axis left in style

Whytrim axis left doesn't work in style command ? \documentclass{article} \usepackage{tikz,pgfplots} \pgfplotsset{% compat=newest, axeseul/.style={% tick ...
2
votes
1answer
71 views

Can \draw .. controls .. be found in pgfplots?

I just want to use something like .. controls .. in an addplot command. Unfortunately, the option "smooth" does not produce the image I desire. I haven't found it in the manual so far. The reason I'm ...
6
votes
2answers
171 views

pgfplots: plot line between two coordinates from file

I basically have a tab separate file with about 100 rows. In each row, there are three values: A, B, and C. I want to loop through each row in the data file, and plot a line between the coordinates: ...
5
votes
1answer
191 views

Plotting multivariable functions with dependent variables in domain

Trying to plot a hyperboloid with domain x^2+y^2 <= 50. For now I have set the domain to [-5,5], but this yields ugly plots, see below. Any advice on how to get around this? I tried setting the ...
0
votes
0answers
46 views

Writing pgfplots macros that take coordinates as input

Is it possible to write macros for pgfplots that take coordinates as arguments. I want to use it like that: \begin{axis} \myMacro{(1 2 3)}; \end{axis} The goal is to write a macro that plots a ...
2
votes
0answers
99 views

Generating Gantt Charts for process scheduling

I am trying to create a gantt chart for my thesis on blocking analysis. I know of the pgfgantt package for generating gantt charts. But this package generates charts for normal schedules, what I need ...
3
votes
1answer
111 views

One axis in pgfplots

I try to make one axis exercices for students, thus I try to customize pgflots but I don't understand what append in this examples : \documentclass{article} ...
7
votes
2answers
289 views

Contour plot of arbitrary R^3 function without gnuplot

Is there a way to make pretty contour plots of arbitrary functions in R^3, like the one below for example, without the use of the gnuplot contour-stuff? The reason I'm asking is I prefer a simple ...
5
votes
2answers
194 views

special axis distribution

The bar chart below is what I have at the moment. As you see there is a huge difference between the y-values. I could use a logarithmic x-axis, but this is not readable for non-scientists. I want to ...
6
votes
2answers
232 views

How to draw the unit hyperbola in LaTex?

I want to make a graph of the unit hyperbola, but I'm not sure how to make it appear using pgfplots. Basically, what I'm using is this: \documentclass[12pt]{article} \usepackage{pgfplots} ...
4
votes
2answers
79 views

Custom Spacing on PGF legend

I'm trying to change the spacing of a single legend entry in a PGF bar plot. This is my MWE: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} ...
2
votes
0answers
78 views

Why does LaTeX impose a memory limit of 8,000,000 and can I circumvent it? [duplicate]

A few people have already asked the question of how to increase the maximum memory LaTeX is allowed to use (see here and here) because it is quite common for LaTeX to run out of memory when using, for ...
1
vote
0answers
45 views

Dimension too large with a small set of data

I'm trying to compile a simple tikz plot with floating point numbers, but I'm gettin a Dimension too large error. The tikz file works with a different data set, so I guess the problem has something to ...
5
votes
1answer
103 views

Plot mean of measurements with pgfplots

I have a file of measurements that I am planning to plot with pgfplots. There are multiple measurements for each input: Size Time 100 599.3 100 598.0 100 597.7 ...
8
votes
1answer
102 views

Local colormaps in global coordinate system

I am trying to get a surface graph with two colormaps. Instead of using the full Z range i want to give the first surface its own colormap and the second surface should receive its own colormap too ...
0
votes
0answers
70 views

How can I plot an implicit function in pgfplots without having to use gnuplot?

I have been trying to plot a couple of really simple implicit linear functions using only pgfplots internal facilities. Here is my MWE: \documentclass{article} \usepackage{pgfplots} ...
3
votes
1answer
101 views

Errors when plotting a bar chart

This is my crude attempt to create a graph from copied example. I want to plot the diseases on the Yy axis and QoL scores on x axis. It has resulted in errors. Could anyone be kind enough to point out ...
3
votes
2answers
84 views

Custom axis line location for PGFplots table with tikzpicture

I am trying to change the axis y line location from 0 to 100 from these questions (1, 2). Say that the error bars represent confidence intervals on percentage scale, so 100% is no difference. Here is ...
2
votes
0answers
61 views

pgfplots in beamer class with BaKoMa TeX

I have a problem concerning plotting of functions in beamer class with pgfplots. I use BaKoMa TeX. In the article class, all works fine, but switching to beamer, an error occurs as soon as ...
4
votes
1answer
111 views

2 axes scaling problem

I have two problems : the arrow on x axis. The left y axis does't match all the hight as the right does. I want on the left axe ymin=0 ymax=25 and the ticks lines in front of the tick lines of the ...
2
votes
0answers
71 views

tikz externalize and pgfmath error

Using external and \pgfmathdeclarefunction at the same time results in ! Illegal parameter number in definition of \pgfmathfloat@expression. ! Package PGF Math Error: Could not parse input '' as a ...
3
votes
1answer
96 views

How to keep the same mark colour when using meta data for marker size?

Probably an easy answer to this, but I can't get it to work, and I obviously don't understand the manual or the other answers given to similar questions here on tex.sx (see 1,2, and 3). Basically I ...
3
votes
1answer
73 views

Place several plots on one page

I have 4 plots that should be placed on the same page. Does anyone know how to do it? I need to have a caption/title under each plot (and I cannot place it above the plot as there are numbers), a ...
3
votes
1answer
102 views

\newcommand Tikz argument problem

I have this two commands to read x from y or y from x on a plot. The problem is that the label is 180:#3 with above position instread of #3 east position. The wish (less important) : how to merge ...
2
votes
0answers
67 views

Pgfplots: date range and integers as input data

I have a data table that looks something like: Week,value 2010-01-03 - 2010-01-09,0 2010-01-10 - 2010-01-16,0 2010-01-17 - 2010-01-23,0 2010-01-24 - 2010-01-30,0 2010-01-31 - 2010-02-06,0 2010-02-07 ...
2
votes
0answers
30 views

Legend for selected functions only [duplicate]

In my plot, there are 6-7 \addplot[] entries but I want legend for only one of those functions. How can I do that? I tried \addlegendentry after the function I wish to have a legend for but it creates ...
1
vote
1answer
66 views

Drop shadow of node with pgfplot inside

I have this code: \documentclass[tikz]{standalone} \usepackage{pgfplots} \usetikzlibrary{shadows} \begin{document} \begin{tikzpicture} \node[drop shadow,draw,fill=green] { \begin{tikzpicture} ...
4
votes
2answers
158 views

Bouncing ball over time

I have this clumsy code to plot the height of a bouncing ball over time. Is there a possibility for optimization? Perhaps writing the functions directly with the tikz math library? Also at the moment ...
2
votes
1answer
112 views

pgfplots: How to change color of boxplot?

How is it possible to change the color of a boxplot from pgfplots? Black would be wounderful! Here is an MWE: \documentclass{scrartcl} \usepackage{pgfplots} \usepgfplotslibrary{statistics} ...
4
votes
1answer
54 views

PgfPlots ybar and ybar stacked conflict

I have one document with 2 documents included. In the first document I have a pgfPlot with \pgfplotsset{ ybar stacked, ...etc } and in the second one \pgfplotsset{ ybar, ..etc }, but the first ...
2
votes
1answer
118 views

How to exclude negative values from plot of PGFPlots package?

I'm plotting bar plot using this code: \documentclass[tikz,12pt]{standalone} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english]{babel} ...