{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

2
votes
1answer
223 views

Pgfplot axis and axis label cutomization

Well, simply, my code gives the graph below. But what I want is something like Fig. 30 (p. 56, Advanced Engineering Mathematics, 9th Ed. by Irvine Kreszig). \ssfamily font for the tick label, ...
2
votes
1answer
128 views

How the plot in \groupplot could be moved horizontally and vertically?

This is my code: \documentclass[tikz,12pt]{standalone} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{mathptmx} \usetikzlibrary{pgfplots.groupplots} ...
2
votes
1answer
157 views

particular prominent yticklabels

Since the paraview legends look horrible when they appear inside a latex document, I want to replace them using Python's matplotlib and Nico's matplotlib2tikz package. So I have compiled a python ...
2
votes
1answer
182 views

PGF Plot correlation table shade negative/ positive values gradient

I am trying to extend the results from Parametrize shading in table through TikZ for negative values. I searched extensively for the absolute value function but could not find one. I tried abs(), but ...
2
votes
2answers
372 views

pgfplots surf plot: don't draw 'NaN'

I generated a checkerboard style suface plot using matlab2tikz. The data contains nan (not a number) values. I want the squares of nan values to be white (as in matlab). When I compile, I get the ...
2
votes
1answer
114 views

Macro for pgfplot cycle list entry

I'm trying to define multiple cycle lists based on macro variables. The reason for this is that I need more than one list and I want to be able to change the appearance quickly while keeping the ...
2
votes
1answer
123 views

pgfplots addplot 'domain' option overwrites/collides with axis 'domain' option

I have a problem with domain specification in addplot which collides with domain specification in axis. The code below plots the x axis as well as the function (expo) from 0.1 to 2. My desired ...
2
votes
1answer
91 views

Math-type in y-label repeating; ghost line appearing

When I run the below code, my intended graph is created but with two issues: there is an odd grey line at the bottom which I can't track down and delete the math type from the y-label is repeated ...
2
votes
2answers
295 views

Reducing space in pgfplots xtick label number format?

With the following MWE: \documentclass{standalone} \usepackage{pgfplots} \usepackage{tikz} \usetikzlibrary{intersections} %% named intersections \usetikzlibrary{fit} \usetikzlibrary{calc} ...
2
votes
1answer
312 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} ...
2
votes
1answer
185 views

How to define optional arguments for custom pgfplots style

