{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

8
votes
1answer
1k views

Pgfplots contour gnuplot crazy labels

This is driving me mad. I am tryng to create some contour plots, but I get them full of labels, so that they are unreadable! I can't even see the lines or read the values because they are too much. I ...
1
vote
1answer
97 views

Specifying ymin in pgfplots misalignes images vertically [closed]

I have two plots drawn with the \pgfplots package. In one of them, I specified that ymin=0 when I created the axis since the plotted curve never goes below y=0 (otherwise something like ymin=-0.2 ...
6
votes
1answer
950 views

Scaled ticks with ymin and ymax

For a publication I am preparing multiple plots with PGFPlots and would like to have them all look alike, i.e. having the same axis and identical ticks. For this I intended to use ymin and ymax, but ...
1
vote
0answers
58 views

fix position legend in pgfplot [duplicate]

Possible Duplicate: Put legend (pgfplots) below the plot I'm trying to set correctly the right position of the legend of my plot. I would have the legend just bottom right of my plot. Any ...
19
votes
2answers
4k views

Remove border on pgfplot

I'm drawing a graph with pgfplot. The values aren't important, I just want to show the shape of the function and so I don't want a border around my graph. I can't find how to remove/change the color ...
8
votes
3answers
2k views

How to coherently combine 3D and contour plots with pgfplots

Both contour and 3d plots can be done easily in pgfplots, but I have a hard time combining them nicely. Here's an example of what I'd like to achieve (from the matplotlib examples):
29
votes
1answer
873 views

Polar histograms

I recently stumbled upon this post, that explains how to make polar histogramms with R. An improved version of R-package can be found here. Even though it looks unfamiliar, the result of is quite nice ...
6
votes
2answers
606 views

Wrong pgfplots plot for function with vertical asymptote

I want to plot the function $\frac{3 x}{1 + x}$ with pgfplots. Using \begin{tikzpicture} \begin{axis}[axis x line=none, axis y line=none, no markers] \addplot {3 * x / (1 + x)}; ...
2
votes
1answer
399 views

Footnote on graph title

I'd like to add a footnote to the graph title. After adding the footnote, it disappears! Here is my MWE: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \pagestyle{empty} ...
9
votes
2answers
2k views

pgfplots with percentage on the axis

I am trying to draw a graph with percentage in x-axis and categories on y-axis. I cannot make the graph to show % sign. Here is my MWE: \documentclass{article} \usepackage{pgfplots} ...
0
votes
0answers
70 views

Configuring Decimal Separator in pgfplots [duplicate]

Possible Duplicate: number format in pgfplots axis I'm using pgfplots package to create graphs. I would set up the decimal pointer. As default comma , is set up. I would have the point . ...
2
votes
0answers
1k views

Installing pgfplots package on Mac OS Lion [closed]

I was wondering if I can get help on installation of pgfplots package on Mac OS Lion for LaTeX. I have downloaded a zip file from pgfplots download link but don't really know how to install it. I also ...
2
votes
0answers
324 views

Error on grouping level [closed]

I'm trying to create a graph from a big file with pgfplots. This is the code I use: \begin{figure} \makebox[\textwidth][c]{ \subfloat[] { ...
4
votes
0answers
78 views

LaTex Pgfplots Two axes 1 legend [duplicate]

Possible Duplicate: Using a pgfplots-style legend in a plain-old tikzpicture I'm trying to accomplish this: I have a plot with two y-axes. The first y has two plots, the second has one. I ...
5
votes
2answers
3k views

Using pgfplots, add vertical/horizontal spacing between plots?

I once already asked a very similar question; How can I add space between two separate plots, using pgfplots?. But this is some what different. I have the following code; \documentclass{standalone} ...
2
votes
0answers
952 views

“Fatal error” when using TikZ externalize [closed]

So I'm having problems with TikzExternalize. I have a paper with a large amount of dynamically built graphs. I get to a certain point in my files and I can't build anymore. Once I get to this point I ...
3
votes
1answer
391 views

pgfplots: drawing areas from a table starting “above” an axis

Please let me explain the motivation behind this a bit more broadly. I'd like to draw measured benchmark values as follows: background/nothing between the x-axis and the minimum value a green area ...
4
votes
1answer
163 views

curve doesn't follow the point

I created this graph using pgfplot package. Here it is the code I used: \begin{figure}[htp] \centering \begin{tikzpicture} \begin{semilogxaxis}[xmin=1e-06,xmax=1e-01,xlabel=packet ...
3
votes
0answers
934 views

Bode plot : any good alternative to bodegraph [closed]

I'm wondering if there is any alternative to "bodegraph" for plotting bode graph with latex. Especially I would ideally be looking for something easy to run (avoid external computation like with ...
2
votes
1answer
995 views

pgfplots and log scale: bars starting from the bottom of the screeen

The following MWE \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ybar,ymode = log] \addplot coordinates{ (1,1e-15) (2,1e-14) ...
6
votes
1answer
2k views

create scatter plot from dat file

I would create a scatter plot using pgfplots using data from my dat file that contains this data: nodes x y label 1.0000 14.1209 7.0332 a 2.0000 0.6367 16.6166 a ...
3
votes
1answer
468 views

set domain in pgfplots

I created this graph. The graph is shown correctly but I need the range on the y-axis to be from 10e-8 to 1. I would also like a grid. I'm a newbie with the pgfplots package. \begin{figure}[htp] ...
9
votes
1answer
605 views

pgfplots - Show both absolute and relative value

In my plot I am trying to show the relative value next to the absolute values. For instance, for the rightmost column, I would like it to say 110 right below 9.02*10^6. Another option would be an axis ...
5
votes
1answer
216 views

How can I increase spaces between ticks, make the first tick nearer the the axis and remove empty spaces from a pgfplot?

The question title explains it all, my plot isn't looking nice. I want to increase the spacing between each xtick, make the first xtick nearer the y axis and remove that space with no x ticks on the ...
13
votes
2answers
2k views

Stacked bar plots with several descriptive nodes

I have a stacked bar plot where I would like to display additional information for each bar—besides their cumulative values. This information should include the non-cumulative values and the ...
2
votes
0answers
149 views

How can I adjust the width of legend images in PGFPlots? [closed]

I am using pgfplots to create charts. How can I adjust the width of images of legend entries? I have adjusted plot coordinates in legend image code in the line legend style, but this not worked ...
2
votes
0answers
326 views

Tikz - Using calculated coordinates inside the plot function [closed]

I'm wondering if its possible to use calculated coordinates inside the function plot, somehow like this: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc, positioning} ...
19
votes
1answer
578 views

GitHub-like punchcard with the help of pgfplots

Is it possible to create a punchcard so it will look like the same on GitHub with the help of pgfplots? The data stored in punchcard.dat: 0 Monday 18 1 Monday 67 2 Monday 62 <hour> <day> ...
7
votes
1answer
587 views

Incorrect parametric pgfplot

I know that the equations (t-sin t, 1-cos t) define a cycloid that looks like this: However the code \begin{tikzpicture} \begin{axis}[title={Ciklois}, no markers] \addplot[variable=\t, ...
0
votes
1answer
191 views

Align right in table if no expression

I am using pgfplotstabletypset to read in a table -- I want all cells in the first column with the expression Factor in them to be aligned to the left and bolded, and I want all cells without that ...
4
votes
1answer
477 views

TikZ Externalize: Referenced legends from PGFPlots are not included

The following MWE without TikZ externalization works. However, the legend at the bottom is lost with externalization. Since the \ref in this example does not refer to anything outside tikzpicture ...
11
votes
1answer
2k views

PGFPlots: Change the color of axis lines

I want to change the color of the axis lines only without changing the color of the axis labels, tick labels etc. MWE: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} % ...
2
votes
1answer
2k views

matlab2tikz for surf plots: reducing data?

I was really happy to see that matlab2tikz also supports surf plots. Unfortunately, it produces too much data, so I run into the well-known memory problem. I tried compiling with lualatex instead of ...
3
votes
1answer
190 views

Using foreach to generate computed indices in a plot

I have a table with 8 columns, and I want to generate 4 plots (1 vs 0, 3 vs 2, 5 vs 4, and 7 vs 6). I was going to use foreach to generate the plots using \begin{tikzpicture} \begin{axis} \foreach \x ...
9
votes
1answer
2k views

Creating two filled plots that overlap with transparency

I'm using pgfplots to plot two filled curves. I'd like them to overlap transparently so that the "lower" figure can be seen through the "upper one". Using the forget style mode will draw the first ...
6
votes
1answer
132 views

Plot labels all move to the same position

I am attempting to create plot labels whose positions are determined by a function. The root problem is that the labels do not stay where they are placed, but all of the them move to the position of ...
9
votes
1answer
309 views

add noise to piecewise constant function

Is it possible to add noise to the following function, which is piecewise constant? Data: time energy 0 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 ...
2
votes
0answers
162 views

Strange behaviour of pin angles with PGFPlots [duplicate]

Possible Duplicate: How can I force TikZ pin angle? TikZ node pin angle in 2D plot I need to have some marks in a diagram pointing at characteristic points of the plot. To not have the ...
13
votes
1answer
3k views

Custom Dashed Plot Lines in PGFPLots

I know that you can make a dashed line in pgfplots using the \addplot[dashed] option. However, the line that produces isn't dashed the way I'd like. I found \pgfsetdash in the documentation for ...
6
votes
1answer
652 views

2d graphs in a 3d plot

I am trying to create 3d plots with several 2d graphs, like in Plotting several 2d functions in a 3d graph. However the end result looks like this: Using \closedcycle doesn't help either, as it ...
22
votes
3answers
3k views

How can I make plots with TikZ which look like the new Mathematica 9 plots

The new Mathematica 9 is out! I would love to know how to make similar plots to the one's advertized, particularly the following: and Here is a simple plot to get started. %& -shell-escape ...
5
votes
1answer
304 views

Some issues concerning a plot created as a `tikzpicture`

The above tikzpictureplot was created mainly adapting the code of Create xkcd style diagram in TeX . I located the dots and labels by trial and error. What are the better options? To create the ...
5
votes
1answer
868 views

Line in front of marks

I am creating plots that contain a LOT of data points, and each plot also includes a line that is independent but coincident with those points. The problem is that the marks get in front of the ...
6
votes
1answer
1k views

'only marks' option breaking cycle lists

I am trying to create a series of plots where data is presented with fitted curves, so what I need is for the data plots to be scatter plots with hollow marks and the fits to be solid lines with no ...
4
votes
1answer
994 views

PgfPlot: Axis Arrows vs Vector Arrows

I've notice that the arrowheads on the axis are different than the arrowheads drawn when drawing vectors: \documentclass{article} \usepackage{pgfplots}\pgfplotsset{compat=1.7} \begin{document} ...
17
votes
1answer
2k views

Simpler boxplots in pgfplots - is this possible?

When I wanted to plot boxplots in pgfplots, I started using the solution proposed by Jake in the question linked to above. However, as I wanted to plot more than one set of boxplots in the same figure ...
2
votes
1answer
128 views

How to change to dotted style

How to change the line style to line style with different line style such that people need not to have a color printer to view it? \pgfplotsset{mystyle/.style={mark=none}} \begin{tikzpicture} ...
7
votes
1answer
637 views

pgfplots: labels and width issues in non-boxed 3d plot with oblique projection

Update april 2013 The bug has been fixed with pgfplots version 1.8 (requires \pgfplotsset{compat=1.8}). When I try to add the axes labels to this code, I get a division by zero error. I think the ...
3
votes
1answer
711 views

How to draw a dashed line with *-mark + error marks + a line in foreground in the same plot with pgfplots?

I create a plot with pgfplots with the following code: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.6} \begin{filecontents}{ExampleData.txt} xValue1 ...
4
votes
1answer
355 views

Filling “symbolic y coords” automatically with the content of a table row

Is it possible to fill “symbolic y coords” automatically with the content of a table row? I have many data to plot and it would be very cumbersome and laborious to do it manually. Best regards ...