{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
129 views

Error using tikz externalize: can't write md5 file

I tried to use the externalize library. It worked fine when all my files where located in the same folder. Usually I am using a subfolder as build folder, where all generated files should be stored. ...
1
vote
1answer
32 views

pgfplots axis labels in wrong place after scaling

When using the scale key for tikzpicture, the axis labels of pgfplots are no longer in the correct place. In the example below, the first axis environment is not within a scaled tikzpicture ...
9
votes
3answers
225 views

Make plot smoother in pgfplots

I'm trying to plot a function using pgfplots: \documentclass{scrartcl} \usepackage{pgfplots} \pgfplotsset{compat = 1.12} \newcommand{\param}{2.0} \begin{document} \begin{tikzpicture} ...
1
vote
1answer
67 views

Create a plot line with a gradient

TikZ allows you to have shapes with gradients like this \fill [ left color=red, right color=blue, ] (0,0) circle is the same possible for a plot line? Something like \addplot[very thick, ...
1
vote
0answers
58 views

Bar plot with y-error and nodes near coords

I have to plot some data as a bar plot. These data is processed with pgfplotstable, so I can plot the mean and the error for my data. Now I want to print the nodes near coords for each of the bars; ...
1
vote
1answer
45 views

Problem externalizing pgfplot figure with two parallel LaTeX distributions

I am getting errors when trying to compile this minimal example, using both externalize function in pgfplots and loading siunitx. \documentclass{article} \usepackage{siunitx} \usepackage{pgfplots} ...
4
votes
2answers
81 views

Coordinate transformations: PGFPLOTS to and from PGF

How can I scale a calculated length to the appropriate axis scale? In this example I would expect 2. See below. \documentclass[tikz]{standalone} \usepackage{pgfplots} \usetikzlibrary{calc} ...
5
votes
1answer
58 views

Pgfplot/tikzpicture: modify ticks and labels

I would like to modify my tikzpicture: 1.) I added an extra tick at x=92, but this overlaps with the automatic tick x=100. How to solve this overlapping? Same problem for the second extra tick at ...
2
votes
1answer
168 views

I am trying to draw a clustering Euclidean diagram

I am a biochemistry graduate student, and I have classified breast tumours using a Euclidean centroid-based approach with 437 up-regulated and 370 down-regulated genes (dimension = 807). I would like ...
1
vote
1answer
38 views

Pgfplots stops plot

I'm trying to plot the function (0.5*x+1)^(-2) for x in [0,6]. Here's my code: \documentclass{scrartcl} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \begin{document} \begin{tikzpicture} ...
2
votes
2answers
43 views

Changing number precision on y-axes

When I try to plot this: \begin{tikzpicture} \begin{axis}[% scale=1.5, max space between ticks=25, ticklabel style={font=\scriptsize}, axis lines = middle, xmin=-8000, xmax=9000, ...
1
vote
0answers
39 views

Why does my pgfplots scatter plot contain colours not in colour map?

This is a follow up to a previous post. My aim is to produce a plot that uses meta data to colour/shade data points. What I'm having trouble in understanding is how the colour map is applied at the ...
2
votes
0answers
54 views

Positioning of named nodes and paths within groupplot environments

I am having issues with pgf, pgfplots and the groupplots library. The issue is best explained with an example \documentclass[tikz]{standalone} \usepackage{pgfplots} %\pgfplotsset{compat=1.12} ...
2
votes
3answers
63 views

Can I connect the end of an \addplot to the beginning of the next \addplot?

I'm using pgfplots to plot an implicit equation, but I'm running around using gnuplot by parametrizing the curve instead. The down side is that my parametrization necessarily comes in curve segments. ...
1
vote
1answer
46 views

How can I make legends colourful? And how can I put value in bars?

\documentclass[border=5mm] {standalone} \usepackage{pgfplots, pgfplotstable} \usepackage{xcolor, color} \begin{document} \begin{tikzpicture} \definecolor{SpecialYellow}{HTML}{F9DC21} ...
2
votes
0answers
63 views

Import data to smith chart?

I have data in CSV format (or I can make it tab-delimited ASCII) and I would like to import it to a smith chart using the pgf (edit: pgfplots) package. The data contains 2 columns with the real and ...
4
votes
0answers
35 views

Command \leqslant with pgfplots [duplicate]

How to use the command \leqslant with pgfplots ? \documentclass{standalone} \usepackage{pgfplots} \definecolor{mycolor}{cmyk}{0.00,0.18,0.29,0.02} \begin{document} ...
1
vote
1answer
42 views

Pgfplots asymptote handling

I'm trying to plot the function f : [0,1] -> [0, ∞] given by: f(x) = 0.5*(x^(-0.5)-1) using pgfplots. The asymptote at x = 0 is causing me some problems though. I've done some research and ...
3
votes
1answer
47 views

Add nodes with pgfplots

I was trying to add nodes inside axis environment but nothing came out. I actually tried several ways... Any help is much appreciated. \documentclass[11 pt, a4paper]{article} ...
0
votes
0answers
36 views

pgfplotsset error

I am running the following code \documentclass[% reprint, amsmath,amssymb, aps,onecolumn,showkeys, %pra, %prb, %rmp, %prstab, %prstper, %floatfix, ]{revtex4-1} \usepackage{graphicx}% Include ...
2
votes
1answer
54 views

Problem with forget plot in the 1.12 version?

If you comment the line \pgfplotsset{compat=1.10}of this MWE: \documentclass{amsart} \usepackage{tikz,pgfplots} \pgfplotsset{compat=newest} \pgfplotsset{compat=1.10} \begin{document} ...
4
votes
2answers
109 views

Plot file could not be opened

The following code is from the "gallery of examples in the manual - PGFPlots". \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \pagestyle{empty} \begin{document} ...
3
votes
1answer
71 views

LuaTeX, unable to read file in pgfplots

I am trying to switch to LuaTeX, but I am not able to compile any pgfplots figures with external data files, which used to compile with pdflatex. Here is the MWE: \documentclass{standalone} ...
4
votes
1answer
87 views

shading area between two curves in pgfplots

I have the following latex code: \begin{tikzpicture} \begin{axis}[ xlabel=Strike Price (K), ylabel={Put Value (p)} ] \addplot [only marks=*,blue] plot coordinates { (40,10) ...
3
votes
1answer
92 views

How to draw and label a vertical line from datapoint to x-axis in pgfplots

I have the following figure that consists of only four different values of $x$. Each of these $x$ values corresponds to a certain dataset and I need to label it in the figure. Therefore, I want to ...
4
votes
1answer
37 views

Pgfplots: rotate arrow marks by a third arbitrary data

In the following mwe, my goal is to have the arrows point in the arbitrary direction given by the third column of the data. After reading some answers (for example from Dr. Feursänger there or ...
5
votes
2answers
255 views

Drawing Kano Model

I was wondering if someone can indicate me the easiest way to sketch the following picture. I started using the axis environment from pgfplots package as you can see from my code below, but then I got ...
0
votes
1answer
74 views

Not able to plot parabolas in an array

The following two TikZ environments should give similar displays. I am trying to get five graphs of parabolas, each on the Cartesian plane, and to put a label of a.), b.), c.), d.), or e.) at the ...
2
votes
0answers
46 views

