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

Contour plot using pgfplots where some data entries are NaN

I would like to make a contour plot of data that has been saved in a text file that consists of three columns where the columns are x_i, y_i and z_i and some elements z_i are NaN. I use MikTex 2.9 ...
2
votes
2answers
100 views

Plotting standard error

I am trying to create a chart with the std error but I can't seem to get it to work the way I want it to. I want to get rid of the line between every entry. This is what I have right now: ...
2
votes
1answer
168 views

x tick label style issue, anchor=east and text width command not working together

I have a figure where one of my labels is very long. I would like this label to be split to two rows. Currently my code is like this \documentclass{article} \usepackage{pgfplots} ...
2
votes
1answer
86 views

pgfplots - How can I fill the background to a “node near a coordinate”?

I'd like to have the nodes/values for each plot fill with white, so the grids get overdrawn, so to speak. Is this possible? (Note: I only activated the major grid for x for the sake of the thread.) ...
2
votes
1answer
85 views

PGFPLOTS: How to merge 2 tables for histogram

I have a data set that I will plot across two pages. My initial strategy is to split the table in half. Read in the first table and plot, and so with the second. My problem with this is I do a summary ...
2
votes
1answer
86 views

Pgfplot won't compile more than 6 curves on the same plot

I want to plot with pgfplots 12 curves on the same plot. The curves are given by 12 csv tables named "curve_01","curve_02" etc., about 3000 points each. To reduce computational time I reduce the ...
2
votes
1answer
137 views

Logarithmic y-scale with zero bin value

I have some trouble with an histogram filling when I plot it with ymode=log. Here is a MWE \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ ...
2
votes
1answer
222 views

Axis tick options, ticks and labels inside axis area

I know the title can be misleading, but I don't know how to put it better. I will correct it when I get better proposals. I try drawing plots from external tables with pgfplots. Alas, the template I ...
2
votes
2answers
251 views

doing 3x3 subplots with the colorbar located northside

I wanted to have my nine (2d) matlab plots shown as 3x3 subplots in latex with the colorbar located northside. I have no idea how to do this especially that I have the colorbar saved separately from ...
2
votes
1answer
78 views

Pgfplots, Units and “Modify Number Data Scale”

I've got a question with tikzpicture in LaTeX. Data of Tikzpicture are in a external file. The y-axis scale is like: 100,000 - 150,000... (thousands). I need to put the scale of this axis like 100 - ...
2
votes
1answer
93 views

log scale plot and filter not interacting well in pgfplots

It looks like when I try to scale coordinate data in a pgfplots, I cannot do it in log scale simply, since the expression filter seems to be applied to the final point and not the table value. For ...
2
votes
1answer
92 views

Plot not plotted with pgfplots' \nextgroupplot and discontinuities?

I'm trying to do Multiple axis discontinuities with pgfplots, and so based on Axis break in pgfplots, I produced this MWE: \documentclass{article} \usepackage{calc} %\widthof \usepackage{pgfplots} ...
2
votes
1answer
70 views

What is the overflow limit for a named path in tikz / pgfplots?

I asked this question FillBetween library sometimes works and sometimes does not which led to this answer and discussion http://tex.stackexchange.com/a/180926/6908. There seems to be a limit of data ...
2
votes
1answer
202 views

Conditional alignment of labels in pgfplots bar chart

I'm trying to make a bar chart with pgfplots. I'd like the labels to be plotted inside the bars, except when there is not enough space. In that case the label should be shown next to the bar. I've ...
2
votes
1answer
485 views

Problem with xticks when importing Matlab figures using matlab2tikz

When importing the following figure using the Matlab2Tikz, I obtain the following output , with the xticks strangely exported . Does any one have an idea how I can prevent this? Maybe by passing ...
2
votes
1answer
152 views

How to programmatically coax pgfplots to recognize nan within surface as matlab does

I came across this post after wondering why nan's did not appear to be handled by pgfplots as they are by matlab when working with the matlab pcolor function. My typical workflow in this context is: ...
2
votes
1answer
157 views

How to plot stacked bar plot inside table?

I have following code in Latex. Which plots only one data series (data2). I would like to plot staked bar plot inside table for both data1 and data2 with different colours. Any ideas.? Many thanks. ...
2
votes
1answer
150 views

Grouping plots without groupplots

