{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
512 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
595 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
373 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
653 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
370 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
226 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
546 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
361 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
435 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
226 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
397 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
575 views

Histogram fill with logarithmic scale

I face a "filling" problem when I run one of the pgfplots example but with y-log scale. Here is the MWE \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
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
262 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
126 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
440 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
657 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
570 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
344 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
843 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
532 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
809 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
729 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
56 views

Slightly move x- or y-axis tick label in pgfplots

In the MWE below, I'd like to move the x-axis labels slightly away from each other horizontally and the y-axis labels slightly away from each other vertically, to avoid overlapping. How can I do this? ...
3
votes
1answer
82 views

Center plot created with pgfplot from matlab

If I have a nice plot in matlab, then I save it as a tikz standalone file matlab2tikz('myimage.tikz','standalone',true) and I create a pdf in my terminal with pdflatex myimage.tikz to include ...
3
votes
1answer
57 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
50 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 ...
3
votes
1answer
53 views

How to refer to pgfplot legend labels with hyperref?

I would like to \refer to a pgf legend label in the caption of a figure (to explain symbols). I create my figures with externalization. Without the hyperref package, everything works fine. But as soon ...
3
votes
1answer
57 views

Omitt some xticklabels

I am currently reading some data from a CSV-file together with the xticklabels as one column from that file: \pgfplotstableread[col sep=comma]{data/test1_d4.csv}\dataTestOneFour \begin{figure}[ht] ...
3
votes
1answer
37 views

pgfplots and ifthenelse

To be honest, the following example not exactly works as I had expected. \documentclass{scrartcl} \usepackage{pgfplots} \pgfplotsset{compat=newest} % taken from ...
3
votes
1answer
116 views

Shading to indicate the solution set to a system of two linear inequalities in x and y

I am trying to show graphically the solution to the system of linear inequalities \begin{equation*} \begin{cases} 7x + 3y \geq 21 \\ -x + 3y < -3 \end{cases} . \end{equation*} There are some ...
3
votes
1answer
77 views

Draw grid lines for grouped bar chart/diagram

Me again.. I have a grouped bar chart and I would like to add vertical grid lines for each group because with a smaller width all bars are too close to each other making it hard to look at. My MWE: ...
3
votes
1answer
149 views

PGFplot multiple histograms using CSV file

I have tried to draw a comparative graph using histogram and taking data from different CSV source files. I can draw the two histograms but the resulting graph is not what I want: I don't want the two ...
3
votes
1answer
61 views

Interaction between “scope + shift” and “fill between” from pgfplots

I am trying to draw a picture using tikZ and pgfplots. The following is a minimized example of what I am doing. \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} ...
3
votes
2answers
46 views

tabular doesn't give two equally-size figures

I have produced two boxplots. Amplification.tex: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.8} \usepgfplotslibrary{statistics} \begin{document} \begin{tikzpicture} ...
3
votes
1answer
67 views

How can i print the label of a subfloat inside a TikZ node?

I'm laying out a few tikzpictures side by side (made with pgfplots, but I think it should not matter). I'm trying to use the subfig package to be able to reference single subfigures. Everything works ...
3
votes
2answers
111 views

Not able to plot a parabola

I am making a multiple choice problem. (Here, I display two of the choices.) I am trying to plot parabolas using pgfplots. Why is TikZ not compiling my code? I put a % in front of the parabolas ...
3
votes
1answer
100 views

Set limits of colormap in pgfplots [duplicate]

I am plotting three surf plots in a groupplot environment with pgfplots. For the third groupplot, I have enabled the colorbar. I would like the colorbar to represent all three plots, so equal z values ...
3
votes
2answers
178 views

fontawesome scaling, deedy-resume pgfplots axis, XeTeX, LuaTeX issues

I am currently working on a document using the deedy-resume template http://www.latextemplates.com/template/deedy-resume-cv in LaTeX and I have two issues which result in a dilemma and I can't ...
3
votes
1answer
77 views

How does PGFplots calculate trig functions?

In plotting the graph from my last question I have discovered that the plots I'm getting from PGFplots are not entirely correct. I was attempting to plot (4.9/(w^2))*(cosh(w*x)-cos(w*x)) for multiple ...