{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

8
votes
2answers
97 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
37 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
298 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} \begin{...
1
vote
1answer
44 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} \usetikzlibrary{arrows,...
8
votes
2answers
257 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
37 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
34 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
71 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
62 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
75 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
78 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 plot....
1
vote
1answer
31 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
36 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
47 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
55 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
116 views
1
vote
1answer
91 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
78 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
33 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
54 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 ...
21
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
34 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}$, $\frac{\pi}{...
1
vote
1answer
83 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
59 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
42 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
41 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
72 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
46 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
14 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
36 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
45 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, ...
3
votes
1answer
103 views

All but one ticklabel are showing up in polar plot

I have a problem using custom xticklabels in my polar plot. I need the exact xtick sequence specified by xticklabels but no matter what I do, the first label for 120° is not displayed. \documentclass[...
1
vote
0answers
33 views

Linear regression with fixed point

I have a data set to which I want to add a trend line. For my system, there will always be a fixed point on (2, 0). I have the line representing this system, but currently I do not account for the ...
3
votes
1answer
31 views

Setting two pgfplots-styles to be used with \addplot

Consider the following MWE: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot+ [only marks, nodes near coords, point meta=explicit symbolic, ...
2
votes
0answers
104 views

How to improve the 3D effect of this plot? (TikZ and pgfplots)

I have been experimenting with plots for a particular data series I have generated. The code below plots a surface around a polar axis reading in data from a file. The file can be downloaded here (...
1
vote
2answers
2k views

Plotting a function when date coordinates are used (pgfplots)

I want to plot a simple function on a plot where date coordinates are used in x but it seems that pgfplots cannot accept both. Here's a MWE of what I'm trying to achieve: \documentclass{standalone} ...
1
vote
0answers
27 views

Drawing stacked group plot [Pgfplots]

I want to draw stacked bar graph that is grouped. I have been able to draw the base chart. Now I want to add a value to each of these values of the bars and want to visually represent that. But I don'...
2
votes
1answer
22 views

How to delete some axis in pgfplots, and how to add labels inside figure

I want to delete the axis in the box of this program. I want to keep the x and y axis, and delete the ones that are in front of them. I tried with xtick=\empty and without, it does not seem to have an ...
2
votes
2answers
57 views

Combining two points from different axis in tikzpicture

I made a zoom box for my plots. I want to combine them without using \coordinate. Here is my code. \documentclass{article} \pagestyle{empty} \usepackage{float} \usepackage{pgfplots} \pgfplotsset{...
3
votes
1answer
23 views

Misterious “dimension too large” error in pgfplot when using width

Look at the following MWE: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots}\pgfplotsset{compat=1.9} \begin{document} \begin{tikzpicture}[] \begin{axis}[ width=14cm, ...
10
votes
1answer
9k views

Axes label positions

I am using pgfplots to create simple theoretical graphs, so I use middle axis line style. What bothers me is that x axis label is above instead of below or right of x axis and y axis label is ...
3
votes
1answer
59 views

Custom Labels on Bar Chart Bars With Symbolic Coordinates

I want to put labels on the bars on this chart, but the labels I want are neither the x- nor y-coordinate of the bar, but some other text. It seems like I should be able to do this using \node at (...
0
votes
0answers
18 views

How to place two axis breaks on pgfplot barplot

I need to place two x-axis breaks (0-20) and (60-115) on my barplot. I want the x-axis to go from 1-115 and have my data range narrowed in for visualization. Thanks in advance. \documentclass[tikz,...
3
votes
0answers
25 views

How to change this to color map? [duplicate]

Sorry if this question is too basic. I have the following, \documentclass[tikz]{standalone} \usepackage{pgfplots, filecontents} \begin{filecontents*}{h.dat} 0 0 0.0659197583889 1 0 0....
2
votes
1answer
38 views

Divide by zero error when plotting - nothing proposed elsewhere works

I want to draw the function (sin(2x) + sin(3x))/(2sin(x)) with the command \draw[blue,domain=-8.5:8.5,smooth, variable=\x, blue] plot ({\x},{(sin(2 * \x) + sin(3 *\x) )/ (2*sin(\x))}); but somehow ...
1
vote
0answers
22 views

error function graph [duplicate]

Is there a simple way to plot the error function in latex? Something like the graph shown in the wikipedia page would be great. The function doesn't seem to exist in pgfmath. https://en.wikipedia.org/...
4
votes
1answer
40 views

pgfplots issue: solid and filled markers with dashed lines

I'm trying to create a plot with pgfplots which has a solid marker filled in with a specified color a dashed line. The dashed line makes the marker dashed as well, so I put "solid" as an option ...
1
vote
0answers
29 views

I want to center vertically these group-plots but i can't do it

\documentclass[border=1cm]{standalone} \usepackage[x11names,dvipsnames]{xcolor} \usepackage{tikz} \usepackage{tikz-3dplot} \usepackage{pgfplots} \usetikzlibrary{arrows,snakes,patterns,decorations....
3
votes
0answers
94 views

pgfplots quiver arrowhead size

I am making a quiver plot using pgfplot and I want the arrow head size to be scaled "nicely" with the length of the vector (e.g., the way Matlab quiver plot does). I've come across several solutions ...
1
vote
1answer
36 views

Change the color of entire tikzpicture

The default color in pgfplots is black. What is the best way to change the color of all elements to another color. I have used \color command to do so, but is this the best option? \documentclass{...