Running this MWE: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{figure} \centering \begin{tikzpicture} \begin{axis}[% width=2in, height=2in, scale only axis, xmin=0, xmax=7, ...
2
votes
1answer
149 views

set x axis text labels from data file in pgf plots

Here is the MWE: \documentclass{article} \usepackage{pgfplots, filecontents} \pgfplotsset{compat=1.8} \begin{filecontents}{horizontal.dat} Name Self PR ST PA CO TO RS 95.8 87.8 94.6 99.2 87.4 91.9 ...
2
votes
1answer
217 views

How to plot a normal curve with proper y-values

Follow-up question to Plotting bell shaped curve in TikZ-PGF I'm new to LaTeX, and I'm typesetting a document for my stats class, and trying to use LaTeX to produce a normal probability distribution. ...
2
votes
1answer
409 views

Add label to bars in bar chart

I am trying to get labels over the bars in my bar chart. I found \node [above] at (axis cs: 1, 810) {$Q1$};, but this one centers itself in the middle between two bars. I want the value from the ...
2
votes
1answer
140 views

Uniform appearance of tick marks in 3d pgfplot?

In the default configuration the tick marks in a 3d plot from pgfplots are looking nicely when using a box but in my opinion not really uniform when the axis lines are in the center. Is there any ...
2
votes
1answer
153 views

Apply shift to (current axis.left of origin)

I was trying to improve the solution at Drawing lines in a plot and give them a label? by using Jake's answer at How to access \xmin, \xmax, \ymin, \ymax from within PGFplots axis environment. So, ...
2
votes
1answer
45 views

Import tex graphics to my main tex document

I want to create various plots with tikz package. I don't want to have the code for the plots in my main tex document because it's pretty messy. Is there a way to keep the tex code to different ...
2
votes
1answer
77 views

Custom style just for width and height?

I have some pgfplot graphs in .tikz files and I want to define a custom style to them that only overrides some entries, and uses whats in the .tikz files for the rest. Example: In my .tikz file I ...
2
votes
1answer
153 views

Adjusting pgfplots

I am having trouble controlling the axes in pgfplots. I have defined an evironment for graphs \newenvironment{graph}[3][]{\begin{figure}[htp] \def\tempa{#1} %Saves caption since \end cannot take ...
2
votes
2answers
96 views

y label is stuck on the right side of the graph

I try to get y label on the right side of the figure, but the label is still stuck on the left side. Below is an example borrowed from another user here. It must be something very simple, but just I ...
2
votes
1answer
74 views

Trouble including graphics from csv file into Pgftable, commands are dissapearing (local maybe?)

I've been trying to add eps graphics with the filename in a csv file. Take a look at the CSV to get an idea of what I mean: ...
2
votes
1answer
301 views

pgfplots: marker size relative to interval size

I am trying to create a ybar interval pgf plot with horizontal lines as markers on top of each interval/bar. Intervals widths are specified by my external CSV data file. I defined my own plotmark ...
2
votes
1answer
173 views

How to change location of boxplots along axis in pgfplots?

pgfplots draws boxplots equally spaced along the axis (x axis in my example below). How can I draw the boxplots at different locations along the axis? E.g., the example below the distance between the ...
2
votes
1answer
195 views

How could we fix the legend in the x-axis with bar chart?

How could we fix the problem with the x-axis ? Also, would it be possible to have written above or in the middle of each column each number ? So as to make my bar chart, I have used the following ...
2
votes
1answer
144 views

unaligned groupplot

I tried to stack my plots with a groupplot from pgfplots package. Like in this MWE: \documentclass{article} \usepackage{pgfplots} \usepgfplotslibrary{units} \usepgfplotslibrary{groupplots} ...
2
votes
1answer
431 views

Setting gnuplot-like colormaps with pgfplots

I would to use the gnuplot default colormap with pgfplots. This colormap is defined in gnuplot with set palette rgb 7,5,15 where the numbers refer to a function for the red, green and blue colours ...
2
votes
1answer
296 views

Specify directories to check by the PGFplots addplot command

When I produce a graph with PGFplots, I first test it, before importing it in my main document tex file. I have the file tikzpicture.tikz in which the tikzpicture environment data is included, and I ...
2
votes
1answer
162 views

How can one insert an arrow on the z-axis of a ternary diagram to indicate increasing order of the element on this axis?

I need help on how I can insert X_{Bi} and a rightarrow on the z-axis of each of the subfigures in my ternary diagram. X_{Bi} implies X subscript Bi while rightarrow is as in LaTeX to indicate that Bi ...
2
votes
1answer
267 views

Pgf plots and a tabular legend

I have a plot where I want to add a legend which is the combination of lines and marks. For that I want to replace (or define a new) the original pgf plots legend type. As said before, in the ...
2
votes
1answer
785 views

Adjusting arrow style on pgfplots axes

Using axis line=middle in pgfplots creates arrow tips on the end of the axes. How can I adjust the size, style, etc? I suppose one way would be to make axes without arrows (using axis line*=middle) ...
2
votes
1answer
220 views

Legends for scaled pgfplots

I am using the pgfplots package to create some plots of data for my thesis. As an example, consider the following code: \documentclass[a4paper]{article} \usepackage{tikz} \usepackage{pgfplots} ...
2
votes
1answer
221 views

TikZ's decoration option for paths derails pgfplots axis

Well, the title says it all: TikZ's decoration option for paths derails pgfplots axis' formatting. Included in the MWE is my whole preamble concerning TikZ. If I run the MWE below, I get the following ...
2
votes
1answer
411 views

Circuitikz works with ground but does not work for rground

If I try to plot the following circuitikz schematic it works: \begin{figure}[bth] \myfloatalign \begin{center} \begin{circuitikz}[american voltages] \draw (0,0) node[ground] ...
2
votes
1answer
338 views

Externalize pgfplotstable with csv file

This is a direct follow-up question to this: Adding units to pgfplotstable header After fixing the output I tried outsourcing the table. After figuring out that standalone does not work with ...
2
votes
1answer
557 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
434 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
395 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
465 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
274 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
2answers
590 views

Problem in adjusting contour label color and numbr of samples in pgfplot

I am trying to create a contour plot using TikZ. I have two questions: How can I change the contour labels color to all black? Is it normal that gnuplot responds slow for creating smoother contour ...
2
votes
1answer
648 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
200 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
152 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} ...