{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
2answers
39 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
41 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
44 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
14 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 ...
0
votes
0answers
16 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 ...
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 ...
1
vote
0answers
22 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} ...
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
0answers
44 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-...
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
23 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=\\,...
2
votes
1answer
24 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 ...
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
20 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
40 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). ...
10
votes
0answers
78 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} \...
0
votes
0answers
30 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{...
2
votes
1answer
28 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{...
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
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
33 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
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
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
26 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 ...
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} \...
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 ...
5
votes
0answers
27 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{...
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} \...
1
vote
0answers
45 views

x,y axis label values should be node label

I am new in tikz, I want to draw x,y axis and label of x,y axis should the node labels \documentclass{standalone} \usepackage{mathtools} \usepackage{pgfplots} \usepackage{siunitx} \sisetup{per-mode=...
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]{...
1
vote
1answer
33 views

Create graphics dynamically at the compile time in a pgfplots

I am trying to create a 2D plot in which the x-label ticks are pictures, similar to what is posted here, with the difference that the images be created at the compile time in a parametric manner. The ...
2
votes
1answer
63 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 (...
2
votes
2answers
76 views

Plotting two 2D-plots in a 3D plot using pgfplots

I am trying to create a 3D plot similar to a standard xyz coordinate system by using pgfplots. I want to plot two 2D plots one in x1-y and one in x2-z plane, similar to the following illustration (...
3
votes
1answer
72 views

How to remove the axis lines

How to remove the axis but the label should be there Eg:current output Expected output I am using the following code \documentclass{standalone} \usepackage{mathtools} \usepackage{pgfplots} \...
3
votes
0answers
46 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: ...
5
votes
1answer
189 views

How to improve visibility of a black and white plot?

I'm plotting information from 10 sets in the same plot. The result is very messy since the lines for each game intersect and overlap with each other, and the width of the final image is small. Here's ...
6
votes
1answer
46 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 ...
2
votes
2answers
104 views

How to draw a graph of a specific form in LaTeX

How can I draw a graph like this in LaTeX using pgfplot package?
18
votes
2answers
355 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....
4
votes
1answer
95 views

visualizing matrix factorization

I want to create diagram like below. Update: Mostly done. \documentclass{standalone} \usepackage{amsmath} \usepackage{tikz} \usepackage{colortbl,pgfplotstable} \pgfplotstableread[header=false]{ ...
1
vote
0answers
51 views

Tikz Pgfplot-Create user defined colorbar

I want to create only colorbar in Latex. Earlier I have used to Gnuplot to plot heatmaps along with colorbox(yeah, They are called colorbox in Gnuplot). The user defined colorbox in Gnuplot plot is ...
2
votes
1answer
42 views

Problem with plotting function with pgfplots (Takagi function)

I'm trying to plot step functions that when sumed will constitute the Takagi function. The graph of the first step functions is as it should be, but the graph of the second one fails. See the MWE ...
4
votes
0answers
38 views

pgfplots: Plotting one subfigure per country, from datafile

I have data in csv format at the country-year level, and using pgfplots I would like to plot a given variable over time, with one subfigure per country. My idea was to use a groupplot environment: and ...
3
votes
0answers
45 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{...
2
votes
1answer
60 views

Highlight the label with in the node

I am new in tikz,I am manually create an image,In that figure coloured part shows that highlight the label how I do this by tikz I am using the following code for the label, How alter this code. \...
2
votes
0answers
23 views

Plot cumulative normal distn in tikz

I tried to follow Jake from Plotting bell shaped curve in TikZ-PGF with slight modification. 1) I just want the univariate normal cdf with red dash line at the cut-off, but some how my dash line seem ...