{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

1
vote
1answer
46 views

Naming Externalized Images via MD5 Sum

I have a large presentation with over 200 figures (mainly created through stepping through each image). I'm using the external library to cache the results to great effect. Each figure is cached in ...
1
vote
1answer
77 views

Get node text inside filled region in tikz

I have made this figure from this code: \documentclass[tikz]{standalone} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture}[domain=-90:200, x=0.025cm, y=0.15cm] \draw[->,very ...
1
vote
1answer
114 views

Simple import of data with special characters for table

I'm currently trying to import a set of data from a file (comma or tabbed delimited, doesn't matter) for creating a table. Below is an example of this data (DH parameters in case you're curious): ...
1
vote
2answers
83 views

yticklabel pos=right has no effect

I am using pgfplots to draw a simple 2D function. I'd like to display all of the ytick labels on the right side of the plot. So far I had no success using yticklabel pos=right, I do not get an error ...
1
vote
1answer
80 views

How to arrange the key in this plot?

basically I have plot like this: It looks bad because two reasons: The middle figure, five keys are overlapped with lines The 6 key in the third figure, even they are not overlapped, they are not ...
1
vote
1answer
84 views

Multiline legend external to pgfplot

I'm building a plot with pgfplots where there's no good location inside the chart box for a legend, so I'm trying to place the legend outside. Below is the code...it obviously won't build without all ...
1
vote
1answer
42 views

pgfplot bar chart with no X labels?

Is it possible to produce a bar chart in pgfplots with no X labels? I'd like to simply fill the bars and have an external legend that provides a color code. I'm making a 3x1 group plot that shows ...
1
vote
1answer
92 views

pgfplots error plot 3D math function of two variables

I want to plot a very typical production function (q=L^0.5*K^0.5) in 3D using pgfplots package. When I compile the following MVE I get the following error "! Package pgfplots Error: An internal error ...
1
vote
1answer
88 views

Remove labels with pgfplots

How to remove extreme labels on each axis ? Why does the shape of the curve is not limited to the upper edge of the grid ? I find that the curve is not very smooth, especially at the apex of the ...
1
vote
1answer
111 views

Individual tick label style depending on position

I'm looking for a solution to restrict tick labels to be within the axis limits (see figure, without enlarging limits). The idea was to apply a custom tick label style for example to the first ...
1
vote
1answer
66 views

Get x and y labels for tikzpicture

I have plotted a scatter diagram with pgfplots: With this code: \begin{figure}[H] \centering \begin{tikzpicture} \pgfplotsset{ticks=none} \begin{axis}[ymin=0, ymax=10.5, ...
1
vote
1answer
232 views

PGFplots axis legend with multiple columns/rows of different lengths

I have an axis environment in PGFplots with multiple graphs which correspond to certain group of data types. I want to stress this distinction by grouping the legend entries. In particular, using a ...
1
vote
1answer
65 views

How can I plot error bars on the first and last points in pgfplots?

I have a number of data series to plot with error bars, but since they might overlap in the middle, I'd like to show error bars for only the first and last points. All the data points will have the ...
1
vote
1answer
80 views

Hidden data in stacked bar plot

I am trying to reuse a stacked bar plot I created a few months ago that looked like this: The source code I'm pretty sure I used to create is was: \documentclass{article} ...
1
vote
1answer
77 views

Improving a tikz plot

I have drawn the following picture with tikz: Code for MWE: \documentclass[a4paper,12pt,notitlepage,oneside,reqno]{scrbook} \usepackage[T1]{fontenc} \usepackage{kpfonts} \usepackage{libertine} ...
1
vote
1answer
185 views

pgfplots - loglogaxis minor ticks on y axis [duplicate]

First of all, this is complaining on a high level. pgfplots is a great package and I would like to acknowledged the work of Christian Feuersänger and other developers. Consider the minimal example ...
1
vote
1answer
152 views

How to change font for axes, labels, etc in pgfplots using fontspec (lualatex)?

I need to make figure with Garamond font applied to axes and labels, as well to text in nodes. This is my MWE: \documentclass[12pt]{standalone} \usepackage{tikz} \usepackage{pgfplots} ...
1
vote
1answer
128 views

Convert from rectangular coordinates to polar coordinates

The following code gives me the display that I want. The only modification that I want is to specify the points in polar coordinates with the same radius. (These points are on a unit circle centered ...
1
vote
1answer
135 views

pfgplots groupplot with more than one \addplot per \nextgroupplot?

I'm having trouble making a group plot in pgfplots. I want to have 2 separate graphs, each with two regression lines and two sets of dots, but groupplot lumps everything onto 1 set of axes. I can't an ...
1
vote
1answer
112 views

4 x-axis with pgfplots

I'd like to put 4 x-axis on a same plot, with different scale. y-axis will be the same. I'd try to put several \begin{axis} ... \end{axis}, but they appeared on the same location. Here, I tryed to ...
1
vote
1answer
81 views

Clipping only the bottom of a graph in pgfplots/tikz?

Is it possible to clip only the bottom of a graph? I have a graph with a node above the area of it; when clipping over the entire thing is enabled, the node is cut away. However, no clipping means the ...
1
vote
1answer
139 views

How to label subfigures in Tikz package?

Making labeled subfigures is a bit tricky using the tikz package. Could someone please show me how to provide each subfigure its own letter (A for the left subfigure, B for the middle figure, and C ...
1
vote
1answer
130 views

How to change x-axis label position only horizontally keeping the default vertical value using pgfplots

I have two plots of different width next to each other. I want them to share one x-axis label. For this I take the x-axis label of the left plot and shift it to the right so that it is perfectly ...
1
vote
1answer
79 views

Drawing Vertical Plots

is there any quick way to draw vertical plots with pgf-plots? I need to draw successive vertical lines for the plot below: \begin{center} \begin{tikzpicture} \begin{axis}[ clip=false, ylabel={}, ...
1
vote
1answer
63 views

Removing multiple scaling factors in pgfplots

I would like to place a single scaling factor in the top left corner, which seems to be default normally, instead of having factors of 10^n at every y axis tick. In other words, I would like to ...
1
vote
1answer
154 views

How to create a large table with Pgfplots and string entries?

I tried to hack this here for a larger case but it is firing errors. What is causing the too many columns error and is Pgfplots ideal for this kind of table generation? Goal: table that I am trying ...
1
vote
1answer
99 views

Specifying different scales for the axes

I am plotting sin(2x) from -pi/4 to pi/4. I have specified that the axes should have the same scale with axis equal image. It doesn't look like a sinusoidal function. How do I get the y-axis to be ...
1
vote
1answer
82 views

pgfplots - How can I address the coordinates of a plot's title in a groupplot?

Say I provide a title to a groupplot via title={Word} Is there a way to address the area of this node, e.g. via .north west and so on (as detailed on page 314 in the manual)?
1
vote
1answer
149 views

TikZ Issue With Function Plotting

I am trying to create this simple TikZ plot of a quadratic function. But the code does not compile, and the error is detected at the part where I introduce the function. What is wrong with it? ...
1
vote
1answer
183 views

pgfplots - plusminus doesn't match its definition

I've been trying to make a ybar plot with error bar using pgfplots. I want to make this graph inside a tex template, but one weird thing has occurred - when I inserted the following code (be more ...
1
vote
2answers
175 views

pgfplots - How can I define one cycle list for all graphs (or the least amount possible)?

Due to all the maintenance after changing a color in a list, I tried to define just one cycle list so I do not have to update all my lists anymore. It is all in all an annoyingly huge amount of time, ...
1
vote
1answer
965 views

Add a horizontal line to a PGFPlot and add it to the legend

I have a PGF Plot with some computational results from a CSV file. At the time the CSV file was generated, there was a value that was not known. That value needs to be on the plot also, however. What ...
1
vote
1answer
86 views

Two dimensional error bars in pgfpot

How can one plot a graph with specified error bars on both coordinates x and y in pgfplots? I have been trying to use the following: \addplot[scatter,only marks, scatter src=explicit symbolic, ...
1
vote
1answer
1k views

How to put legend below the chart?

I have the following code that produces a line chart: \begin{figure}[p] \centering \begin{tikzpicture} \begin{axis}[ use units, cycle list name=exotic, %This defines the color. It ...
1
vote
1answer
249 views

Marking (resampling) a point on a pgfplots curve, interpolated from table data?

I was looking for this in the pgfplots manual, unfortunately the term "resample" is not mentioned, and "sample" hits the samples key, which refers to analytical functions, not to table data; so I ...
1
vote
1answer
279 views

Bars with same x index in stacked barplot

I'm reading data that is structured as an outer group (the x indices/rows) with different inner categories (multiple columns) that are composed of multiple values themselves again. The goal is to ...
1
vote
1answer
66 views

AUCTeX/ RefTeX: ignore files by extension

I'm writing a very long document with dozens of figures that are all generated with matplotlib and exported as pgf files. Each figure environment then looks something like \begin{figure} ...
1
vote
1answer
2k views

PGFplotstable: using a csv file with 4 columns

Suppose I have a csv file with no titles in it just data. The first column is time (x axis) and the next 3 columns each construct a different set; that is, plot(t, col1) is one set of data, plot(t, ...
1
vote
1answer
126 views

How to scale column numbers in a pgfplot table

I want the numbers in my second column in dataTest.dat file be multiplied by 1E4, and it seems that \addplot table[x=x,y=10000*y] {dataTest.dat}; does not work, what should I do then? Here is the ...
1
vote
1answer
143 views

pgfplots - Data set doesn't get cut off

When doing a groupplot such as the one starting on the bottom of page 385 in the manual, is there some specific setting to cut off the data at the specified new xmin- and xmax-values? Or is there some ...
1
vote
1answer
425 views

how to add annotation to ybar pgfplots with symbolic x coords

I would like to add an annotation, or better, an arrow to a particular ybar in a plot, but I am struggling with the symbolic x data. I've used \pgfplotsinvokeforeach to read in variable data, and so ...
1
vote
1answer
1k views

! Package tikz Error: missing semicolon [closed]

I have found this sample of code from here: Block diagram generation in LaTeX. Initially I had some problems while I was compiling the code and I solved them due to copy paste features some of the ...
1
vote
1answer
167 views

Axes for bivariate normal distribution with tikz

I got the following figure: with this code: \documentclass{standalone} \usepackage{pgfplots} \begin{document} \def\centerx{2} \def\centery{-1} \begin{tikzpicture} \begin{axis} ...
1
vote
1answer
249 views

Number of rows in loaded table

Is it possible to determine the number of rows in a table read by pgfplotstableread{values.dat}\val ? My setup is the following. I make experiments to see how a parameter affects a convergence ...
1
vote
1answer
210 views

Drop shadow of node with pgfplot inside

I have this code: \documentclass[tikz]{standalone} \usepackage{pgfplots} \usetikzlibrary{shadows} \begin{document} \begin{tikzpicture} \node[drop shadow,draw,fill=green] { \begin{tikzpicture} ...
1
vote
1answer
585 views

PGFPlots: semilogxaxis and y axis tick marks

I am trying to set up a semilogxaxis in pgfplots. The image I am trying to generate is but my code below is generating \documentclass[tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{compat = ...
1
vote
1answer
927 views

Plotting a function when date coordinates are used (pgfplots)

I want to plot a simple function on a plot where date coordinates are used in x but it seems that pgfplots cannot accept both. Here's a MWE of what I'm trying to achieve: \documentclass{standalone} ...
1
vote
1answer
189 views

Weird Axis Labelling problem with 3D Plot Axes

Note: This was a bug and has been fixed This has been answered by Christian. It's a bug that had been resolved in pgfplots 1.8. I've updated my pgfplots and am now running 1.9. Similar Question ...
1
vote
1answer
228 views

Position of colorbar with multi plots without using groupplot

I have 6 plots (2 rows, 3 columns) with the same colormap and I want to put only one colorbar on the top of the plots. Using anchor and at does not give the expected result, I think this is because ...
1
vote
1answer
938 views

pgfplots: multiple legends or one legend and a heading

In my plot, I want my standard legend that says what value of c corresponds to what color. However, I would also look to put the function in plot. \documentclass[tikz]{standalone} ...