{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
1k views

How to include extra ticks in pgfplots without them appearing in bold face?

In order to include a cross through the origin in my plot, I write the following under \begin{axis}: extra x ticks={0}, extra y ticks={0}, extra tick style={grid=major}, However, the 0s appear in ...
1
vote
1answer
234 views

Using pgfplot externalize with .eps output in letter 10cm*10cm

Using pgfplots, externalize an .avi file and using DVI>ps, externalize an .eps file on A4 but I want a figure with width and height of 10cm in letter (10cm x 10cm). How can I make it? (If you ...
1
vote
1answer
877 views

Fill a quadrant with PGFplots and axis equal=true

I need to fill quadrant three and want to use axis equal=true. However, using this setting changes the minimum value of x. How do I adjust this to fill the entire quadrant independent of axis ...
1
vote
1answer
247 views

pgfplots: correlation for data values from file works, but with errors

maybe I do not to see the wood for the trees, but I'm always getting error messages for compiling the following pgf code, while the output looks like the way it should. Does anyone see whats wrong ...
1
vote
0answers
31 views

Indicate infeasible / excluded region in TikZ and pgfplots

Problem I would like to indicate an infeasible region in one of my pgfplots by manually drawing a path in the canvas. This should be a hatched pattern that is decorated on the path, something like ...
1
vote
0answers
50 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
0answers
39 views

how to change color at line chart?

I have the following code. \begin{figure}[p] \centering \begin{tikzpicture} \begin{axis}[ use units, width=15cm, height=8cm, % size of the image grid = major, ...
1
vote
0answers
23 views

\draw via \pgfplotstableforeachcolumnelement fails outside {axis} environment, but works inside?

Consider this MWE: \documentclass{article} \usepackage{pgfplots} \usepackage{pgfplotstable} \usetikzlibrary{calc} \pgfplotstableread[col sep=space,row sep=newline,header=true]{ ts val 0.0 0.0 1.0 ...
1
vote
0answers
37 views

Data manipulation in contour maps (x/y-axis and contour label)

I am using contour maps in pgfplots as part of CAD as well as documentation. Serving both purposes I would like to improve the readability of my contour maps, by multiplying x- or y-axis times a ...
1
vote
0answers
35 views

Make a large heatmap with gaps and tables between

I am trying to make a large heatmap which looks like this with gaps and row or column names written in some of the cells. Empty cells are also present in the heat map. Can i make this using pgfplots? ...
1
vote
0answers
87 views

Embedded axis Pgfplots

So I need to display data as follows: every day for a month I have a set of values obtained in different hours. I want the axis to contain the date but between a date an another I want to have the ...
1
vote
0answers
44 views

how to draw a unfinished data point bar in pgfplots?

I want to present some experiment comparisons. One of the candidate (SHJ) takes too long to run. Could anyone give me some suggestions on how to present such data point in a bar chart? Thanks in ...
1
vote
0answers
45 views

Scaling inset plot relative to main plot axis length

I want to create a plot with a second, smaller plot as an inset. This is easy enough using the following code, where the widths of the plots are defined. However, I often use figures in several ...
1
vote
1answer
34 views

Loop through table for boxplot prepared

I am trying to produce figure with 2 boxplot prepared plots from an inline data file. I grabbed this code from here to use as a starting point. Given that the wrapper code allows the boxplot data to ...
1
vote
0answers
28 views

Pgfplots histogram with input data already counted

I have input data that looks like this: Age Count Cumulative Count Percent Cumulative Percent 24 1 1 1.4084507 1.4084507 25 1 2 1.4084507 2.81690141 30 2 4 ...
1
vote
0answers
64 views

Special decoration for TikZ pin feature

I try to achieve the curvy pin style I sketched below. It would help to distinguish pin lines from grid and other lines in the diagram. How can I realize a decoration that automatically draws such ...
1
vote
0answers
34 views

Stacking scatter plots with different y-axes in pgftex

I'm trying to create a stack of scatter plots with a common x-axis but different y-axes, alternating between left and right sides. I'm just learning pgfplots and while I've read up on using multiple ...
1
vote
0answers
40 views

Plotting a signal along with its harmonics in one figure [duplicate]

I would appreciate it if someone could help me plot a figure similar to the following picture. I want to draw the fundamental signal along with a few first harmonics using pgfplots.
1
vote
0answers
47 views

pgfplots: Explicitly Setting 'Line and Mark Intersection' In Plot

Is there a way to specify where a line intersects a 'mark' on a pgfplot? MWE: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{figure}\begin{tikzpicture} ...
1
vote
0answers
83 views

PGFPLOTS: Insert a boxplot outside the chart axis labels, much like GNU R

I have some code that plots a horizontal barchart. What I would like to do is put a boxplot or confidence interval above my horizontal axis which is on top of the chart. GNU R (see R In Action, Robert ...
1
vote
0answers
38 views

“Dimension too large” error with pgfplot generated with matlab2tikz [closed]

I would like to insert a tikz plot generated with matlab2tikz in my code. This is the code to generate the matlab image X1=[7.4632 8.0349 8.5251 8.8176 9.2251 9.5559 9.9214 ...
1
vote
1answer
80 views

PGF stacked bar graph not drawn correctly

I am having problem with the following code which is supposed to produce a simple stacked graph. \documentclass[tikz,border=2pt]{standalone} \usepackage{pgfplots} \usepackage{tikz} \begin{document} ...
1
vote
0answers
58 views

pgfplots - How can I increase TeX's capacity for plotting large datasets? (TeX Live on Windows)

There are several questions and replies on this topic, yet so far I haven't found one which reliably details the steps for TeX Live and TeXstudio on Windows. Of course the editor might be an ...
1
vote
0answers
47 views

Why these thin lines on a PGFPlot doesn't appear on some PDF readers?

I remember reading about PDF reader issues on this StackExchange, but I cannot find the links. The following TikZ picture has some thin lines in light green that doesn't show up on some readers (e.g. ...
1
vote
0answers
109 views

Incomplete parametric curve, ''written letter e'' [closed]

I have tried plotting some parametric curves like (x^3-3*x,3*x^2-9), and it works fine. The following, however, does not work: (x-x/(1+x^2),1/(1+x^2). I have tried several ways of plotting it but the ...
1
vote
0answers
57 views

legend transparency in pgfplots

I want to have a legend in pgfplpots such that it overwrites grid lines (i.e. grid lines are erased where the legend is placed) but not the axis (i.e. axis are drawn on top of legend, in case legend ...
1
vote
0answers
40 views

Displaying two plots side by side not displaying titles correctly [duplicate]

I’m writing a report and using the following code to display a bode-diagram. To save some space (I have several of these figures), I’ve displayed them side by side, but the title of the right plots’s ...
1
vote
0answers
81 views

Create a bar char from CSV

I have a .csv file that looks like this: gender.csv GENDER,NUMBER,PERCENT MALE,20,20 FEMALE,80,80 TOTAL,100,100 I want to create a bar chart using MALE and FEMALE. GENDER can be the chart name or ...
1
vote
0answers
86 views

fillbetween causes Illegal unit of measure (pt inserted) [closed]

This works beautifully: \documentclass[12pt]{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} %\usepgfplotslibrary{fillbetween} \begin{document} \begin{tikzpicture}[ ...
1
vote
0answers
68 views

pgfplot same size font in figures and same size figures

Hi I've created figures with standalone and pgfplot package. The figures output size are different to one another but more importantly the font size are different. I would like all figures to be of ...
1
vote
0answers
58 views

Graph Labeling and Text Overlay Ability

I have a couple of question in regards to LaTeX ability to overlay text on a graph at a specific point. The background: I have a time-series plot that I load in to LaTeX using a txt file and the ...
1
vote
1answer
113 views

pgfplot tikz single plot with 2 y axis

I have 5 columns of data in a txt. file as nxI Bfield1 magmoment1 Bfield2 magmoment2. I am attempting to implement nXI - x axis, Bfield1 and Bfield 2 as my y axis and magmoment1 and magmoment 2 as ...
1
vote
0answers
198 views

Error using lualatex and tikzexternalize to compile document with PGFPlots

I have a fairly large document with a number of pgfplots diagrams and due to memory capacity limits in PDFLaTeX I am now using LuaLaTeX to compile. While this works well, it takes forever to produce ...
1
vote
0answers
22 views

Adding legends to tikzpicture [duplicate]

I have tikzpicture (with 3 graphs from my data files. I want to add legends to data1, data2 and data3 to my picture, is it possible? \documentclass[english]{article} \usepackage{tikz} ...
1
vote
0answers
77 views

PGFPLOT Externalization not working [closed]

I am trying to externalize PGF Plot to be saved as EPS file using latex and enabled shell-escape. \documentclass[a4paper]{article} \usepackage{lipsum} \usepackage{tikz} ...
1
vote
0answers
181 views

Plotting Multiple Time Series plots in LaTeX using PGFplots and txt files - Relativity Issues

I have a problem with plotting multiple time series plots in a single graph in Latex. Background: I have three products - Potatoes, Apples, and Oranges. Each products' historical price and ...
1
vote
0answers
89 views

Last version of pgfplots, error with LuaLaTeX

I have just installed the last version of pgfplots (version 1.10) in my local texmf directory but when I try to compile a file with LuaLaTeX I get the following error: ...
1
vote
0answers
281 views

! I can't find file `pgfutil-common-lists.tex'. \input pgfutil-common-lists.tex [closed]

I've recently run into the following error message that I have no idea on how to resolve: ! I can't find file `pgfutil-common-lists.tex'. \input pgfutil-common-lists.tex It occurs when I use the ...
1
vote
0answers
115 views

Problem with PGFPlots and Tikz fading library with disappearance of nodes near coords and irregular fades

It seems like whenever I turn on Fading from Tikz Fading library, the nodes near coords parameter to the axis environment is not processed by PGFPlots correctly. I am attaching the code and the image ...
1
vote
1answer
162 views

Formatting issues on x-axis and y-axis in latex

I have a latex code to generate graphs from a text file. The contents of the text file are like this: 0.01 0.119693 48.43196 0.02 0.1310796 6214.208 0.03 0.1289268 12973.42 0.04 ...
1
vote
0answers
87 views

pgfplots: enlarge x limits abs value and date coordiantes

Enlarging x limits of date coordinates by an absolute value used to work with pgfplots 1.4, but it gives me an error with the newer version 1.8. Can anyone suggest a working solution to the minimal ...
1
vote
0answers
80 views

pgfplots change fontsize to 1pt nodes near coords

i want to change the fontsize of the "nodes near coord" and also the y tick labels in a pgfplot to 1pt (no worries, that's just of theoretical interest). I found that ...
1
vote
0answers
84 views

pgfplots: xticklabels and yticklabels in fractions

How to properly put xticklabels and yticklabels in fractions? \documentclass{article} \usepackage{pgfplots} \let\ds\displaystyle \begin{document} \begin{tikzpicture} \begin{axis}[ scale only ...
1
vote
0answers
85 views

Proper referencing to programmatic nodes in pgfplots axis? (no shape is known, ill-formatted floating point number …)

This is going to be a slightly messy/unclear question, but here it goes. Basically, I want to work with a plot in pgfplots, where I want to also generate programmatically some nodes (maybe as result ...
1
vote
0answers
50 views

Dimension too large with a small set of data

I'm trying to compile a simple tikz plot with floating point numbers, but I'm gettin a Dimension too large error. The tikz file works with a different data set, so I guess the problem has something to ...
1
vote
0answers
27 views

Base 2 logarithmic scale [duplicate]

I am plotting data with pgfplots using semilogxaxis that use base 10 logarithm. Is there a way to change the base of logarithmic-axes (I need an axis where power of 2 values are separated by the same ...
1
vote
1answer
57 views

Pgfplots, problem with pin and [francais]{babel}

When I don't use babel package, pins are ok. I suspect there is a problem with the colon, in french we put a space before and after, but how to tell pgfplot not to do it? \documentclass{standalone} ...
1
vote
0answers
99 views

inserting tikzstyle objects into sty files [closed]

I am trying to put a tikz object (pie chart) into the sty file so it will update its shape as the presentation proceeds (instead of \insertframenumber/\inserttotalframenumber). the code for the pie ...
1
vote
0answers
107 views

PGFplots - bold nodes only at ticks

The following code produces the diagram below: \begin{center} \begin{tikzpicture} \begin{axis}[date coordinates in=x, axis background/.style={fill,bottom color=gray!50,top color=white}, ...
1
vote
0answers
53 views

Citation in externalized pgfplots

I have a few \cite commands in my pgfplots which are not being displayed properly when externalization in on. As soon as you turn off the externalization, the references will be displayed correctly. ...