{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
47 views

Choosing the bar size with symbolic x coords option

When I use both "bar width" and "symbolic x", pdflatex gives me the following error message: ! Package pgfkeys Error: I do not know the key '/pgfplots/bar width' and I am going to ignore it. ...
2
votes
1answer
55 views

symbolic x coords not aligning correctly, missing data

When I compile this code: \documentclass[11pt,a4paper]{article} \usepackage{geometry} \geometry{margin=1in} \usepackage{tikz} \usepackage{tkz-euclide} \usepackage{pgfplots} ...
2
votes
1answer
92 views

Modifying some features on the graphs of a function and its inverse

The following code is compiled by pgfplots to graph an exponential function and its inverse. I have some questions about the code, and I would like to modify some of the features of the graphs. How ...
2
votes
2answers
100 views

Change edge color of pgfplots patches

I am plotting patches and don't them to be colored according to their z-values. Instead, I want to define the colors by myself. Here is an example: \addplot3[area legend,patch,forget plot,patch ...
2
votes
3answers
136 views

Overlaying or nesting graphs in tikzpicture with different axis scales

I need overlay or nest a figure in a graph. I try with \pic, but the results aren't good for figure scale, according to graph scale. I try also to define the figure in nodes, to place it in the ...
2
votes
1answer
58 views

How can I place a node relative to a legend?

I'd like to place custom formatted nodes relative to the legend in a plot. The answer to Placing node relative to legend is a solution per se, but related to op's actual intent so it isn't helpful to ...
2
votes
1answer
78 views

pgfplots: How to remove all axis lines of polaraxis?

I need to draw a polar coordinate system without border lines. Adding axis lines=none (without star) to pgfplot's polaraxis argument list blanks out the coordinate system completely (including grid ...
2
votes
1answer
64 views

How can I make axis lines connected and make axis be over the plot?

I've just put a lot of effort in the following tikz image for Wikiepdia (see commons link): However, there are two small things that I can't get fixed: When you look at the bottom left corner ...
2
votes
1answer
31 views

How to print in a node the \coordindex multiplied by a value?

I would like to print in a node the \coordindex multiplied by a value. Is it possible? now: node [ some code... ] {$\coordindex$} after (?) node [ some code... ...
2
votes
1answer
102 views

pgfplot: how to render 3dplot with colors black, white and gray

I my previous question, I rendered a 3d plot, but as I want to print my plots they should be in black, white or gray coloring format. How should I change the coloring scheme? ...
2
votes
1answer
106 views

PGFPlots x-axis problem

I've been stumped on how to get the y-axis to turn off, but to have the x-axis have a set domain. Every time I run the two code samples, the x-axis domain is always 0->1. The goal is to set the x-axis ...
2
votes
2answers
125 views

Matlab2Tikz FaceColor Surfplot

I would like to export a surf plot, whose face color is for example green, out of MATLAB R2014a to latex with the aid of matlab2tikz. Unfortunately when i run pdflatex the face color now ranges from ...
2
votes
1answer
66 views

Pgfplots axis environment, loop for function works but not for plotting options

My question is related to this one, \foreach not behaving in axis environment , but the solution there does not work in my case and unlike the related question, the loop works well in the axis ...
2
votes
1answer
72 views

Why are some of my boxplots dashed?

Here's a MWE: \documentclass[a4paper]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{statistics} \pgfplotsset{compat=1.8} \begin{document} \begin{tikzpicture} \begin{axis}[ boxplot/draw ...
2
votes
1answer
99 views

Adding Confidence Intervals in Pgfplots

I am using pgfplots to generate the following MWE: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ xlabel=$x$, ...
2
votes
1answer
411 views

Package pgfkeys Error: I do not know the key '/tikz/y error plus index'

I am having trouble compiling the attached mwe. I receive the following message: "Package pgfkeys Error: I do not know the key '/tikz/y error plus index' and I am going to ignore it. Perhaps you ...
2
votes
1answer
91 views

How do I get open points into my graphs in pgfplots?

I wanted to have a discontinuity at $x=0$ where I spliced together the two graphs. But things aren't visually working out the way I wanted them to. \documentclass[border=6pt]{standalone} ...
2
votes
2answers
102 views

pgfplots- Adding a mark at the origin

I'm trying to show the beginning of a sketch of the graph y=xe^x, and this is what I have: \documentclass[10pt]{article} \usepackage{tikz} \usepackage{pgfplots} ...
2
votes
1answer
88 views

pgfplots: options for marks do not apply

I try to modify the marks but the options do not seem to change anything?! \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \usetikzlibrary{plotmarks} ...
2
votes
1answer
105 views

Scaling pgfplots matching papersize

I'm facing some problems at the moment with scaling some diagrams so that they each fit on a page (landscape) in my appendix. Does anyone has some suggestions how to solve this? Any help would be ...
2
votes
1answer
203 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
121 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
149 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
173 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
354 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
109 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
112 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
88 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
293 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
296 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
176 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
116 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
291 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
170 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
361 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
328 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
180 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
86 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
342 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
185 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
647 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
930 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
607 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
141 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
194 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
81 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
714 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
122 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
331 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? ...