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

pgfplots “dimension too large” with 3D graphic from external source

I want to include a 3D plot that I created in R. The plot is prepared according to the example given for Matlab in the pgfplots manual. I cropped the whitespace around the saved png, added ...
2
votes
1answer
386 views

Intersecting planes not shown correctly with TikZ

I made a plot in MATLAB of a deformed and an undeformed model. I converted the figure to TikZ using matlab2tikz and added it to my .tex file. I then noticed that the two configurations, which are ...
2
votes
1answer
2k views

gnuplot and TexnicCenter setup

I just downloaded and ran the gnuplot setup exe. Now, how do I setup TeXnicCenter and gnuplot so I can use gnuplot with TikZ? So I have been able to add --enable-write18 but the inverted cycloid ...
2
votes
1answer
241 views

Create standalone pictures

I am trying to write a sample code to be used as a template to generate pictures that will be latter included in a paper. At this stage, the pictures are only plots. I have the following code. But it ...
2
votes
1answer
293 views

Labels in xtick with pgfplots

I am using Pgfplots to make a very simple graph. I already have the code below \documentclass{article} \usepackage{tikz,pgfplots} \pagestyle{empty} \begin{document} \begin{tikzpicture}[>=latex] ...
2
votes
2answers
292 views

Ideas for drawing this plot?

I need idea for drawing the following graph. I, obviously, do not expect full code. I hope I can get an idea about the best way to plot this graph. Should I try to draw each rectangle separately? Is ...
2
votes
1answer
161 views

How to make the legend border tighter?

I am trying to make the legend border tighter. What is the \begin{axis}[legend style={...}] property to adjust the legend border (both width and height of the border)? \documentclass{article} ...
2
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 ...
2
votes
1answer
959 views

Adjusting features of a pgf plot

I have the pgf plots below, where it doesn't appear well. I wish to put closer the "Solving Time(ms)" and y axis, put the font size smaller how should i do it? There is also a problem for ...
2
votes
1answer
262 views

Graphing linear probability model using pgfplots

So, I am attempting to use pgflots to draw a sketch of a one-independent variable linear probability model in the form of the equation I have below, which shows the implied relationship between E(Yj) ...
2
votes
2answers
1k views

Using pgfplots, is there a way to overlay multiple stacked plots with different ranges?

I am using the accepted answer to the question “Is there an easy way of using line thickness as an error indicator in a plot?” to draw error bands around my regular line plots. However, I find myself ...
2
votes
1answer
498 views

Create a ybar interval from given bar widths

I am collecting data using the NASA Task Load Index, which gives 6 scales and has a weight associated with each scale. I am trying to plot the mean value for each scale using a ybar interval graph, ...
2
votes
2answers
925 views

Using node shapes or self made tikzpicture as image in legend

I am using the solutions of Using a pgfplots-style legend in a plain-old tikzpicture and Legend in tikzpicture to create a legend in a tikzpicture. In this legend I need a cylinder as image. I ...
2
votes
1answer
419 views

Pgfplots two datatable in the same document

\documentclass[a4paper,12pt]{article} \usepackage{pgfplots,pgfplotstable} % Grafici \pgfplotsset{/pgf/number format/use comma,compat=newest} ...
2
votes
1answer
2k views

pgfplots: I do not know the key '/tikz/nodes near coords' error [closed]

I'm trying to create a simple plot using pgfplots. I have a problem though that drives me crazy. I'm working on a debian installation and had installed the tex-live version from the repositories. The ...
2
votes
1answer
720 views

Plotting area in the plane where two inequalities in two variables hold

I would like to plot the area in the plane where two inequalities hold, both involving two variables. I would like to do it the way Wolfram Alpha does it, but within a LaTeX document. I have looked ...
2
votes
1answer
296 views

Wrong area plot

I'm trying to draw a plot from this table: ip Min Std 0 19.86764349 97.20356138 16 19.86764349 250.079659 22 19.86764349 168.2253117 23 19.86764349 169.2514577 33 ...
2
votes
1answer
408 views

Styled or fixed color line-segments in PGF

When I want to plot coordinate data, I know that I can color individual scatter points using defined colors using point meta=explicit. The line segments between two points seem to be colored by an ...
2
votes
1answer
2k views

pgfplots and figure centering

I'm wondering about a way to exclude the axis labels and axis graduation from how latex will center the figure with respect to the caption. Labels and graduation along the y-axis (assuming it lies on ...
2
votes
1answer
351 views

pgfplots and final size of the externalized pdf image

I have the following piece of code: % command: pdflatex --jobname=try-f1 try.tex \documentclass[12pt]{book} \usepackage{tikz,pgfplots} \pgfplotsset{compat=newest} \pgfrealjobname{try} ...
2
votes
1answer
949 views

How to correct for a xshift in the pgfplot legend?

Using the following example code: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[ xlabel=$x$, ...
2
votes
1answer
1k views

Bar plot legend not displaying correctly

In the legend for a bar plot that I'm building, I'm only getting a small tick next to the name, not a block of color. I'm not defining any special cycle lists. The code for the plot is: ...
2
votes
1answer
25 views

Inputenc error pgfplotsset

When I try to compile my code throw me an error between inputenc and pgfplots. I compile the following code: \documentclass[11pt]{article} \usepackage{amsmath} \usepackage[utf8]{inputenc} ...
2
votes
1answer
53 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
56 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
97 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
114 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
144 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
60 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
90 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
66 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
116 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
112 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
139 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
68 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
74 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
109 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
458 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
108 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
92 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
115 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
218 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
127 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
155 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
178 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
371 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
121 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 ...