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

Nodes near coords gives Undefined Control Sequence

I have the following example of a graph. I want to place the items in the table "Restart" next to the nodes. Everything works until I add "nodes near coords", I get a bunch of errors saying "Undefined ...
2
votes
1answer
813 views

Modulo calculation in PGFplots tick label

I am printing a diagram and want to use a_[0...3] as tick labels on the x-axis. Right now I have a[0...7] as labels and look for a way to print a[\tick mod 4] (i.e. a_0, a_1, a_2, a_3, a_0, a_1, a_2, ...
2
votes
1answer
646 views

pgfplots: Scatter plot with multiple series side-by-side

I have multiple machines on which I did benchmarks. Now I wan to use pgfplots to show multiple y values (the variance in the measurement) for a single x value (a benchmark parameter) within a single ...
2
votes
1answer
712 views

Change axis number format for external tikz file

I'm using \input{filename.tikz} to include .tikz graphs created by matlab2tikz in my LaTeX document. As shown in a comment on this question it is possible to change the plot marker size when the ...
2
votes
1answer
422 views

How to generate a separate legend picture?

I want to generate a tikzpicture which only contains the legends, and not the plots themselves. I use the following code and it returns an error: ! Package pgfplots Error: Sorry, the supplied plot ...
2
votes
1answer
930 views

Tikzpicture in a two column way using a one column .cls template

I'm using a .cls IEEEtran from IEEE available here http://www.ieee.org/conferences_events/conferences/publishing/templates.html; and all document is in two columns. I'm ploting using pgfplots a ...
2
votes
1answer
281 views

ytick pgfplot issue

I have the following latex code but unfortunately cannot get the ytick to be of my choice. \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{center} ...
2
votes
1answer
193 views

ticks disappearing for diverging (out of range) plots

my xticks disappear for some plots even though I explicitly ask for them. Here is my MWE. The function goes to -infinity at the right border of the interval. \documentclass{article} ...
2
votes
1answer
525 views

pgfplots: fill the volume under a 3d surface

I have a very simple 3d graph. \begin{tikzpicture} \begin{axis}[view={60}{20}, %axis equal image=true, xlabel=$X(T)$, ylabel={$D(T)$}, zlabel={$V(T)$}, zmin=0 ] \addplot3[surf,shader=flat,z ...
2
votes
1answer
2k views

Minor ticks not showing when using matlab2tikz

I am using matlab2tikz to import MATLAB figures into TeX. However I can't seem to get the x or y minor ticks to show in the document compiled by TeX. The MATLAB figure I have converted to .tikz have ...
2
votes
1answer
298 views

\pgfcalendar@datetojulian error when plotting a time series using pgfplots

I am trying to plot a hyetogram (hourly precipitation vs time, or column 10 vs column 1 in my data file) with data downloaded from a WUnderground weather station. The time column seems to be properly ...
2
votes
1answer
1k views

pgfplots: how to fix axis length?

I used ymin=0 and ymax=1000 to give axis the length I want. The problem is that if I have some "crazy" data that escape (I have to plot stable solution vs. unstable solution of my algorithm), pgfplots ...
2
votes
1answer
585 views

Error when using pgfplots and beamerposter

I'm trying to create a poster presentation using beamerposter, and it refuses to compile when I insert my pgfplots plot. I get the following error message ! TeX capacity exceeded, sorry [input stack ...
2
votes
1answer
655 views

pgfplots: x-axes do not align due to different labels

This is my first post, so I hope I do everything right :) I have the following problem: Using pgfplots I create two graphs next to each other which have identical y-axes, but different x-axes. I want ...
2
votes
1answer
310 views

How to use listings inside pgfplots captions?

I need to add a (general) listings code in a plot caption. For some reason listings (inline) doesn't interact well with \addlegendentry, what can I do to make the same code work outside and inside an ...
2
votes
1answer
587 views

pgfplot barchart moving x-axis up

For the MWE below: \documentclass{report} \usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage[T1]{fontenc} \usepackage{tikz,pgf} \usepackage{pgfplots} \usepackage{slashbox} ...
2
votes
1answer
414 views

pgfplots: how to check if addplot filters all data

is there an easy way to check if a \addplot(+) table [...] command in PGFPLOTS has any drawn any points? The reason is that I want to process the data dynamically, and if the plot is empty, the legend ...
2
votes
1answer
308 views

matlab2tikz for binary matlab figures

How do you properly use matlab2tikz for binary MATLAB figures? The figures are only black and white and when trying to generate the .tex file I get the error: Input argument 'color' is not a scalar. ...
2
votes
1answer
850 views

Consistently specify function to be graphed with or without gnuplot

I would like to be able to specify a function and then graph that with with pgfplot only, or use gnuplot to compute the coordinates. As far as I know there are two main differences in how the ...
2
votes
1answer
653 views

how to use \insert{_file_} to include tikz \draw command?

I'm using Stata to run some simultions, and my data change every time I run my do file. My data have a discontinuity that changes with each run and I'd like a curly brace that reflects the size of ...
2
votes
1answer
35 views

Pgfplots: restrict to domain when using date coordinates

I would like to restrict the domain of the x axis while using date coordinates. However, the following example (modified from pgfplots manual) will not compile since the domain boundaries for the ...
2
votes
1answer
53 views

Place multiple external images in a PGFPlots axis from a PGFPlotsTable

I am trying to create an environment in which I can place several georeferenced images into a PGFPlots axis. I have working code that reads in the specified image, reads in the world file (a text ...
2
votes
1answer
41 views

Forget used ticks

This is a follow-up question of pgfplot dateplot discrete dates on axis, which is answered by Peter Grill. The solution for plotting discrete dates is to use only unique dates. However, when making ...
2
votes
1answer
24 views

axis ticklabel does not load properly in pgfplot

I have two data series (actual data and a forecast) connecting in one point. Yet, the labels only load for the first series. I need to show all dates. Here is a MWE: \documentclass[12pt]{article} ...
2
votes
1answer
34 views

Remove marker from legend in pgfplot

In my code below, there is a marker in the legend. I just have two plots without any markers. How to remove these markers and just have the line be shown in the legend entry? Here is my code: ...
2
votes
1answer
33 views

Specify a domain when using date coordinates?

I'm using date coordinates in=x and I would like to use a soft clip, which requires a domain. But something like domain=2015-07-20 05:00 : 2015-07-20 23:59 or domain={2015-07-20 05:00 : ...
2
votes
1answer
37 views

show last number in x-axis data on pgfplot

How can I get the last number on the x-axis (in this case 40^7) to show up on the plot also? Here is my code: \documentclass[11pt]{book} \usepackage{graphicx} \usepackage{tikz} \usepackage{float} ...
2
votes
1answer
36 views

Change pgfplots markers colors and shape

In my MWE below, I am not getting the markers of the plots to colors that I wanted. Also, I would like to change the red squares in the last plot to cyan circles. Thanks. Here is my code: ...
2
votes
1answer
161 views

Pgfplots legend style marker size

I have the following plot: \begin{tikzpicture} \begin{axis}[ xlabel={\tiny X}, ylabel={\tiny Y}, xmin=0, xmax=5, ymin=0, ymax=18, minor x tick num=4, minor y tick num=4, ytick={0, 2, ...
2
votes
1answer
52 views

setting a tight bounding box when amsmath symbols touch it

I would like the straight lines to end exactly ON the line of the various \circ. Red boxes show why this doesn't happen: \circ has more space below it then above (Please, note that still a white space ...
2
votes
1answer
121 views

desired horizontal alignment of pgfplots' axis in tikzpicture environment inside tabular environment

this is the first time I ask a question on this site (benefited from a lot of answer, though). I have problems with horizontal alignment of pgfplots' axis inside a tabular environment. My target, ...
2
votes
1answer
111 views

How to label maximum y coordinate of data from a file. pgfplots

I want to label only a maximum value of y coordinate from data of external file. I tried to use the features of the calc, but I couldn't get it; I wonder if I can use a function maximum. I've seen a ...
2
votes
1answer
73 views

pgfplots: v1.12 installed, but appears to be v1.10

Under Windows (MikTex 2.9) I have the following problem: I want to use the great box plots provided by the pgfplot package in the current version 1.12. The manual tells me to put ...
2
votes
1answer
114 views

TikZ externalize vs. the list of figures

I'm using pgf in combination with tikzexternalize for every plot. Now it's the first time I want to create a list of figures in latex and I realised, that the externalize function does not well behave ...
2
votes
1answer
72 views

Drawing smooth path of particle through magnet system

I need to get a plot with a trajectory of particle through system of magnets. So I know the coordinate and angle of particle on the edge of each magnet (like y=0,5 alpha=0.3rad) so how can I draw a ...
2
votes
1answer
37 views

clickable area shifted when typesetting by xelatex for Clickable Plots

I have the following codes for clickable plots: \documentclass{article} \usepackage{pgfplots} \usetikzlibrary{pgfplots.clickable} \pgfplotsset{compat=newest} \pgfplotsset{yticklabel style={text ...
2
votes
1answer
82 views

pgfplot, placing 3 graphs next to each other in one coordinate system with different headers

I want to create this graph: The graph is from a scientific paper which I want to quote in my master thesis. As it looks nicer if I create the graph myself than inserting it as a picture, I need ...
2
votes
1answer
148 views

Custom colormap breaks colorbar: Cannot remove border and Mac Preview doesn't show colorbar

I have a custom colormap. And I have a plot with a colorbar. Without custom colormap: No border around the colorbar, as intended. Looks perfectly fine in Mac Preview. With custom colormap: Black ...
2
votes
1answer
64 views

Missing Legend Entries in GroupPlot

I am constructing a groupplot with a common legend placed in a node under the plot. An MWE that recreates my problem is below. \documentclass{article} \usepackage{pgfplots} ...
2
votes
1answer
77 views

vertically align pgfplots using subfigure

I need to align my two plots. They seem to be anchored by something other than the text. Because one pgfplot has more text in the caption then the other, it offsets it. Please see image. I tried ...
2
votes
1answer
63 views

Regression with .csv tables

I am having trouble getting regression to work. If you wouldn't mind just looking over the code and point me in the right direction I'd really appreciate it. I have loaded pgfplots and pgfplotstable ...
2
votes
1answer
77 views

Boxed equation in pgfplots

I'd like to put an equation within a box. This equation is a label for a picture I'm making by means of pgfplots, tikzpicture environment. Here is the code \documentclass{standalone} ...
2
votes
1answer
377 views

Placing pgfplot graphs side-by-side in two column format

I am trying to put three graphs side by side in two column format. The figures is shown below. My LaTeX code is as following: \begin{figure*} \centering ...
2
votes
1answer
139 views

PGFPlot no line between data points when reading from table

I have been searching stackexchange aswell as the pgfplots and pdfplotstable documentation. My problem is that when i read into the data from a *.txt file and I select the columns and rows i want to ...
2
votes
1answer
49 views

Filling in with pgfplots and draw

I created the following polygon: \tikz \draw[very thick,name path=A] (0,15) to [out=0,in=270] (15,30); \draw[very thick, name path=B] (0,15) to [out=0,in=90] (15,0); \draw[very thick,name path=C] ...
2
votes
2answers
304 views

Insert space between tick labels and axis in Pgfplots

I'd like to add some vertical space between the x tick labels and the x axis in a Pgfplots plot. Is this possible? Background: I have two subfigures arranged next to each other (horizontally) using ...
2
votes
1answer
53 views

Placing labels at the end of lines

I have a display depicting two triangles that are reflections of each other across the line y=x. At the end of the line y=x - in the same direction as the line and 7.5pt away from the arrow tip - I ...
2
votes
1answer
211 views

Second y-axis inside groupplot

I would like to add a second y-axis inside a groupplot. If there's a better/easier way to get the plot I want (see figure) I am willing to not use groupplot. \documentclass[tikz]{standalone} ...
2
votes
1answer
384 views

PGFPlots with custom minor ticks

How do you create a plot with minor ticks on the abscissa, when you've customized the major ticks? A MWE \documentclass{standalone} \usepackage{filecontents,pgfplots,pgfplotstable} ...
2
votes
1answer
157 views

Labeling axes using extra x ticks and extra y ticks

I am trying to write code so that TikZ will compile it to label the axes with x and y using extra x ticks= and extra y ticks= in the same way that TikZ will label the axes using xlabel=$x$, ...