Groups of boxplots using symbolic coordinates

I would like to create a plot similarly as to the bar plot example, but with boxplots instead of bars. So far what I have this MWE: \documentclass{article} \usepackage{amsmath} ...
2
votes
2answers
47 views

Two curves not joined at same point

I have been trying to plot two functions that represent a rotated ellipse in cartesian coordinates. However, the point where these two curves meet do not look as they are "joined" or closed. Is there ...
1
vote
1answer
49 views

move the “.10^-2”

Move it to the right so it will be aligned with the other yticklabels about 0.2cm or more Thanks \begin{tikzpicture} \begin{groupplot}[group style={group size= 2 by 3,horizontal sep =1.5cm,vertical ...
3
votes
1answer
71 views

Adding nodes to line segments

\documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \usepackage[active,float]{preview} \usetikzlibrary{calc} ...
2
votes
1answer
36 views

plotting statistical data, putting years at the Xticklabel PGFplot

I want to plot these data and i can't figure out how to put the years at the X axis, I want to display all the years not a 5 year step. \begin{tikzpicture} \begin{axis}[width=8cm, x tick label ...
5
votes
2answers
50 views

adding nodes to line segments

I have the following code: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \usepackage[active,float]{preview} \usetikzlibrary{calc} ...
3
votes
2answers
83 views

Not able to plot a parabola

I am making a multiple choice problem. (Here, I display two of the choices.) I am trying to plot parabolas using pgfplots. Why is TikZ not compiling my code? I put a % in front of the parabolas ...
1
vote
0answers
40 views

rescale xticks on multiple y-axis plot

I have many questions about plotting using PGFplot, How to re-scale the xticks for multiple y plots?! How to move the .10(-2) a little bit to the right so it appears aligned? How to change the ...
2
votes
1answer
26 views

pgfplot: adjust legend style and add several paths

I read the pgfplots manual the whole day, but unfortunately I am not able to achieve the following: (1) legend style: make the legend-equation align left and modify the rectangular box to another ...
1
vote
1answer
48 views

Tikzpicture: Setting fill color does not work?

I am working with tikzpicture to plot a few data points. I am trying to set the fill-color of my data points to something else than the default blue, but I don't see what I am doing wrong. I am sure ...
3
votes
2answers
100 views

Draw points inside or outside of a polygon (TiKZ)

Hello I have this plot and I would like to draw two points at coordinates (3,1) and (4,4) in colour red. \begin{tikzpicture} \begin{axis}[ title={Low capacity scenario (Scenary=2)}, axis x ...
0
votes
0answers
44 views

Equally spaced / equidistant ticks with scientific notation

In the loglog axis environment \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{loglogaxis} [ xticklabel style={/pgf/number ...
1
vote
1answer
137 views

How to draw this picture with Latex?

Could some one help me to draw the following picture with Latex ( using only 1 picture) ? Thank you SO MUCH for your help.
2
votes
1answer
60 views

pgfplots fillbetween doesn't work with newenvironment

Here is a minimal nonworking example: % preamble \documentclass[class=minimal,border=0pt]{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.12} ...
0
votes
0answers
55 views

problem with compilation of the solution contain pgfplots package

I try to use this solution from Harish Kumar it's works fine when i'm using sharelatex but it doesn't work for my system here is log Os: windows 7 implementation of TeX: MiKTeX 2.9 Editor: ...
5
votes
2answers
156 views

Need to plot a function in coordinate system

I would like to plot a rational function in LaTeX. I tried different ways with Tikz or pgfplots... nothing works. There are many different ways. Often there are problems with poles / asymptotes etc. ...
4
votes
1answer
59 views

How to load extra ticks form CSV file

I have the following following document, where the extra x ticks are defined manually. However, I want to have the ticks generated from the CSV file where the second column is 1 because the real ...
2
votes
2answers
70 views

Can we get references into externalized pgfplots images to work?

I have some plots created with TikZ and pgfplots. In the captions, I use \ref{...} with plot labels in order to get the marker printed there; a neat feature indeed. Now, when submitting to arXiv one ...
1
vote
1answer
69 views

Position of `groupplot` Titles in TiKz

Can I customize the position of the titles in tikz groupplots? In the following example, I would like to place the titles (a, b, c, and d) inside the axis (near the upper-left corner). ...
1
vote
1answer
73 views

Group plot: Replacing the values (labels) on x-axis

I'd like to replace numerical labels (e.g., 1,2,3,4,5) on x-axis with names (e.g., A,B,C,D,E) in a group plot environment on a case-by-case basis. The group plot environment seems to easily support ...
3
votes
3answers
93 views

pgfplot fill one bin with color

I am using pgfplot to draw a ybar graph. It can fill color for full graphic but I wish to only fill one bin with red color. e.g. fill bin 3 with red. Current code fill all bins with red color as ...
1
vote
1answer
42 views

Stacked ybar problem

The figure I'm looking to reproduce is the following: I have been able to produce a stacked ybar chart before by using coordinates by following the examples given in the pgfplots manual chapter ...