{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
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: ...
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} \...
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 ...
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 ...
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, ...
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, ...
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
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 ...
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, ...
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{...
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
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 (...
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 ...
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
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
43 views

Tikz image with remember picture combined with custom page numbering

I have a problem combining TIKZ-pictures when using custom pagenumbers. I modify my page numbers as shown in the upmost answer here. When drawing a simple TIKZ-image, I recieve the error ! Illegal ...
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{...
5
votes
1answer
86 views

tikz 3d graph with circular domain

I have got a pretty simple function to make a 3D graph of. The function is defined as: Plotting this was not that much of a problem with the follwing code: \documentclass[border=10pt]{standalone} \...
2
votes
1answer
33 views

pgfplots: shifting scope via named coordinate

Consider the following MWE: I find it amusing that the second tikzpicture cannot compile without the first, even though the second value for (A) is the one being used. Can anyone explaing this? In my ...
0
votes
0answers
14 views

Legend of several linear regression lines in the same axis [duplicate]

I am using linear regression in PGFPlots for fit several lines. It legend show correctly if each line is on its own tikzpicture. Code: \documentclass[tikz]{standalone} \usepackage{tikz,pgfplots,...
2
votes
1answer
24 views

pgfplots: coordinates from macros that change

I do realize that pgfplots needs to do its thing at \end{axis} apply scaling etc. But is there a manner where one can make this work as intended? In the MWE I define a coordinate from a macro (my ...
6
votes
1answer
50 views

PGFPlots axis label not moving

Could some body please explain why I can't move the y axis label to the end of the axis like the x. Using the following I get the below. \documentclass[a4paper]{article} \usepackage{pgfplots} \begin{...
1
vote
0answers
42 views

PGPlots xtick label from a table

I am trying to load data from a table which looks like below and use the 'label' column for xticklabels. idx,label,value 1,20040101_20050108.rotation.summary, 19.470949839091155 2,20040101_20050115....
4
votes
1answer
60 views

Adding nodes near coordinates to bar plot but from different series

I would like to annotate a bar plot with some markers or numbers to indicate the significance of some results. The significance is given in a different column from the main value. Just to give an ...
1
vote
0answers
38 views

Problem with transparency in plotting shapes

I am trying to plot shapes with transparency inside a baposter environment, however it does not plot with the transparency. To test this file you will need to also add the baposter class found here - ...
3
votes
1answer
52 views

Assigning xlabels to symbolic x coords

I am using the below code to generate the shown bar graph. However, I cant find anything with which I can label each of the individual bars for both sets of my data. i.e say the bar marked 0.67 I want ...
3
votes
0answers
42 views

pgfplots - fill between changes with plot width

I'm plotting some distribution functions for my students, and I am shading regions of the plots. If I reduce the plot width to 0.35\textwidth or less, the shading disappears. How do I ensure that it ...
2
votes
0answers
24 views

PgfPlots - Problem in axis [duplicate]

Anyone know how to edit the y tick? I want it in decimal form but the output gives tick in scientific notation. Thanks. \documentclass[margin=5mm]{standalone} \usepackage{tikz} \...
4
votes
1answer
552 views

What is wrong with this bar graph?

I try to create a bar graph based on an example I found. I do some modification to origin, but it doesn't work. \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \begin{document} \begin{...
4
votes
1answer
84 views

How to remove labels at the ends of the axes?

How to remove labels -1,4 on x axis ? How to remove labels -4,4 on y axis ? \documentclass[tikz]{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{pgfplots} \...
3
votes
1answer
108 views

Pgfplot how to make scientific number format with “e” exponent style

The normal scientific coordinate is something like 10^2, how do I change it to 1e+2 style ? For example: \documentclass[border=4mm]{standalone} \usepackage{pgfplots} \begin{document} \begin{...
2
votes
0answers
44 views

PGFPlots PDF printing issue (Adobe Reader DC)

Here is my source code: \documentclass[11pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{mathtools} \usepackage{mathpazo} ...
0
votes
0answers
30 views

Using a blank row to create multiple plots

I have a csv file with 300~ rows of x and y data formatted with the intent to use a blank row as a reference for separation, but I'm unsure as to how to code it in LaTeX. For example 0 1 1 2 2 3 3 4 ...
0
votes
1answer
54 views

Package tikz Error: Giving up on this path. Did you forget a semicolon?. \end{axis}

\begin{tikzpicture} \begin{axis}[% axis equal, width=8in, height=8in, axis lines = ...
1
vote
1answer
40 views

bar graph not showing the first bar with pgfplot

I have the following table in a .txt file Group Real Imag Cable VSC P-mode VSC Vdc-mode A -1.2739095e+02 -3.3612954e+02 4.9822998e-01 4.9309456e-01 8.6754595e-03 B -3....
1
vote
1answer
64 views

Adding Semi-transparent Background Image to Tikz Axis

I have a bunch of figures that contain line plots to which I would like to add a background image showing the geometry compared to the data. What I would like to know is: How can I add a semi-...
4
votes
2answers
65 views

Plotting a recursive defined set of functions with conditional base function

I'm trying to visualize the construction of B-Spline functions by showing step by step how the curve is created. This involves painting curves similar to these: The function that creates the curve, ...
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 ...
4
votes
1answer
39 views

PGFplots: decorating plot but not legend

Using PGFplots, I would like to apply a decoration to a plot but not to the corresponding legend entry. Is there a way to do this? Here is an example: I'd like the legend image to be just the line, ...
1
vote
1answer
51 views

How to draw (major) grid lines only at specified positions?

How to draw (major) grid lines only at specified positions, such as x=0, x=2 in the following MWE@ShareLaTeX (readonly now)? \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{width=7cm,...
3
votes
2answers
79 views

Operation mode in pgfplots (referencing from externalized graphics)

I am using the externalize feature of tikz/pgf to save space for my thesis. I am using TeXShop on a Mac. I am running into trouble referencing something in the main document from the externalized ...
1
vote
0answers
31 views

tikzscale with tikz-external: Recreating plot

I am creating pgfplots in the tikzpicture-environment together with the external library. To ensure the width of the plot, I wanted to use tikzscale. Originally, I was using the beamer-class with a ...
1
vote
2answers
64 views

Shade region where two Gaussians overlap

I'm trying to shade the region where the two Gaussians overlap. My code is as follows (altered from Christian's answer here: How can I hatch the areas delimited by two intersecting Gaussian ...