{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
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
52 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/...
3
votes
1answer
34 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
85 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
84 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
41 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
59 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
35 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
50 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
551 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
83 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
106 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
52 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
36 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
61 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
64 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
37 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
44 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
75 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 ...
2
votes
2answers
50 views

scatterplot exceeds memory capacity

I am trying to do an overlay of a scatterplot and a barplot. When I try to execute my code, I get, TeX capacity exceeded, sorry [main memory size=3000000]. \pgfplotsapplistXXpushback@smallbufoverfl ......
0
votes
1answer
57 views

How I can create a water triple jump graphic - pgfplot?

How can I create a water triple jump graphic like the one in the picture \documentclass[border=3mm]{standalone} \usepackage{pgfplots} \usetikzlibrary{intersections} \begin{document} \begin{...
3
votes
1answer
55 views

pgfplots - insufficient precision

I am having the following problem: Using pgfplots to plot some convergence graphs, I have to load a text file and do some computations. Most of the time everythings works just fine. But in some ...
2
votes
1answer
43 views

Use single plot marker in manual “group” legend entries

I have an axis which contains several plots. These plots can be divided into two groups, of which each has a common plot marker. The plots are styled using a combined cycle list. I would then like ...
0
votes
1answer
56 views

pgfplots: percentage in matrix plot

I'm trying to draw a matrix plot with the shown values in percentage. I already tried: nodes near coords = {\pgfmathprintnumber\pgfplotspointmeta\%} Unfortunately this didn't work out. Here is my ...
1
vote
0answers
61 views

Plot data file using pgfplots

I have a very large data file (.txt) organized as the following example: 0 1 1 . . 1 1 1 . . 2 1 1 . . . . . . . I classically plotted a complex function f(Y,\thisrowno(0),\thisrowno(1),\...
2
votes
1answer
51 views

Change color in addplot in for loop of pgfplots

I am looping over several files and plotting the content on an axis in pgfplots. I would like to plot each entry as a different color (a shade of blue, for example). While the plotting works fine, I'm ...
2
votes
0answers
54 views

pgfplot draw background color as a polar function

I want to illustrate the path of a light beam refracted in the athmosphere. Using Matlab, i have calculated some numerical solutions to my differential equation. These solutions are in polar ...
2
votes
1answer
43 views

\addplot doesn't work outside of tikzpicture or axis environment

I wrote this code: \documentclass{article} \usepackage{pgfplots} \usepackage{tikz} \begin{document} \begin{axis} \draw[->,thick] (-0.5,0) -- ++(11,0) node[below left]{$t$}; \...
1
vote
0answers
34 views

Error when using eps2pgf [closed]

I am trying to convert an eps file to pgf code, using the Java command line tool Eps2pgf. I have an eps file called cuspsurface, which is saved in the same folder as Eps2pgf. When I enter the line ...
2
votes
1answer
78 views

Multiple graphs in tikzpicture

I am trying to draw the picture below. The four graphs are each a density probability function; the distribution in case 1 and case 2 is unimodal, in case 3 it's normal, and in case 4 it's bimodal. ...
1
vote
1answer
38 views

boundary for x axis for plot in tikz

I have a problem with my plot, I want to have a boundary at x=4000 and don't know how to do. My current plot is the one below and here is the code that I have now \makeatletter \newcommand{\...
2
votes
0answers
68 views

PGFplots, polar plot, extrema of values and fill segmented area

i have some testdata and want to create a polar plot, divided into some segments (21-24, 31-35, 41-42, ...). From the testdata i greate about 50 graphs (Var 1 ... Var x). Up to this everything works ...