{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

0
votes
0answers
8 views

adjustbox missing endgroup inserted. How to fit longtable to page width?

I am working on my thesis. The appendix contains 2 large tables that span multiple pages. These tables are wider than the page height in landscape mode. When using the \begin{adjustbox}{width = ...
2
votes
0answers
57 views

PGFPlots — a solid of revolution as a 2D-plot

I'm trying to draw something like this: And I probably should use a 3D-plot as shown here but it seems to be an overkill solution in my case. So I wonder if there is a better way to draw ellipses ...
0
votes
0answers
19 views

Grouped Stacked Plot in Pgfplots

I have a table like that (quotation marks stand for float point numbers between 0 and 1): And I would like to use pgfplots to make this plot (a grouped stacked bar plot): Note that: - There are ...
3
votes
1answer
45 views

PGFPlots graph is truncated, top is cut off

I'm trying to use pgfplots to plot a Maxwell-Boltzmann curve. After scouring around the internet for the density function, I've come up with this: \begin{tikzpicture} \def\kB{1.3806488e-23}% ...
3
votes
2answers
54 views

pgfplots adding unwanted dashed lines

I'm using pgfplots to plot multiple lines, but after a certain number of lines, they seem to revert to dashed lines regardless of line style. Is there a way to fix this? The code to generate the ...
7
votes
0answers
59 views

pgfplot error with mathematical equation [duplicate]

I'm new to this site and I'm searching for the help. I'm trying to plot an adsorption isotherm described with specific equation. I used pgfplots package with following commands: ...
2
votes
1answer
49 views

How to clipping between two curves?

I have to fill between two curves like this photo \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{patterns,calc,positioning,shapes} \pgfplotsset{compat=1.10} ...
3
votes
1answer
112 views

Periodic coloring of boxed plane partions

I am using the code below, which creates different coloured layers. Having trouble to get a decoration in making it work simultaneously for each layer in the three axes. Kindly some help here. I am ...
7
votes
1answer
99 views

Strange behavior of abs(x) in PGF Plots

I have the following code: \begin{tikzpicture} \begin{axis} [ axis lines = {center}, width = {0.6\linewidth}, ylabel = {$y$}, xlabel = {$x$}, ytick ...
3
votes
1answer
33 views

Missing xtick labels from table in bar plot whenever y value is nan

Given a picture like that: \documentclass[12pt]{article} \usepackage{pgfplots} \usepgfplotslibrary{external} \tikzexternalize \pgfplotsset{compat=newest} \pgfplotstableread[col sep=comma]{ ...
0
votes
0answers
23 views

Moving average with pgfplots

I have a huge table of x,y data. Looks like this: \addplot+[mark size=0.2]table[row sep=\\,x = add,y = mul]{add mul \\ 2. 0.32 \\ 6.0 0.23 \\ 7.0 0.23 \\ 8.0 0.13 \\ 12.0 0.17 \\ 23.0 0.14 \\ ...
1
vote
0answers
28 views

pgfplot: 3D version of a plane and its the gradient vector

Checking pgfplot for the addplot3-command was easy! I've found this very nice possibility to plot a plane: \begin{tikzpicture} \begin{axis} \addplot3[ surf, mesh, ] {x+y+1}; \end{axis} ...
1
vote
0answers
41 views

Plotting Heat Map - problem

I'm trying to plot a heat map with this data. I expected to create a heat map like the one given in the answer of this. (Although my plot will be only a quarter of it 0 to 90 degrees). But when I run ...
0
votes
0answers
32 views

Range Restrictions in PGF/TikZ

I am currently trying to put multiple graphs in one \tikzpicture but when I try and put in the tangent function, due to its undefined nature at pi/2 and my domain being defined as -pi:pi my LaTeX ...
2
votes
1answer
80 views

Compilation time speed up for this pgfplots figure possible?

I already experienced in this question that the right choice of assignments for the coordinate values and meta values from a table could increase the compilation speed of pgfplots due to the lua ...
6
votes
1answer
2k views

Stacked bar-plot: display total value

Is there a way to make pgfplots display only the total value of a stacked bar-plot? With nodes near coords, all segment-values are shown: I'm only interested in the sum of the stacks, though. ...
0
votes
0answers
14 views

pgfplots: Broken path styles if fillbetween is applied

I'm using pgfplots version 1.11. It seems that path styles (caps and widths) is broken when fillbetween is applied. See wrong path widths at the top plot and right one at the bottom. Minimum example: ...
4
votes
1answer
108 views

“Logarithmic scale” for negative values

I have the following MWE: \documentclass{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{filecontents} \pgfplotsset{compat=1.12} \begin{filecontents}{data.dat} 4 -1e4 4 -1e3 ...
1
vote
0answers
31 views

Filled contour from axis symmetric data

I have temperature data which is axis symmetric.(See Figure 1; apologies for my bad drawing) The number(1 to 10) denotes the point of measurement. Now, From this data, how do I get a filled contour ...
8
votes
2answers
89 views

Fill area between two curves

I just asked a very similar question: Fill area between two curves up to intersection. However it turned out that my minimal example was too simplified. In fact, I want to achieve the following: ...
2
votes
1answer
32 views

Overwrite point meta value after explicit definition

I want do some surface/mesh plots in pgfplots with a kind of logarithmic axis for positive and negative values. This is sometimes called a symlog colormap transformation, i.e. a logarithmic axis for ...
7
votes
2answers
285 views

Fill area between two curves up to intersection

I want to fill the area between two curves. What I have so far: \documentclass{article} \usepackage{tikz,pgfplots} \usetikzlibrary{patterns} \usepgfplotslibrary{fillbetween} \begin{document} ...
1
vote
1answer
25 views

pgfplots figure not working - undefined control sequence

When trying to insert a tikz figure, using the code below: \documentclass[]{memoir} \usepackage{pgfplots} \usepackage{pgf} \usepackage{tikz} ...
8
votes
2answers
231 views

Plotting chaotic maps

I want to use PGF/Tikz to plot the points that satisfy the following recurrences: \begin{align} q_{n+1}&=q_n+p_{n+1} \\ p_{n+1}&=p_n+K\sin(q_n) \end{align} $p$ and $q$ are always taken ...
1
vote
1answer
33 views

Plotting an equation in tikzpicture using pgfplots won't work

I want to plot this equation: 0.0172x + 2.9971 in lateX using the pgfplots package. I already made an axis and I plotted another graph using data points from a datafile. The data points and respective ...
3
votes
1answer
24 views

help with pgfplot a .csv data file

So i'm really new to pgfplot, a couple of hours now and I'm trying to build a graph such as this: https://www.dropbox.com/s/o3yq97oc9rwmthh/mcgreedy.csv?dl=0 Here is the .csv file! x-axis is ...
3
votes
1answer
67 views

Compute frequencies with pgfplots

On the page 480 of this doc http://pgfplots.sourceforge.net/pgfplots.pdf of the pgfplots package, it talks about of how we can construct histograms from data, and says that "Then, it creates the N + 1 ...
1
vote
1answer
53 views

Draw pgfplot markers whose origin is outside the xmin-xmax,ymin-ymax range?

As a followup of this question, i am coping with drawing certain markers. And the solution by John Kormylo works fine for the presented MWE in that question. Here, I would like to extend the plot by ...
1
vote
0answers
60 views

Combine tikzscale and externalize with named external pictures

I have the same issue which has been discussed here while trying to scale plots created using PGFplots. The issue is only present if I name the external pictures using \tikzsetnextfilename. However, ...
2
votes
1answer
55 views

Pgfplots for every group plot

Similar to this question I want to align my y labels of groupplots. The style ylabel absolute, y label/.append style={yshift=0em}, does the trick, and thus I want to apply this to every group ...
1
vote
1answer
30 views

Adding Matlab plots to a template Book with no errors?

I am working with a template available online i.e. https://www.sharelatex.com/templates/thesis/phd-mphil-thesis-of-university-of-cambridge I am trying to add Matlab figures using tikz. Before, doing ...
1
vote
1answer
33 views

Moderation Plot with pgfplots

It's the first time for me using pgfplots. I have to build a moderation analysis plot as the following one. Could you please help me with that? Unfortunately I can not provide the coordinates. "Low ...
3
votes
1answer
35 views

Adding a textbox to a pgfplot

From Matlab I have a set of data from which i create a graph. The plot with Latex works perfectly fine. To this plot I am adding a coloured square in the background, which is also working. Here a ...
7
votes
1answer
43 views

pgfplots 3D surface broke

I'm a newcomer to LaTeX and pgfplots. And now I found a problem while I was using \addplot3. It seems that the image behaved abnormally on perspective.This is the image generated. For reference I ...
0
votes
2answers
109 views
1
vote
1answer
82 views

Gephi Graphs in Latex

Is it possible to create Gephi Graphs with latex? See Graph1 Graph2 Asking this question just out of curiosity. I'd like to add that Gephi is not simply connecting dots.
1
vote
0answers
68 views

pgfplots - Create multiple plots from one table (rows 0--3, 4--7,…)

Using JMH in java I have created file. Suppose .csv file looks like this (but far bigger): "Benchmark","Mode","Threads","Samples","Score","Score Error (99.9%)","Unit","Param: capacity","Param: ...
3
votes
1answer
28 views

Increasing the precision of integer tick labels on a logarithmic axis

I am trying to plot some data with on logarithmic axes. My x axis is labelled with integer numbers from the input data (xtick=data). I don't want to use scientific notation, so I added the log ticks ...
3
votes
1answer
43 views

Problem with pgfplots in tikzposter environment

Update: I want to include some pgfplots in the TikZposter but I seem to have some problem. I earlier had a problem with reading the files but as per the suggestion of @percusse, I moved the data ...
20
votes
1answer
5k views

Add a legend title to the legend box with pgfplots?

I am using the awesome pgfplots package to draw some plots. I usually use \addlegendentry and get a nice default legend box. There are some options for legend box placement and layout (e.g. number of ...
1
vote
1answer
27 views

pgfplot with polar axis with log scale

Could it be possible to have a pgfplot plot the linear coordinate in log scale? \begin{tikzpicture} \begin{polaraxis}[xmin=0,xmax=45, xtick={0,45,90}, xticklabels={$0$, $\frac{\pi}{4}$, ...
1
vote
1answer
72 views

Graph with multiple Y axes

How do I create a graph multiple Y axes(more than 2) stacked one over the other with a common X axis? See attached figure. Each zero in y direction represents the beginning of new y axis.
3
votes
1answer
55 views

Constructing a Seismic Tripartite Graph with TikZ & pgfplots

I am attempting to use TiKZ and pgfplots to construct a seismic tripartite graph. These are used by structural engineers to determine seismic response for a structure. The example I am attempting to ...
2
votes
1answer
37 views

Tikz pictures disappears when adding legend

\begin{center} \begin{tikzpicture}[>=stealth,trim axis left, trim axis right] \begin{axis}[legend style={at={(axis cs:40,20)},anchor=south west, draw=none}, xmin=0,xmax=4, ymin=0,ymax=2, ...
4
votes
1answer
37 views

Monetary Values on tikzpicture axis

How can I get the following; (a) The euro sign in front of each axis label. (b) Every number to two decimal places, so 145.50 appears as 145.50 rather than 14.5 \documentclass[12pt]{article} ...
1
vote
0answers
70 views

How to explain the intuition of distributional moments using a figure [closed]

I want to create figures to explain the meaning of the (first four) moments of a distribution (with this I mean: Mean, Variance, Skewness, Kurtosis). The goal is to use this in teaching stats. I am ...
3
votes
2answers
41 views

PGFPlot with data that is way too small

I'm trying to plot the Wien and Rayleigh-Jeans laws in a graph of $I \times \nu$. Wien Law: \[ I=\frac{2h\nu^3}{c^2}e^{-\textstyle\frac{h\nu}{kT}}\] Rayleigh-Jeans Law: \[I=\frac{2k\nu^2T}{c^2}\] ...
0
votes
0answers
13 views

Problem with subcaptions in a series of pgfplots

I have run into a problem wherein I need to arrange all my plots in one column of the IEEEtran. I was able to arrange all the plots in a column but when I added subcaptions, the pictures spilled over ...
3
votes
1answer
33 views

pgfplots: box axis remove one axis keeping 3

I'm recreating a very special plot, where two plots that share an x axis are glued on top of each other. Both have box axis. To make this look good I would like to remove one of the two horizontal ...
3
votes
0answers
39 views

Rotating polar pgfplot

I rotated my polar plot by 90 degree. To make sure, the y-Line stays at the 90 degree position I used xmin=90, xmax=450, but now I need my xtick labels back from 0 to 330. \documentclass[a4paper, ...