{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

3
votes
1answer
630 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
95 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}[ ...
3
votes
1answer
603 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
1answer
60 views

calling an expression in the document in pgfplot

Say I have the following function which I would like to plot. $S(z)=\frac{p.(\alpha_H+z.\alpha_W)}{p.(\alpha_H+z.\alpha_W)+\beta_H+z.\beta_W}$ While I could specify it in the \addplot command, I ...
3
votes
1answer
204 views

filter coordinates for specific \addplot

I want to use \addplot twice and I want to filter the x values in one of them. However, x filter/.code={...} goes into the axis options and thus is applied to all \addplots. How can I select a ...
3
votes
1answer
335 views

Cyrillic text in symbolic x coords

I make bar plot with pgfplots: \documentclass{report} \usepackage[T2A]{fontenc} % Поддержка русских букв \usepackage[utf8]{inputenc} % Кодировка utf8 \usepackage[english, russian]{babel} % Языки: ...
3
votes
1answer
292 views

pgfplots - how to draw seconds from csv in hours:minute format?

I have data in a .csv file with seconds as x values. I'd like to tick the x axis in hours:minute formate e.g.: 0:00 , 0:30 , 1:00 , 1:30 ... How do I have to redefine the interpretation of values to ...
3
votes
2answers
279 views

Plot from scratch (without explicit data)

I'm trying to draw a plot which I've been given in a scan: What is the correct way to plot a custom shaped curve --- a freehand tool counterpart. I used quick curve but it's hard to tell extremum ...
3
votes
1answer
621 views

Plot with Min/Max bar and two average points

I am trying to stop using Excel charts in my academic papers and rather use something more LaTeX integrated such as Tikz. My current Excel chart looks like that: As can be seen, any combination from ...
3
votes
1answer
365 views

Pgf plots and a tabular legend

I have a plot where I want to add a legend which is the combination of lines and marks. For that I want to replace (or define a new) the original pgf plots legend type. As said before, in the ...
3
votes
1answer
149 views

Missing pictures when using pgfplots

When preparing an article I came across with a strange problem. To draw graphs I use pgfplots. Like here: \documentclass[twoside,11pt,a4paper]{article} \usepackage{daiostyle} \usepackage[all]{xy} ...
3
votes
1answer
265 views

Nested loops and conditionals in pgfplots

I have trouble in using nested loops and conditionals in pgfplots. I'm familiar with the \foreach and \ifthenelse commands, but do not work well with pgfplots. For example, in the following I want to ...
3
votes
1answer
908 views

Plot alignment using groupplot in pgfplots

I am using the groupplots library in pgfplots to create plot groupings. I am using the 2x2 sizing but only have 3 plots. How can I center the furthest right plot vertically, to make a triangle rather ...
3
votes
1answer
266 views

pgfplots memory overload

I want to plot 5x9000+ data points. I am already using: \usepgfplotslibrary{external} \tikzexternalize and -shell-escape -enable-write18 in PDFLatex. However, I still get the memory error. I ...
3
votes
1answer
153 views

Persistent “hanging” tick label

I have sort of a strange problem. I produced a 3x2 plot array in Matlab, and removed all of the y-axis tick labels. The relevant code (for the problematic plot) is below \begin{tikzpicture} ...
3
votes
1answer
345 views

pgfplots custom axis scaling function

If I have a data set in which most of the interesting stuff happens for small values of x then I can use \begin{semilogxaxis} ... \end{semilogxaxis} to create a plot with a logarithmic x axis, which ...
3
votes
1answer
511 views

tikz plot change one value of x axis

I'm not so familiar with tikz plot. The plot looks actually like it should, but I would like to change the last position value 300 to n in the plot. Is this possible ? \documentclass[]{article} ...
3
votes
2answers
587 views

LaTeX - PGF groupplot - polar axis

I can't find the answer anywhere, is it [and how] possible to make a group plot of multiple polar graphs? For grouping, I use pgf.groupplot library, for polar axis, I use \begin{polaraxis} from pgf ...
3
votes
1answer
370 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 ...
3
votes
2answers
635 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
365 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
224 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
526 views

How to draw the outlines of a patch in pgfplots?

In pgfplots the patch plot library allows to basically draw 3D bezier planes easily. This is very helpful if the exact mathematical form of a plane is not known or not important. What I have not ...
3
votes
1answer
351 views

problems with pgfplots/ymax

I have two figures that I'd like to connect; both are generated with pgfplots (and in this example, gnuplot). The following works exactly as expected: \documentclass{beamer} \usepackage{graphicx} ...
3
votes
2answers
1k views

Distance of the labels from the axis

I am a beginner with the package TikZ. I am using pgfplots to produce a very simple plot. The code I am using has been copied from an example found on the web, but my output is different from the ...
3
votes
2answers
425 views

How to reference an axis label, e.g. xlabel

I'm new to that forum but it already helped a lot, thanks for this! But now I really got stuck. Basically I'm looking for a possiblity to reference the xlabel of an axis in a TikZ picture. The ...
3
votes
1answer
224 views

Odd result in pgfplots when scale and set layers is used together

I have a problem when I use scale and set layers in pgfplots. I have to use set layers because I want that several curves in one plot are above each other (that is not really visible in my example ...
3
votes
1answer
382 views

Pgfplots graphics tick label positioning issue with latex->dvi (but not with pdflatex->pdf)

I'm trying to plot an image file in a pdfplots axis. This is a minimal example (the files fig2a.eps and fig2a.png both contain the image that should be plotted): \documentclass{standalone} ...
3
votes
1answer
140 views

increase length of a \node option and change its color

I would like to increase the vertical length of a node in a way that it can also stretch outside of my image. Moreover, I need to choose different color for each line. \documentclass{article} ...
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) ...
3
votes
1answer
1k views

PGFplots and boxplots: How to tune width and separation of boxes?

I would like to use pgfplots to draw boxplots. This minimal example works fine for me. But I would like to display more data in this form \begin{filecontents}{testdata.dat} 0 1 1.2 0.4 1.5 0.2 1 2 ...
3
votes
1answer
258 views

setting z-limit on surfplot in PGFplots

I am making a 3D surfplot in pgfplots, and my situation is described by the following MWE: \documentclass{article} \usepackage[ansinew]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath, amsthm, ...
3
votes
2answers
125 views

What is an appropriate way of plotting a number as a function of year?

I am trying to plot a certain number as a function of year for different entities. In this example, it is the number of missions to the Moon for different agencies per year. What I have come up with ...
3
votes
1answer
1k views

Problem with subfig and pgfplots' graphs

I have a problem with the subfigenvironment. My two graphs created with pgfplots are too large to stay together. How can I fix that? % Graphique \begin{figure} \centering \subfloat[]{$\tau = ...
3
votes
1answer
436 views

Use symbols with \label and \ref in custom legend

I would like to build a legend entry that refers to two simultaneous plots, because it is more intuitive to do so. I use \label and \ref to refer to the plot symbols, but they are shifted in the ...
3
votes
1answer
151 views

y axis mark disconnected from axis after shifting upwards

as you can see I have shifted up the second axis. However I would like to fix the zero as it has been disconnected from the y axis. \begin{tikzpicture}[scale=1.5] \begin{axis}[ date coordinates ...
3
votes
1answer
651 views

How to plot coordinate between two xticks?

I want to plot some data using pgfplot. Here is a code I have written: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat = 1.3} \begin{document} \begin{tikzpicture} \begin{axis}[ ...
3
votes
1answer
189 views

Use BPchem Numbering As Labels in a PGFPlot

So, I yanked this example right from the manual on pgfplots, because this looks highly complex. The graph is exactly what I want to have, except instead of the custom labels it provided, I want to be ...
3
votes
1answer
1k views

tikz externalization and multiple axis using \ref and \label for legendentry

I have a plot consisting of two y-axis. When I'm adding the legendentries in each axis environment, the first legendentry will be plotted "behind" the plot of the second axis. Thus I thought a ...
3
votes
1answer
569 views

TikZ: plot datapoints with bars

I'm currently generating data files which have points as follows 5 1 3 2 2 1.4 ... Each line 2 values of which the first is indicating the time and the second some value. I'm currently (as I'm ...
3
votes
1answer
245 views

PGFPlots: convert the filling of the bars

How can convert the filling of the bars from horizontal to vertical ? \documentclass[border=0.5mm,12pt]{standalone} \usepackage{pgfplots,pgfplotstable} % Grafici \pgfplotsset{% ...
3
votes
1answer
341 views

Tikz : column header in groupplot legend with a loop

I'm trying to plot some data using loops, but i've some issues when I try to extract the column header and have it as a sub legend. Does anyone have any idea to fix it up ? \documentclass{minimal} ...
3
votes
1answer
834 views

How to scale y axis and position labels in xbar plot

I have the following xbar plot. I have two problems: 1) to see all the bars I have to do "enlarge y limits = X", where X is found by trial and error. This seems to result in the bars not being ...
3
votes
2answers
526 views

Can't use \pgfmathdeclarefunction even though I use package pgfplots? [duplicate]

Possible Duplicate: How do I use pgfmathdeclarefunction to create define a new pgf function? I'm running the simple code: \documentclass{minimal} \usepackage{pgfplots} ...
3
votes
2answers
1k views

pgfplots function which touches the edges of the plot

I need to plot the constant y = pi function with the plot touching both sides of the plot. I have had a search through the pgfplots manual without much luck. I have tried \addplot{3.141...} which ...
3
votes
1answer
1k views

3D plots with pgfplots

I am trying to plot 3D plots with pgfplots. I have started with an example from documentation: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{pgfplots} % ...
3
votes
1answer
804 views

Debugging Advice: TeX Capacity Exceeded with TeXLive2011 (but not with TeXLive2010)

I have a feeling that this is going to be rather embarrassing when I eventually get to the bottom of this problem, but since I have been struggling with this for some time I am posting this question ...
3
votes
1answer
719 views

When using pgfmathparse to offset plots, how can I remove the extra tick?

I plot a few data sets into the same chart using pgfplot and I therefore use \pgfmathparse to offset every plot a bit to the left or the right. I found out that the first plot will always be the ...
3
votes
1answer
49 views

Showing legend for boxplot in pgfplots

I am trying to display a legend for a boxplot created in pgfplots. However the size of the legend is almost as large as the plot and covers up all of my plot, how do I fix this? ...
3
votes
1answer
47 views

How do I change the font size of the labels along the axes in pgfplots [using scaling]?

This is a continuation of a question that was asked and 'answered' here: How do I change the font size of the labels along the axes in pgfplots?. The suggested answers all involved using LaTeX's ...