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

Changing the axis xmax/domain in a step plot

Consider the MWE below. This example is from the PGF Plot galery with added 1 outlier (1000,50) resulting in the first (wrong) screenshot below. I want to limit the domain/axis, so I get something ...
0
votes
1answer
35 views

Plot problem with tikz and data from matlab

I extracted data from matlab figures, with the command "dlmwrite('heat.txt',[x',u],'delimiter', '\t')". It gives me a text file with 3 columns of numbers (the first is the abscisse x, and the other ...
2
votes
1answer
46 views

TikZ / PGF : why use \addplot instead of \plot?

I cannot understand the difference between addplot and a simple draw plot. Can someone explain why it is generally preferred on forums to do the second thing on this MWE ? \setuppapersize[A4][A4] \...
0
votes
0answers
50 views

How to draw in tikz with label in radians

I want to draw in TikZ the graph of the next image:
1
vote
0answers
26 views

PGF Plot: Different Graphs/Plots in one file

I want to plot my benchmark results from Celero (C++ benchmarking library) in latex, via PGF Plot: I get a csv file with all data in the form of (here with example data): Now I want to plot the ...
0
votes
0answers
33 views

“Missing \endcsname inserted” when using pgfplots

I encountered the problem while trying to export figures from Matlab using matlab2tikz. However, while troubleshooting I discovered that even simple pgfplots examples did not work. For example, the ...
1
vote
0answers
19 views

Is it possible in pgfplot to label with integers a logaritmic axis?

I already posted a message that pgfplot makes wrong log scaling but it looks like my statement was not clear enough. I am using pgfplot to make a double logarithmic diagram. The relevant part of the ...
1
vote
1answer
34 views

Pgfplots ignoring domain

I'm trying to use pgfplots to plot -3ln(x-2): \documentclass[border=10pt]{standalone} \usepackage[margin=1in]{geometry} \usepackage{amsmath,amsthm,amssymb} \usepackage{pgfplots} \pgfplotsset{...
0
votes
1answer
16 views

Inserting multiple legends in a pgfplot with one \addplot graphics

I would like to have the legends match the line plots from the diagram. I have referred to a lot of legend questions, but I couldn't find one where they were trying to make multiple legends for a ...
2
votes
1answer
28 views

PGFPlot: Newcommand argument Color not respected

I created a new command which prints a graph from a file. So far so good. Now I want to add (to the command) an additional argument color. This is what I have so far: \newcommand{\plotvtf}[4]{% \...
3
votes
1answer
32 views

Independent control of node fontsize in pgfplot

I am making several figures in my paper using pgfplot. I want to independently change the fontsize of tick labels, axis labels, legend and some other notes/labels in the figure. Say, 8 pt for axis ...
1
vote
0answers
26 views

I'm a newers for pgfplots, why the code with differ charts in my two computers, but the lines look so differ?

I try to generate my chart in latex using the same code(named glauber-thickness2.tex) in my Laptop after I tpye "pdflatex -shell-escape glauber-thickness2.tex" in cmd.exe, it generate glauber-...
0
votes
1answer
16 views

Texmaker freezes when iterating over an array and plotting with pgfplots

I have written a latex piece that iterates over two arrays and creates a plot for each entry of the array. However, my Texmaker gets surprised and freezes (I just gets fully processing power of my CPU ...
2
votes
1answer
28 views

Can I get \addlegendimage to print a custom legend draw/line style?

Problem I've created a figure where I plot a line and add a node at the beginning of the line and a diamond at the end of the line by using nodes in my \addplot command like so: \addplot[red,no ...
1
vote
1answer
34 views

Merge two .csv files and add missing rows?

I have two files. A.csv: date,colA 2016-01-01,1 2016-01-02,4 2016-01-03,2 And B.csv: date,colB 2016-01-01,2 2016-01-03,4 I'd like to combine these to get equivalent of: date,colA,colB 2016-01-...
2
votes
1answer
29 views

pgfplots package, error bars, moved when second series is added

I have got a problem. When I add the second series to my plot 1, the error bars from the first series moved from their original position 2. I use pgfplots package. Plot 1: Plot 2: Thanks for ...
2
votes
1answer
24 views

Using a pgfplots style for error bars

The following MWE shows two bar plots with error bars. \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \pgfplotstableread{ ...
2
votes
1answer
30 views

Set upper bound for pgfplots axis width?

Is there anything like \pgfplotsset{ every axis/.append style={ width = 0.9\linewidth, max width = 4in }} Suppose I have a document with hundreds of tikzpicture environments, each having plots ...
1
vote
1answer
29 views

Disable transparency warning when using ctable with pgfplots?

I'm using ctable package for tables with footnotes. IMO it looks better than using booktabs with threeparttable package. I also use pgfplots (which I guess uses tikz package, in turn). Everything ...
1
vote
1answer
42 views

2D Parametric plots in pgf

I am trying to plot a parametric parabola given by x(t)=125cos(30)t and y(t)=3+125sin(30)t-16t^2 Here is my code \begin{center} \begin{tikzpicture} \begin{axis} \addplot[blue, samples=40, variable=\...
1
vote
0answers
65 views

How do I place table below plot so that category matches axis ranges?

Here is something that I'm trying to do is to align my table with x-axis category or range so that column below the x range is corresponding of the data So As example is shown, I want to create ...
0
votes
0answers
18 views

Error using pdflatex and tikzexternalize to compile with PGFPlots

I'm having issues getting tikzexternalize to work with pdflatex in TexWorks with MikTeX. MiKTeX 2.9, TeXworks v0.4.5, PGFPlots v1.13 here is my MWE: \documentclass{report} \usepackage{pgfplots} \...
2
votes
1answer
63 views

TikZ - Black Dot/Diamond in Center of All Diamond Shapes

I am making a flow chart and in the standalone TikZ file everything looks fine, but when I use \input into my thesis all of the diamonds have a small black diamond in the dead center of the shape. ...
2
votes
0answers
20 views

Including high-density vectorial images in pgfplots [closed]

A lot of the figures that I'm creating for work include audio signals at high sampling frequencies and, thus, characterized by a lot of data points. Therefore, in most of the cases, I cannot simply ...
3
votes
0answers
50 views

Make border colour depend on the position in pgfplots

I have the following figure: I want to make the colour of the border depend on the position. Specifically, for x < 5 the border of the top triangle should be black, and for x >= 5 the border ...
1
vote
1answer
20 views

Vertical bar chart with level indicator

I need a vertical bar chart indicating the noise allowed levels. I wrote this MWE: \documentclass{article} \usepackage{pgfplots} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=1] \...
18
votes
2answers
2k views

Use first row of a table as legend entry in pgfplot graph?

I'm using pgfplots extensively and I'd like to avoid having to write legends every time, since all the text files I want to plot have explicit headers. As a comparison, \pgfplotstabletypeset makes a ...
1
vote
1answer
39 views

Positioning of Bar plot in Latex

I try to have two bar plots side by side in using tikzpicture in subfigure. In my document, it looks like this: This does not look good. Problems are: It covers partly the text. The 2 bar plots ...
3
votes
1answer
1k views

Warning for TeX main capacity exceeded when loading files with \pgfplotstableread

I am loading quite a few data files via \pgfplotstableread, but do not further use them via pgfplots. I just kept them in the preamble and switched to plotting them in a standalone document. But now I'...
4
votes
1answer
27 views

Append slopes of linear regressions to a pgfplotstable column

Suppose I have one pgfplots-axis with multiple data series. Now I loop over this and calculate a linear regression of each series. How can I store the slopes of the regression lines to a pgfplots ...
4
votes
1answer
25 views

PGFPlots — avoiding cropping and scaling of the plot

Here is my code: \documentclass[12pt, border=0.5mm]{standalone} \usepackage[T1]{fontenc} \usepackage[sc]{mathpazo} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \...
2
votes
1answer
15 views

How to set column width and space between columns with pgfplots

This code is working fine, but I would like to make the columns larger and have less space between them, how can I do this using pgfplots? \begin{tikzpicture} \begin{axis}[ ybar, legend style=...
0
votes
1answer
48 views

Layout of bar charts in Latex

I created a bar chart, but it does not look good: Problems: the values above the bars does not look good. I want to have it on top of the bars and with slightly smaller font size. 2. The lay-out ...
10
votes
3answers
1k views

Filling in the area under a normal distribution curve [duplicate]

I'm trying to fill the area between the two $z$-scores but I'm not having any luck. Could someone please help me with this? \begin{tikzpicture} \begin{axis}[ no markers, domain=0:6, samples=...
3
votes
1answer
28 views

Alignment of subfigures using pgfplots with clip=false

I am using TikZ/pgfplots with clip=false so that the diagonal line in my "sketch" goes outside the axes' ranges. The problem is that this produces subfigures that are not correctly aligned: \...
2
votes
1answer
39 views

pgfplots fill between with table data creates strange x shapes

I'm trying to fill the area between my data and the x-axis using pgfplots and fill between. My two attempts are shown here: \documentclass[a4paper,11pt]{article} \usepackage{pgfplots} \...
3
votes
1answer
49 views

Pgfplots with GNUplot - data from CSV file - Current plot has no coordinates

I have a following code: \documentclass[a4paper, landscape]{article} \usepackage{amsmath} \usepackage{pgfplots} \usepackage{graphicx} \usepackage{underscore} \usepackage{adjustbox} \usepackage{...
2
votes
1answer
39 views

Connect coordinates in tikzpictures

I use a "parent" tikzpicture to realize a more flexible positioning of pgfplots than what is possible with groupplots i.e. I put the pgfplots in nodes as in the following MWE: \documentclass{article} ...
11
votes
3answers
541 views

Plot large data

As you all know, TikZ has to face the limits in terms of memory, that is given by the TeX compiler. For most of my plots, I have a maximum time step of around 1us and I record several waveforms over ...
0
votes
1answer
43 views

Can't include a global variable in domain of a plot in pgfplots

Consider the following piece of code to be include in a \begin{axis} ... \end{axis} of pgfplots package: \newcommand{\lineasVolumen}[3]{% % #1,2 Volumen inicial, volumen final, #3 paso. ...
1
vote
0answers
19 views

pgfplots different axis scaling in one diagram

So I'm trying to create a plot where let's say the y axis is scaled in 2 per cm above the value 2 and in 0.4 below the value 2. In other words I want to stretch the plot in an area. I'm not talking ...
0
votes
0answers
10 views

How to create legend in loop using parameters from text file with PGFPlots?

I have parameter in a text file and I would like to create legend using those parameters. I have tried to read data with \pgfplotstableread{param.txt}{\myparams} and get specific parameter with \...
1
vote
0answers
44 views

Why pgfplots sometimes cycles markers and colors and sometimes doesn't?

Why the following examples differ considering line color and markerstyles? First one draws black lines with no markers. Same thing happens when I add plots with \addplot table [x index=0, y index=1]{...
2
votes
1answer
31 views

Pgfplots - large plot - TeX capacity exceeded

I have a following code, which is supposed to generate some output and one large plot from the file data5.csv: \documentclass[a4paper, landscape]{article} \usepackage{amsmath} \usepackage{pgfplots} \...
2
votes
0answers
35 views

Identifying a fix for an Undefined control sequence (\pgfdeclareplothandler) error

I would like to identify a fix for the following error: "C:\Program Files\MiKTeX 2.9\tex\generic\pgf\libraries\pgflibraryplothandlers. code.tex" ! Undefined control sequence. l.24 \...
3
votes
2answers
41 views

TeX capacity exceeded when calling LuaLaTeX

I am using recently updated MacTex Distribution 2016 on a MacBook Pro Mid 2009 and Texmaker is my editor. I want to include a phase portrait created with matlab2tikz with a lot of lines. Reducing the ...
2
votes
0answers
12 views

PGFPlots - Make 'mark repeat' count actual data points, not just visible

In the following code I expect marks of both series to be on aligned on vertical lines: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \begin{document} \...
0
votes
1answer
30 views

LuaLaTex fails on Tikzexternalize on very easy MWE

I am using recently updated MacTex Distribution 2016 on a MacBook Pro Mid 2009 and Texmaker is my editor. I searched a long time for a solution to this problem but nothing really helped, so I give it ...
1
vote
1answer
164 views

how can I animate a circle over the curve?

I'm trying to put the circle over the curve but the operation generates an error, and I don't found how avoid this problem. \documentclass[]{standalone} \usepackage{animate} \usepackage{tikz} \begin{...
4
votes
0answers
48 views

Dimension too large Error in bar drawing

Here is my code. The following code returned ‘Dimension too large’ error. This error has different reasons since I cannot fix it after I surfed on the internet. The code would be work if I ‘change ...