{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
0answers
8 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
26 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
31 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
0answers
67 views
+50

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-...
4
votes
1answer
51 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 ...
2
votes
2answers
105 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
37 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
87 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
73 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
45 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
50 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 ...
2
votes
0answers
17 views

PGFPlotsFill intersection of several inequalities

I have the following figure using pgfplots. Currently the green area---the intersection of the yellow, blue, and red shadings---is hand-drawn using TikZ's \filldraw. I wonder if there's way to ...
2
votes
1answer
48 views

Pgfplot - Plotting with arrows to indicate direction between two consecutive data points

Is there any easy way to automatically create arrow between two consecutive data points read from a table? (in addition to adding a mark). See attached picture. For large data set, I find adding node ...
0
votes
0answers
18 views

Pgf surface plot - Not getting the proper plot

I have produced a surface plot in matlab which looks like this I want to reproduce the same using pgfplot to include in my latex document. The data for the surface plot can be found here. But when ...
1
vote
0answers
23 views

Expand variable in pgfplots key

In the example below I am trying to set explicitly some numbered styles and then loop through those styles in a plot. However the variable \i doesn't seem to expand correctly in mystyle\i (however it ...
2
votes
0answers
15 views

Filling bar chart with patterns for black and white printing [duplicate]

I am trying to plot a bar chart like below: \documentclass{standalone} \usepackage{graphicx} \usepackage{tikz} \usepackage{pgfplots} %\usepackage{subcaption} \definecolor{blues1}{RGB}{198, 219, 239} ...
18
votes
2answers
356 views

Pgfplot - Cross section of a 3D line plot (Poincare Sections)

I have plotted a 3D line using this following data: p p1t p2t -65.79 -210.81 137.73 -124.76 -182.7 189.67 -170.78 -141.97 233.17 -206.39 -96.42 257.48 -226.99 -40.212 268.45 -231.57 20.337 255....
0
votes
0answers
18 views

Pgfplots with gnuplot - list of coordinates, not file

I want to do a simple graph, where its points will be assigned by a list (NOT a file) of coordinates. So, I know, that I can do something like this: \addplot gnuplot [raw gnuplot, color=blue]{plot "...
2
votes
1answer
25 views

tikzpicture fails with date input coordinates taken from file

I have a problem implementing a tikzpicture. I want to plot the file with date and TIME and a climatic variable. I followed the PGF manual in section 4.21.2 "Dates as Input Coordinates" and if i do ...
0
votes
1answer
27 views

Pgfplots domain [duplicate]

I have three columns of data and one which stops at a moment, but the other continues. But LaTeX creates the values as a constant, and I don't want them to appear, how to do? \begin{figure}[h!] ...
2
votes
0answers
16 views

Scaling axis in addplot

When using the following code \documentclass[border=1cm]{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis} \addplot[...
2
votes
1answer
25 views

Pgfplots does not print one bar

I have this really simple pgfplot: \documentclass{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \begin{document} \begin{tikzpicture} \pgfplotstableread[row sep=\\,...
3
votes
3answers
86 views

How to color tick label background when curve overlaps it

I have lots of pgfplots in my document with curves that pass vertically through points where I want an x tick label. This makes those labels hard to read. I do want those labels to still be there. I ...
2
votes
1answer
21 views

'Undefined control sequence' with \addplot

When trying to insert a TikZ figure, using \addplot, I've got an 'undefined control sequence'. My code is: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} ...
2
votes
1answer
44 views

understanding how to have one legend for a group plot

I know this question has been asked in various forms before, but I just do not understand the syntax of one of the solutions that I would like to use. I have checked the documentation of Tikz and pfg ...
2
votes
1answer
42 views

Adding 3d axis to a 3dplot figure

I have 3D surface plot obtained from matlab. I would like to add axes to it with labels using latex. What is the proper way of doing this? Or do I have to just guess and draw lines (trail and error). ...
3
votes
2answers
287 views

Using pfg plots to plot unit simplex in 3 dimensions

I am trying to plot something that looks a little like this: I am using the following code: \begin{tikzpicture} \begin{axis}[ grid=major] \addplot3[ surf, ] coordinates { (1,0,0) (0,1,0) (...
10
votes
0answers
79 views

Is there a general rule when to write pgfplots keywords together?

When using tikz especially pgfplots I find it often difficult to remember if a keyword is written together or separaded. Examples for keywords written together are: xticklabels enlargelimits ...
2
votes
1answer
39 views

bar chart with pgfplots

I am trying to create a bar chart with pgfplots. My code is similar to example : \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{figure}[h!] \begin{tikzpicture} \...
7
votes
1answer
152 views

How can I get a stacked bar with single values and sum on the side

Based on this question I was able to put partial and total values on my bar plot. My bars have some really small values though and it is impossible to fit the numbers in some ranges. I would like to ...
2
votes
1answer
29 views

Rounding off before plotting

Is it possible in latex to directly round off numbers from tables before plotting? I tried using round-precision from siunitx package, but this does not seem to work. MWE \documentclass{...
3
votes
1answer
12 views

Use one axis' limit values in another axis

I'm working on a pgfplots source that plots a (dynamic) data file with different scale of the parallel axis. This is easy when you know the axis/data range in advance, but what if the range of axis/...
0
votes
0answers
41 views

How to make a grouped bar plot with different sized bars?

I want plots with grouped bars, two y axes and bars of different size shown in the Pictures below: What i got so far: \documentclass[x11names]{article} \usepackage{pgfplots} \begin{...
1
vote
0answers
30 views

Problem using `siunitx` with `fourier` in `tikz`

For my reports I'm using both the packages fourier and siunitx at the same time. I recently noticed that units automatically enclosed in brackets using the library units for pgfplots are shown in a ...
1
vote
1answer
25 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-...
1
vote
0answers
43 views

Space-saving plotting technique

My goal is to create a template for a report (see the figure) that will be used to programmatically generate reports from a data source. The approach I have thought of is to use a table combined with ...
1
vote
1answer
38 views

TikZ Smith Chart with s2p (touchstone) files

I'm trying to plot touchstone (s2p) data exported from another software, but the touchstone coordinate system is rectangular. So I have to overlay a XY plot over the smith chart to get it right. The ...
1
vote
1answer
31 views

Best way to apply same style to data/theory pair-plots automatically?

Suppose I have multiple plots of experimental data series in one axis and that I also want to plot a theoretical prediction for each series. Is there any good way to group each data/theory pair ...
1
vote
1answer
30 views

Center legend above (or below) a groupplot WITHOUT references

So, I need to place my legend outside a groupplot with 2 columns and 2 rows. I'd like to center it either above or below. I read a lot of similar question on tex@stackexchange, but all of them seems ...
6
votes
1answer
47 views

pgfplots -> contour gnuplot with lualatex instead of pdflatex

i want to compile several pgfplots pictures with lualatex, since it dynamically allocates memory for compiling (in contrast to pdflatex). In some plots, like my MWE.tex given below, i want to use a ...
1
vote
1answer
160 views

Opacity option with Fill in Pgfplots

I am trying to fill two overlapped regions using fill and pattern. My problem is that the opacity option is not working in my example: \begin{figure}[ht!] \centering \begin{tikzpicture}[scale=0....
79
votes
5answers
38k views

How to expand TeX's “main memory size”? (pgfplots memory overload)

I'm compiling one pretty simple LaTeX file with few dozen of pgfplots. Now, I can compile part by part, but am unable to compile it all at once. I really need good precision for all those plots (noise ...
3
votes
1answer
41 views

Fill Area pgfplots

I somehow have problems getting the area below my curve filled. The library fillbetween should be able to handle this but fails for me (probably because of me). MWE: \documentclass{standalone} \...
6
votes
1answer
79 views

Shaded area under pgfplot, starting with first data point, outputs wrong shaded area

This post is building of the question posted here. When I try to get the area under the curve to show up between 100 and 3000 by using the soft clip={domain=100:3000} command, I get this plot: I ...
2
votes
1answer
57 views

Preventing the graphical xticklabels from stretching

I need to have my x-labels in my pgfplots to be vector graphics. How can I prevent the graphical x-labels from streching? In below is a MWE that can duplicate my problem. The drawn rectangles and ...
4
votes
1answer
39 views

Scale tikz reference in footnote

Using a \ref to a tikz/pgfplots maker works fine in normal text, but it seems not to scale with the text size e.g. the marker is too large in a footnote as in the following MWE \documentclass[14pt]{...
5
votes
0answers
28 views

Skip some x tick labels when using `xtick=data`

I am plotting some csv data with \documentclass[border=10pt]{standalone} \usepackage{tikz} \usepackage{pgfplotstable} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \begin{document} \begin{...
2
votes
1answer
64 views

Skip to long lines in pgfplots

How do I skip lines, that are to long, when using \addplot command and data read from csv file? My database has around 500k points describing position in x-y space. Position can be wrapped around (...
1
vote
1answer
33 views

Increment the x axis by any number

I am new in tikz, I want to increment the x axis by any number(eg:2,3 e.t.c) My current output Expected output I am using following code \documentclass{standalone} \usepackage{mathtools} \...