I see from other question that it is possible to create styles with parameters. Like \pgfplotsset{ custom style/.style 2 args{ % code that uses #1 and #2 } } However, I can't find a way of ...
2
votes
1answer
119 views

Disable decoration for pgfplot nested in tikzpicture

I have the following MWE: \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations,decorations.pathmorphing} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \begin{document} ...
2
votes
1answer
304 views

Label functions generated with gnuplot in pgfplots

I would like to generate four hyperbolas in the plane and label them. I'm using the following code (sorry for its length, feel free to shorten it...): \documentclass{standalone} \usepackage{pgfplots} ...
2
votes
1answer
171 views

Adding extra ticks based on sum of ybar stacked

I am trying to add minor yticks on my axis based on the end values of a ybar stacked plot. Here is where I'm at: \documentclass[tikz]{standalone} \usepackage{pgfplotstable} \pgfplotstableread{ Year ...
2
votes
2answers
4k views

Install packages in texworks missing style files

So I am trying to install the pgfplots package in LaTeX on my Windows 7 machine. I usually did this by just running the LaTeX file with \usepackage{pgfplots}, and then the computer asks me if I want ...
2
votes
1answer
379 views

legend in Unequal upper and lower deviation in PGFplots error bar!

I want to set different lower and upper deviations for error bars. It seems that PGFplots does not support unequal +,- error bar length. I have come up with a solution, that is to draw + and - error ...
2
votes
1answer
333 views

tikzpictures positioning

I am having trouble trying to position tikzpictures in their correct position... I want to place the 3 plots with the green filling in a single line above (with the alpha/2 right below), and the 3 ...
2
votes
1answer
193 views

axis lines=middle and axis lines=center

Is there a difference between axis lines=middle and axis lines=center options in pgfplots?
2
votes
1answer
89 views

Boxed pgfplots reference in the text

I want to make a reference to a pgfplots graph in the text. The reference should be surrounded by a small box. I have tried several things but it always looks ugly. How can I vertically align the ...
2
votes
1answer
365 views

How to shift yticklabels vertically?

When plotting data matrices as done here and here, the tick labels get drawn at the border of fields. They should be drawn in the center. I've tried shifting them using hspace and vspace. This works ...
2
votes
1answer
188 views

Softsign derivative 1/(1+abs(x))^2 not drawn correctly at the 2009 latexlive version tikz, pgfplots

I want to draw 1/(1+abs(x))^2 in tikz. At home I have the new latexlive version installed and everything looks fine. At work I do not have the new latex version because Ubuntu 12.04 still includes the ...
2
votes
2answers
681 views

TikZ & PGFPlots: adding a TikZ 3d axis into a pgfplot

\documentclass[tikz]{standalone} \usepackage{tikz-3dplot} \usepackage{pgfplots} \pgfplotsset{compat = 1.8} \begin{document} \tdplotsetmaincoords{60}{130} \begin{tikzpicture}[tdplot_main_coords] ...
2
votes
1answer
956 views

Axis font size in pgf plots when using a large set of data

I am trying to plot a large set of data from a .dat file. The following is my code. I can plot the data using this code. But, I am not able to increase the size of the fonts used in the axis labels ...
2
votes
1answer
628 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 ...
2
votes
1answer
147 views

Why doesn't standalone accept my build={} package option?

I frequently use standalone to incorporate tikz images in my documents. I have some really large tikz plots which I would like to include in my beamer presentation, but I am getting "Tex capacity ...
2
votes
1answer
197 views

Patchplots not working recently?

While modifying some images that I created using the patchplots library from pgfplots I noted that the actual colors inside the axis are missing (I had not touched these images for a few weeks and ...
2
votes
1answer
83 views

StrSubstitute not working nicely with pgfplots

This question is related to my older question here, but now slightly different. I now have a function that is supposed to take two multivalued arguments. One contains the columns i want to plot. If i ...
2
votes
1answer
737 views

Create 2x2 groupplot with +1 plot to the side?

I want to create a 2x2 + 1 plot like... ---------------------------| | Plot 1 | Plot 2 | | ------------------- Plot 5 | | Plot 3 | Plot 4 | | ---------------------------| How can I ...
2
votes
1answer
123 views

How to tell pgfplots to keep empty “series”?

I have a plot with xticklabels defined as symbolic. In a modified version of my plot, I want to set ymin value. When doing this, my plot is automatically updated: all x series having only points ...
2
votes
1answer
334 views

tikzpicture and pdf - x axis partially disappears

I would like to know why the x axis partially disappears, given the following code. Is it a PDF problem? Also, is there any option to connect the midpoints automatically but not in a smooth fashion? ...
2
votes
1answer
91 views

Use markers as clip path

I want to plot a line, where the markers knock out a piece of the line instead of being displayed (it would be useful if there was a way to leave a bit of space around a marker, too). Drawing the ...
2
votes
1answer
445 views

error while using gnuplot in pgfplots

I am using pgfplots and tikz library for generating some figures. my problem is that I can not use gnuplot within pgfplots. I tried to compile the following code bu seemingly the gnuplot is not ...
2
votes
1answer
150 views

pgfplots - x unit, space between label and parantheses

Can I specify the space between the label and the parantheses when using x unit in pgfplots? In my example image, I want less space (\,) between the E and the [eV].
2
votes
1answer
141 views

How to inline tikzexternal.sty

I am preparing a document, which uses pgfplots, for submission. I externalized figures etc. successfully. Though, now I'm facing a serious problem: On the target system the tikzexternal.sty file may ...
2
votes
1answer
390 views

x-axis values are very close to each other

For the MWE below: \documentclass{report} \usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage[T1]{fontenc} \usepackage{pgfplots} \begin{document} \begin{figure}[H] ...
2
votes
1answer
438 views

PgfPlots duplicate x-axis labels

I have some repeated numbers on my X-Axis. Here is my code- \begin{tikzpicture} \pgfplotstableread{Figures/measurements.dat} \datatable \begin{axis}[symbolic x ...
2
votes
1answer
591 views

Automatic data recognition and plot processing in pgfplots

I am a beginner in LaTeX, trying to use it for industrial documents, such a measurements report. One example is the true position graph of the MWE. The circle represents the true position tolerance. ...
2
votes
1answer
574 views

conditional inside a pgfplotsinvokeforeach loop

I'm using \pgfplotsinvokeforeach to do mathematical computations inside the \addplot options. Now I need a conditional to decide whether to plot a line or not depending on the current index of the ...
2
votes
1answer
593 views

pgfplots spline and colorseries do not work

I want to create a plot with predefined colors and have the points connected by a spline curve. Both things do not happen. The color series is not applied (all lines are black) and a spline is not ...
2
votes
1answer
565 views

How to order barplots in aligned rows and columns?

I am making xbar plots with pgfplots. Within different age groups ("Agen interval") of men a single winner is choosen (Winner), based on some test, and on this winner two different variables are ...
2
votes
1answer
659 views

pgfplots hand-made legend (\label + \ref) fails with custom styles

In pgfplots, when I use a custom style to plot a line, \label the line and then \ref to this plot, I am unable to get the desired result. The desired result would be to get a little line where I am ...
2
votes
1answer
3k views

usepgfplotslibrary - undefined control sequence

I have problem with following example code: %& --shell-escape --enable-write-18 \documentclass[a4paper,10pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{polski} ...
2
votes
1answer
40 views

Only one xlabel for matrix of plots in pgfplots

I am looking for a way to make only one xlabel for a matrix of plots with pgfplots. My current plot looks like this and would like a xlabel where the red circle is drawn. The code for the plot is ...
2
votes
1answer
50 views

pgfplots : Row title in legend

I would like to add a title to each row of my legend in pgfplots. I achieved this with this example : \documentclass{article} \usepackage[pdftex, active, floats, tightpage]{preview} ...
2
votes
1answer
20 views

Disable automatic subticks on semilogyaxis plot with pgfplots

I found many questions regarding why subtics do not appear on a semilogyaxis plot. But I actually would like to not have those subticks as this adds too many ticks so that my plot looks pretty full. ...
2
votes
1answer
32 views

pgfplots is skipping first ytickslabel from file

Rendering the MWE below pgfplots skips the first 'Adiff' label of the CSV. I'm sure this is a no-brainer and easy karma points for experienced pgfplots users, but I am stomped. ...
2
votes
1answer
46 views

Label faceted surf in pgfplots

I have a series of X,Y,Z points and like to create a discrete surf plot and label each point. I am using \addplot3[surf...] to generate the plot but I can't figure out how to label the colors. I don' ...
2
votes
1answer
57 views

pgfplots: Why does samples quantity has such effect on the shape of the plot?

By varying the value of the samples in drawing such plot in pgfplots, the shape of the plots changes so much; is it because of some instability in drawing plots or the function has such behaviour? ...
2
votes
1answer
58 views

PGFPLOTS: How To Put \addplot boxplot prepared Inside Macro Definition

I have a need to wrap the `\addplot [boxplot prepared]' inside a macro to greatly save typing. It seems simple enough, but the devil is in the details with macro expansion issues. Is this doable given ...
2
votes
1answer
100 views

How to deal with large numbers in chart axis labels

I am using pgfplots to visualize my experimental results, but some of the experimental results have very large numbers ($10^18-10^19$ for example). The way pgfplots deals with them is that, it puts a ...