{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

7
votes
1answer
1k views

tikzscale and histograms in pgfplots

Tikzscale is giving wrong results for histograms drawn in pgfplots. Histogram without scaling by tikzscale: Histogram after scaling: I have included a histogram from page 67 from pgfplots manual ...
5
votes
1answer
442 views

tikzpicture log-log histogram

I am trying to create a graph with TikZ similar to this image (link: http://www.flickr.com/photos/68902462@N08/8340520199/in/photostream) It is a histogram whose axes are in logarithmic scale. I ...
8
votes
2answers
805 views

sansmath functionality with fontspec

I always typeset bar plots (using the pgfplots package that uses math-mode for pgfplots labeling) with a sans serif font. Since I'm using LuaTeX I'm running into problems (see also Bar plots in sans ...
5
votes
1answer
1k views

pgfplots contour example error

I'm reproducing the following example from pgfplots manual. \begin{tikzpicture} \begin{axis}[view={0}{90}] \addplot3[contour gnuplot] {x*y}; \end{axis} \end{tikzpicture} But this code produces the ...
27
votes
2answers
456 views

Align nodes containing numbers on the decimal separators

In a plot, I have several vertically distributed nodes containing numbers with different numbers of digits before and after the decimal separator, and a trailing percent sign. I would like to align ...
13
votes
1answer
4k views

pgfplots bar plot: spacing inbetween bars

How can I increase the spacing between the bars in a bar plot from pgfplots? \documentclass{minimal} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} ...
1
vote
0answers
590 views

3D surface in pgfplots with given data [closed]

I am trying to make a 3D surface in pgfplots with input data. I am not able to get the expected graph. I would highly appreciate if you could point out to me what I am missing. ...
8
votes
1answer
294 views

pgfplots: non uniform line width for interrupted plot

I draw a graph, but the red line does not appear to have the same width everywhere. For instance, between [a,b] it looks like it's thicker. \documentclass{beamer} \usetheme{CambridgeUS} ...
20
votes
1answer
1k views

Consistant formatting with siunitx and pgf: Thousands Separator

I like the default behavior of the siunitx package in that the thousands separator is not applied to four digit numbers, but is applied when the number of digits exceeds four. In documents that ...
22
votes
1answer
5k views

pgfplots: Placing node on a specific x-position

I'm trying to put some arrows on the left and right side of the maximum of a curve. The arrows should point along the curve. My problem is that if I use the [pos=X] notation I don't know where I am in ...
4
votes
1answer
670 views

Bar overlapping in bar plot

I created this graph using pgfplots: As you can see, the bars overlap near 0. How can I solve the problem? MWE \documentclass[12pt,a4paper,twoside,openright]{book} \usepackage{tikz} ...
4
votes
0answers
380 views

Create bar graph wider [closed]

I created a bar graph using pgfplot and option ybar. I would get a graph wider. I used width option \documentclass[12pt,a4paper,twoside,openright]{book} \usepackage{tikz} ...
6
votes
1answer
815 views

blank 'ticks/axis' labels in pgfplot/Tikz plot

Very first time using LuaLatex and Tikz/PGF to generate plot of a function (I use it for directed graphs a lot, but not functions). Following MWE works pretty well, except that I want to prevent ...
4
votes
1answer
243 views

Colored fully bars in bar vertical plot

I created a plot with pgfplots using this snippet of code: \begin{figure}[htp] \centering \begin{tikzpicture} \begin{semilogxaxis}[ybar stacked,ymajorgrids=true] \addplot ...
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
1k 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
61 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
5k 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
3k 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
964 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
647 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
433 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
3k 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
2k 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
373 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
80 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 ...
6
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
1k 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
414 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
172 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
1k 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 ...
3
votes
1answer
1k 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
525 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
673 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
296 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
160 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
358 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
611 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
655 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
207 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 ...
5
votes
1answer
601 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
3k 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} % ...
3
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
212 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 ...
10
votes
1answer
3k 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 ...