{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
2answers
276 views

Linewrap in legend in pgfplots [Solved]

I try make plot with long text in legend. \documentclass{report} \usepackage{pgfplots} \pgfplotsset{ every axis legend/.append style={at={(0.5,-0.13)},anchor=north,legend cell align=left}, tick label ...
2
votes
1answer
128 views

How enlarge the two parts of data

below shows the graph and code. the red circle show two portion of data. since the upper red circle has data values >1500, therefore the lower red circle(0-500) shows all lines cramped together..is it ...
2
votes
1answer
681 views

Pgfplots: Horizontal colorbar on top

I found on pgfplots manual ho to have an horizontal colorbar (simply specifying the colorbar horizontal option) but how can I put it above the axis? By default pgfplots puts it below the axis.. Here ...
2
votes
1answer
110 views

How to remove all of ticks keeping the extra ticks

I want something like \begin{axis}[ y ticks=\empty, extra y ticks={-1,1}, extra y tick style={yticklabels={{name1},{name2}} ] ... \end{axis}
2
votes
2answers
848 views

pgfplots: How to place the legend box in the middle of an axis

I would like to have something like legend pos= west, %insted of north west, south east... because I don't wanna place it in the corner but vertically in the middle. How could I do this?
2
votes
1answer
349 views

PGFPlots: How does one plot a wave packet?

Given the equation 2\cos(kx - wt)\cos(.5\Delta k(x - \frac{\Delta w}{\Delta k}t)). How can I plot this in pgfplots? k is the wave number w is the frequency \Delta k and \Delta w are both \ll 1 We ...
2
votes
1answer
98 views

Footnote label in pgfplot

I can't find an answer to this problem. My problem is similar to this Footnote on graph title but I would like to have a footnote netxt to one of my x axis labels. Like this symbolic x ...
2
votes
1answer
275 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
362 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
424 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
378 views

PGFPlots slow down compilation when plotting from external files

I am writing a report containing multiple plots of spectroscopic data by way of PGFplots which is fetching data from external files. It used to do the work, and after a few minutes of compilation it ...
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
251 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
338 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
307 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
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
1k 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
281 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
530 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
1k 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
456 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
680 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
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
802 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
312 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
441 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
378 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
1k 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
2k 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
38 views

How to draw a z-simple paraboloid in a “clean” way

I'd like to draw z=x^2+y^2 on the interval 0<z<9. So normally I've just been using pgfplots with the addplot3 command, and for rectangular domains that doesn't seem to cause too much trouble. ...
2
votes
1answer
29 views

pgfplots: change vertical position of node label in addplot

In the MWE below, how can I change the vertical position of the label associated with the curve? For example, if I wanted to put it below the curve? \documentclass{standalone} \usepackage{tikz} ...
2
votes
1answer
33 views

Duplicate values when writing value near coordinate

I am using this code, taken from my question here. The problem arises when two x values have the same y value. Then the label I want to write near the coordinate overlaps with the other one. How can I ...
2
votes
1answer
54 views

Default tikz arrow style in pgfplots

I'm trying to change the axis arrow style used in pgfplotsto the default one obtained in tikzusing ->, i. e. I've done some research but can't seem to find a way to do that.
2
votes
1answer
31 views

Formatting axis as currency

This may well have been answered somewhere, but I can't find it. It seems very simple, but is eluding me. I have a chart built with pgfplots. \documentclass{article} \usepackage{pgfplots} ...
2
votes
1answer
50 views

pgfplots: How can I write square brackets in xlabel or ylabel?

The following works fine: \begin{tikzpicture} \begin{axis}[xlabel=$k$, ylabel=$x(k)$] \addplot coordinates {(0,1) (1,4) (2,2) (3,-1) (4,2)}; \end{axis} \end{tikzpicture} But as soon as I ...
2
votes
1answer
44 views

Fill between on top of axis background

How can I draw the fill between area on top of another fill area that is drawn in the axis background preaction? MWE: \documentclass{article} \usepackage{pgfplots, pgfplotstable} ...
2
votes
1answer
155 views

Reduce pdf file size for large image produced by pgfplots

I created a plot using pgfplots. The plot is embedded in a document. The total size of the document is about 26 MB, while the plot is 12.5 MB. The plot contains a lot of data which makes the pdf ...
2
votes
1answer
69 views

Why do I get a “Dimension is too large” error?

\documentclass{article} \usepackge{pgfplots} \usepackage{tikz} \begin{document} \begin{figure}[H] \centering \resizebox{0.80\textwidth}{!}{% \begin{tikzpicture} ...
2
votes
1answer
50 views

Include a table as label in pgfplots

I would like to have as a symbolic x coordinate a tabular. Is this possible? Below is a MWE that has all the required elements. \documentclass{article} \usepackage{pgfplots} \begin{document} ...
2
votes
1answer
80 views

What are the minimum requirements to create a “standalone” installer for pgfplots?

I prefer to use pgfplots for my plotting needs, but I tend to use LaTeX for my documents as well, so I have the full TeX Live installed. I'd like to convince my friends/lab mates/colleagues to use ...
2
votes
1answer
31 views

Conditional \addlegendentry

How can I add legend entries dependent on some variable? At least it does not work in the minimal example below. \documentclass{standalone} \usepackage{tikz,pgfplots} \begin{document} ...
2
votes
2answers
190 views

Change legend color in multiple y-axis plot in pgfplots

I have a plot in pgfplots with two y axis, and two curves for each axis. For each y-axis, the first curve correspond to a given method, and the second one to another method. Hence, the two curves ...
2
votes
1answer
112 views

Pgfplots polar axis: can I draw angle labels rotated as for smith charts?

[This is a question which came up on the pgfplots mailing list. Since it might be of general interest, I post it here.] In pgfplots, the smithcharts library supports an option to draw the angular ...
2
votes
1answer
190 views

What exactly are the 'unsuitable tick labels' mentioned in pgfplots' compatibility warning?

When I use pgfplots, I get the following warning: Package pgfplots Warning: running in backwards compatibility mode (unsuitable tick labels; missing features). Consider writing ...
2
votes
1answer
47 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
91 views

How to get two data series in tikz plot?

How do I create a second data series from the code below? I have tried separating the two curves with curly brackets but it was not the correct code. \begin{figure}[h!tp] \centering ...
2
votes
1answer
56 views

Axis drawn longer than specified

The y-axis in the following graph is about ten times higher than I want it to be. The graph has a maximum height of 0.5 units. I specify that the y-axis should go up to 2 units. ...
2
votes
1answer
66 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
135 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 ...