{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

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
166 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 ...
4
votes
1answer
79 views

Quiver plot in polar coordinates

I need to plot an analytically given vector field in polar coordinates. I would like to get something like the picture in this answer by Christian Feuersänger, but in circular axes. I tried to use the ...
13
votes
4answers
6k views

matlab2tikz - TeX out of memory

I am using matlab2tikz to import figures from MATLAB to tex. However I quickly get the message TeX capacity exceeded, sorry [main memory size = 3000000]. I have tried expand main memory using ...
1
vote
0answers
29 views

PGFPlots consistent multiplier at ticks labels

I need a little help with multiplier format in the PGFplots. The MWE is: \documentclass{standalone}% \usepackage{tikz}% \begin{document}% \begin{tikzpicture}[baseline]%, \begin{axis}[ ...
1
vote
1answer
49 views

Dimension too large when changing y axis mode

I am using tikz to plot a figure in x-y plane, however when I change the y axis mod to logarithmic scale, I face to an error "Dimension too large". I searched in this website, but there were the same ...
4
votes
1answer
71 views

Dimensions too large on plot

I'm trying to plot a Gauss function/normal distribution, based on the answer to this question, however my domain is 0:10000 and the sample size is 95. This is resulting on the following error: ...
4
votes
1answer
56 views

Embedding pgfplots' plot3 into a tikz-3dplot

I'm trying to embed a 2D Gaussian into a tikz-3dplot, but I'm having problems transforming the coordinate systems. As a simplified example, I'm plotting a plane in pgflots' \addplot3 and I'm embedding ...
2
votes
1answer
34 views

pgfplot makes wrong log scaling

I am making a simple semi-logarithmic diagram, with axis set as \begin{axis}[ ymin=0.25, ymax=1.1, % y scale ymode=log, ] Basically, it works, but with that settings produces tick labels like $...
3
votes
1answer
20 views

How to specify number of decimal places in node near coords?

Is there a way to specify that node near coords labels should use 1 rather than 2 decimal places? For example, in the code below, Singapore is printed with 8.1 (correct), but Niger is printed with 46....
1
vote
0answers
22 views

Tikzexternalize failed in pgfplots, using TeXShop

I am dealing with a picture with a very large database. I tried to turn on the --shell-escape mode and use tikzexternalize but it doesn't work. Though I have tried so many ways suggested on the ...
5
votes
1answer
197 views

Complex 3D drawings with tikz

I've already produced the following picture by means of TikZ. To do it, I modified the Sudoku example found here as follows: \documentclass{standalone} \usepackage{xcolor} \usepackage{tikz} \...
8
votes
4answers
831 views

tikz/pgfplot — always same distance between marks

Is there a way to get for all tikz-plots in one LaTeX document the same distance between the plot marks, ie the distance between the marks should be independent of sample size. It would be really ...
2
votes
0answers
37 views

pgfplot not showing first data point loaded from external file [closed]

This is my first time using pgfplot, I'm trying to get data plotted from a file but for some reason the very first data point is not plotted. Here's the data that is written to an external txt file (...
2
votes
1answer
41 views

fill between in pgfplots changes legend font [duplicate]

I am working on a document in which several plots are placed alongside each other. Some of them use "fill between" and some of them don't. The problem now is that depending on whether this is used or ...
3
votes
1answer
37 views

Adding a break to y axis in a stacked bar plot

I would like to add a break to the y axis of my stacked bar plot. It looks now like this: It would be great, if it would look similiar to this, but without the mistakes: Here is the tex code: \...
2
votes
0answers
35 views

Setting the coordinate style in the environment of axis

I change the coordinate of x, errors occur. The x coordinates I want to show are 10^-3, 10^-6, 10^-9, 10^-12. By now I only write a test. In the test there are only two coordinates. It can compile ...
2
votes
0answers
21 views

Label in xbar stacked not shown

I'm using pgfplots 1.7. In the following plot the labels for the bars are not shown. \documentclass{article} \usepackage{pgfplots} %\usepackage{pgfplotstable} \pgfplotsset{compat=1.7} \begin{...
16
votes
2answers
247 views

How to draw a graph with several axes?

I would like to draw a graph as you can see it on the picture below: All I got was this one here: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ ...
4
votes
1answer
34 views

PGFPlots: Automatically forcing ticks at the end of an axis

I would like the ticks of the colormap from the first picture below to show the maximum and minimum of the data like in the second picture, in this case 1.35 and -0.26. I know I can do it through ...
0
votes
1answer
30 views

Using a comment line of a table as title?

I have data sets with tables like this one: @ DATE %s 16/06/16 @ TIME %s 17-01-45 NAME POS XY.1 10 XY.2 20 XY.3 25 Plotting and reading the table in general works with \addplot[] table[...
8
votes
1answer
92 views

Fill pgfplot bars with colorbrewer

I want to use colorbrewer in my project since it provides color cycle lists but I struggle to use them in the right way I think. Please have a look at my MWE: \documentclass{article} \usepackage{...
0
votes
1answer
46 views

pgfplots: using a list generated with \foreach as symbolic coords

I would like to create some bar charts using pgfplots. Each chart will have a similar format, but with some different labels and values. I am trying to make a command that will generate my chart from ...
1
vote
1answer
23 views

How to get the spaces properly on the x axis, how to place the y values on the corresponding bars?

I am using the following commands to draw a barchart. \begin{tikzpicture} \pgfplotstableread{ % Read the data into a table macro Label Female Male 2006-2008 ...
6
votes
2answers
4k views

pgfplots: relative node positioning in axis cs

I have got a file to plot with pgfplots. For convenience I'd like to define a measure in the plot. Unfortunately the relative positioning seems to give weird results. If I define the node coordinates ...
0
votes
0answers
27 views

Adopt axis range from other plot with pgfplots

How can I read and store the automatically computed values of xmin and xmax from one axis and apply it to another? My use case is a plot consisting of two subplots. I have a main plot in which I plot ...
3
votes
1answer
97 views

Pgfplots and large exponents in expression and domain

After I discovered the fpu library for increased precision, I tried to make a plot involving large exponents. I choosed as an example a plot of the gravitational force of the moon on a test mass in SI-...
1
vote
0answers
37 views

Multiple lines plot from a CSV file

I am trying to plot a multiple lines graph (154 lines) with LaTex. This is done improving a previous code here obtained: \begin{filecontents*}{Dataset.csv} ... \end{filecontents*} \documentclass[...
3
votes
1answer
34 views

tikz xbar extra coordinate

I am trying to plot a comparison of numbers with \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ xbar, y axis line ...
5
votes
1answer
40 views

Can be \pgfplotsset named?

For example, that in a document I have a set of pgfplots images with two or three distinctive common subsets of \pgfplotsset{...}. Is it possible to write them in document preamble and in particular ...
3
votes
1answer
44 views

colorbar with definite number of discrete colours; with matching ticks placement

Why is it so difficult in Pgfplots to configure a colourbar with a user-defined number of discrete colours and with ticks exactly placed on the borders between the colours? Consider this example: \...
1
vote
1answer
529 views

Including a tikz figure with a reference to a table on file, problems with folder structure

I am trying to include a tikz figure in the chapter 6 of my thesis. I am using separate folders and .tex files for each chapter, as you may notice in the example. This means that in my main document I ...
9
votes
2answers
2k views

import input pgfplots with relative paths

The package import makes it posible to \input (and \include) a .tex document which itself \input (or \includegraphics etc.) stuff using relative paths. I was hoping that this also would work with the \...
1
vote
1answer
36 views

Specify xtick/ytick with multiplication in Pgfplots

I often use plots with a second x/y-axis which is proportionally related to the first one. Therefore, I would like to calculate the tick-values by multiplication. Let's say the first one is a time and ...
10
votes
1answer
8k views

Boxplot in LaTeX

I am new to LaTeX. How can I draw a boxplot in LaTeX. My data set is as below index median box_top box_bottom whisker_top whisker_bottom 0 1 1.2 0.4 1.5 0.2 1 2 2.3 1.5 2.7 1 2 0.7 1.4 0.5 1.9 0.1 ...
5
votes
2answers
3k views

Problem with pgfplots/pgfkeys: “I do not know the key '/tikz/use units'”

Problem in short: I'm using pgfplots but I can't use units in the labels. I tried this minimal example (from http://pgfplots.sourceforge.net/gallery.html) and get an error message: \documentclass{...
2
votes
0answers
28 views

Out of place sloped fading with fillbetween library

The following code generates the next plot: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepgfplotslibrary{fillbetween} \usetikzlibrary{fadings} \tikzfading [name=...
1
vote
1answer
26 views

Removing lines from pgfplots plots

How do I remove the line segment joining (0, 0) and (1, 1) when 'twopoints' contains: 0 0 0 1 1 0 in the following example? \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{pgfplots}...
3
votes
1answer
46 views

Automatic labelling of isolines based on table's column name

I would like my code to use the column name (from pgfplotstable) to automatically label the lines. Here is a MWE: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \...
10
votes
9answers
5k views

Drawing minimal xy axis

can anybody help me to draw this minimal example of an xy axis? I couldn't find anything similar on the forum. The axis should be black but the grid behind it a shade o gray, dashed. It would be ...
1
vote
1answer
41 views

Changing commas and dot on bar graph

Here's what I have right now: Is there a way to change commas for dots and vice versa? This table was made using the answer from this question, so it's basically the same thing. This isnt't an ...
2
votes
2answers
114 views

PGFPlots: How to add a legend entry from a macro into a foreach loop?

I'm doing a stacked bar plot where each plot is taken from a different column of the same file, and I have the list of column names I want to use in a macro: \newcommand\tools{tool1, tool2, tool3, ...
2
votes
1answer
49 views

How to indicate error bars on the legend symbols in pgfplots

I am transitioning to using pgfplots to do most of my plots these days, however I am not always able to get the plots looking as I want them to. I am plotting some data points with error bars, and it ...
3
votes
1answer
98 views

Plot that shows that largest root tends to 1

I am considering x^{i+2}-x^{i+1}-1. As i goes to infinity, the largest root tends to 1. I would like to have a plot in latex, for example with pgfplots, that shows this, maybe one could plot the ...
2
votes
2answers
87 views

Add and mention some pages in another page

How can I add some pages in another page like the following picture, and how can I mention them with this free arrows on the text!
3
votes
1answer
53 views

Pgfplots - automatically distinguish multiple plots in one figure

I'm writing some app, which generates a TeX code. My program creates variable number of plots and I'd like to use visualize them using pgfplots. In the old version of this app (not created by me), ...
1
vote
1answer
55 views

3D spherical coordinate system in pgf plots

I just learned 3d rectangular graphs in pgf-plots, and now I need to graph in spherical coordinates. Ive been reading the manual and cant find an answer. Is there a simple way to plot something such ...