{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
0answers
41 views

Weird plot from discontinuous data [closed]

Tex gurus; I'm trying to plot some data against time, for which I have some missing values. Most of the time, this works well, but for one plot in particular I am getting some very strange results. ...
2
votes
1answer
65 views

Forcing a common z-scale in a surface groupplot

I've come across some similar questions, but not this exact one. And nothing I've tried has been able to achieve precisely what I'm looking for. I have a groupplot that contains two overhead views ...
1
vote
1answer
51 views

put a plot inside a table

i want to :) well as you can see \documentclass[french,12pt,oneside,openright]{memoir} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[a4paper]{geometry} ...
0
votes
0answers
35 views

Number format as optional key value argument for LaTeX function

I followed the answer as given in http://tex.stackexchange.com/a/34318/28093 in constructing a function which uses key values. It works fine, but I also want to be able to give the number format as ...
1
vote
1answer
81 views

Pgfplots: set plot margins

Is there a possibility in pgfplots to set the margins reserved for the x- and y-label, similarly to gnuplots tmargin, bmargin, lmargin, rmargin. I would like to have following values for the ...
1
vote
1answer
56 views

“fill between” from pgfplots is placed behind other objects

The following is a (more or less) minimal example illustrating my problem: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} ...
0
votes
0answers
67 views

Normalize Y-axis by y=(y-min(Y))/(max(Y)-min(Y))

I am new to pgfplots and would like to get your help on my question. Basically I need to read y value from a file that only contains a list of data (in one column), normalize each value by ...
1
vote
1answer
63 views

pgfplots with list and make fails on windows (mingw)

System specs: MiKTeX 2.9, Windows 8.1, -shell-escape added, MinGW installed. MWE: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} ...
0
votes
1answer
67 views

Annotate / plot triangle with slope in PGFplots log log axis environment

As a follow up question on the question posted at Annotate / plot triangle with slope in PGFplots axis environment, how do I do this in a loglogaxis? So, given a relative position in the loglogaxis ...
2
votes
2answers
62 views

Compilation problem with pgfplots

The following code does not produce the figure expected. \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.8} \usepackage{amssymb,amsmath} ...
1
vote
0answers
24 views

Plot data points with 'linespoints' but lines should have gaps [duplicate]

I have asked following question on stackexchange regarding a gnuplot solution: Plot data points with connecting lines but which leave gaps. The question is about using following linestyle for data ...
2
votes
1answer
70 views

'Dimension too large' in `loglogaxis` plot

I constructed a macro to annotate slopes of graphs by means of triangles in a loglogaxis. It works fine for small slopes, but for large slopes I get a Dimension too large error. Minimum working ...
2
votes
1answer
76 views

Different anchors for tick marks

To avoid interfering with the graph, I would like to position -2 with xticklabel style={anchor=north east}, and 2 with xticklabel style={anchor=north west}, within the axis environment. With this ...
1
vote
0answers
23 views

Interplay of description placement and units

The following minimal example of a group plot with units shows a problem (note the spurious [m] and [s] towards the center of the figure): It seems to me that descriptions at moves the regular text of ...
3
votes
3answers
67 views

Wrong axis limits when using `\pgfplotsextra` in `loglog` axis environment?

This is a follow up question on Key names of the axis limits when not set explicitly. The solution as given there works great for regular PGFplots axis environment, but not for a loglog axis ...
0
votes
2answers
104 views

Annotate / plot triangle with slope in PGFplots axis environment

In journal papers, I often see annotations in figures depicting triangles with certain slopes to emphasize which slopes the different graphs in the figure (approximately) have. For example Is ...
2
votes
1answer
46 views

arcsin x function in pgfplots with normal axis

This is my code for asin x (picture on the left): \begin{tikzpicture} \begin{axis}[domain = -1:1, samples = 500] \addplot[color = red] {asin(x)/180*pi}; \end{axis} \end{tikzpicture} ...
3
votes
1answer
92 views

PGFplot multiple histograms using CSV file

I have tried to draw a comparative graph using histogram and taking data from different CSV source files. I can draw the two histograms but the resulting graph is not what I want: I don't want the two ...
2
votes
0answers
39 views

Why does pgfplots scale dimensions differently in a polar plot

I am using pgfplots to draw two images with polar coordinates. Even though I specify the same value that represents the 100% value (radius of a 100 for both red circles, they are the last plots in ...
3
votes
1answer
59 views

Interaction between “scope + shift” and “fill between” from pgfplots

I am trying to draw a picture using tikZ and pgfplots. The following is a minimized example of what I am doing. \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} ...
2
votes
1answer
103 views

How to draw a graph from CSV with TeX?

I am a complete beginner with TeX, I would like to draw JMH benchmark graph using TeX. Since I have output results in CSV format. This is my actual code: \documentclass{article} \usepackage{pgfplots} ...
2
votes
2answers
45 views

PGF-Plot not at centre

I would like to plot some circles with pgfplots inside a diagram, however, they are always off-centered. \pgfplotsset{width=7cm, compat=1.12} \pgfplotsset{compat=1.5.1} \begin{tikzpicture} ...
2
votes
1answer
130 views

Why am I getting those pgfkeys errors?

Suddenly, most of the figures don't appear in the document and the first error is ! package pgfkeys error: choice '1.8' unknown in key '/pgfplots/compat/anchors' Another error: ! package pgfkeys ...
2
votes
1answer
91 views

Am I properly inserting legends in groupplots? Labels “multiply defined”

I have a few places in my document where I use groupplot to insert several figures, but I only want one legend as it's common to them all. I've done this using legend to name=foo and then, after the ...
3
votes
2answers
42 views

tabular doesn't give two equally-size figures

I have produced two boxplots. Amplification.tex: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.8} \usepgfplotslibrary{statistics} \begin{document} \begin{tikzpicture} ...
2
votes
1answer
49 views

Subfigures are not bottom aligned

I'm trying to bottom align two pgfplots figures (both have width=95\textwidth set) and also have a bounding box drawn. The relevant code that sets up the two subfigures: \begin{figure} \centering ...
2
votes
0answers
20 views

pgfplots: tik labels missing and axis labels are inside plot [duplicate]

I am having major trouble in getting pgfplots to work on my Ubuntu 14 System. I am running the minimum example from http://www.texample.net/tikz/examples/pgfplots/ and the result looks like the ...
4
votes
0answers
46 views

Setting Folder for Data pgfplots in LyX

I'm trying to get a figure in my LaTeX document, but I struggle to set the search-path I use \addplot[blue] table {invcum.dat}; from the example, however it keeps saying ! Package pgfplots Error: ...
1
vote
1answer
32 views

Fail to produce valid PDF from pgfplots sample code

I use the following the pgfplots sample code: \documentclass[varwidth=true, border=2pt]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ ...
3
votes
2answers
78 views

Why does adding multiple addplots shift my axis?

I was trying to define an axis environment within a node. Upon adding multiple addplots I observed a shift in the axis position, shifting further for more addplots. Below is an example to recreate the ...
1
vote
0answers
52 views

pgfplot mesh with end arrow decoration

Inspired by this question I tried to decorate my pgfplot mesh with an end arrow. However, this end arrow is not properly positioned so that the end of the line shows behind the arrow tip. Here is a ...
5
votes
1answer
63 views

Key names of the axis limits when not set explicitly

In the minimum working example below I use the keys xmin, xmax, ymin and ymax for calculations of coordinates for annotations. However, this only works when the axis limits are set explicitly in the ...
4
votes
1answer
51 views

Plot instance missing in PGFplots

I have written a small macro to draw triangles with slope in PGFplots axis environments. I try to draw two of these triangles. However, the first one is missing for some reason. How can I resolve ...
2
votes
1answer
55 views

How can i print the label of a subfloat inside a TikZ node?

I'm laying out a few tikzpictures side by side (made with pgfplots, but I think it should not matter). I'm trying to use the subfig package to be able to reference single subfigures. Everything works ...
2
votes
1answer
71 views

Ticks vanish in pgfplots if groupplot is combined with set layers and axis on top

I am trying to use set layers to get the grid behind the tick labels and axis on top=true to get the axis on top of the plot lines. If I use these settings in a groupplot neither the ticks nor their ...
3
votes
2answers
259 views

Calculation of coordinates for TikZ annotations in PGFplots axis environment

I'm trying to do some annotation with TikZ in a PGFplots axis environment by means of nodes. However, the placement of the nodes is going wrong all the time, see the minimum working example below. How ...
3
votes
2answers
161 views

Monte Carlo Method Drawing

I would like to produce a Monte-Carlo-Plot with tikz and pgfplots, similar to this: I've already tried to adapt from this thread: Filling specified area by random dots in TikZ I've tried defining ...
0
votes
1answer
126 views

How to make a Minkowski Diagram [closed]

I just started using LaTeX and need some assistance creating a diagram like this. Except I don't need multiple hyperbolas, just one. My trouble is making the hyperbolas using \addplot. I was able to ...
3
votes
2answers
27 views

Align of the x coords in pgfplots

I have this code \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
3
votes
0answers
61 views

PGFPLOTS Graph with many x values for the same y label

I am trying to create a diagram with PGFPLOTS like this: This is my data file: SN STAR PLANET R RU RL 1 51 Peg b 0.0521068 0.000868447 0.000868447 2 55 Cnc b 0.113377 ...
2
votes
1answer
31 views

Automated plotting with \input inside \addplot

I'm trying to draw some figures with externally generated data. I'd like to draw a simple line inside a tikzpicture using pgfplots like so: \documentclass{article} \usepackage{pgfplots} ...
3
votes
1answer
49 views

TeXstudio - get output of pgf externalize in log Window

I like the functionality of TeXstudio to show me errors concerning my latex-code in the Log-window. If I use pgfplots and externalize all externalized pictures are compiled in a separate call. So I ...
3
votes
1answer
38 views

Number format for a node

In the following minimum working example, how do I change number format that is used for the node? For instance, cut off the number after 5 digits. \documentclass{standalone} \usepackage{currfile} ...
2
votes
1answer
42 views

Using math-mode in pgfplots axis unit

I want to apply a unit to my axis. Usually I use the siunitx package for that. However, this time I would like to use a Greek letter with a subscript \mu_\text{B} but my document won't compile. Here ...
4
votes
2answers
90 views

Problem with tikz foreach

I am using a foreach loop to add plots to an axis environment and want each plot to have its own color. To achieve this I tried the following: \foreach \x/\barcolor in {1/red, 2/green, 3/blue, ...
5
votes
2answers
167 views

Setting all nodes to use \sffamily without overriding font size

In my document, I want all labels in tikz and pgfplots graphics to use sans-serif, so I use \tikzset{every node/.append style={font=\sffamily}}. This works. However, when I use this, inside my axis ...
1
vote
0answers
91 views

Crowded contour plot lines

Many thanks to Harish Kumar for getting me this far. He made an immense difference with a single character here :) I have a contour plot that is, to be frank, ugly. The surface it was generated ...
3
votes
1answer
114 views

Contour Plots in Groupplot

I am trying to produce a groupplot with two contour plots. I suspect I could work this out on my own given enough time to play with it, but I am up against a bit of a time crunch... As background, ...
1
vote
0answers
54 views

How do I change the color of average in boxplot n pgfplots?

I have a simple graph using boxplot and I'm trying to customize the look. I'm part way there, but am having trouble with the average. where I have changed the color of the box and the median, but the ...
4
votes
0answers
68 views

pgfplots skip hours

For my current project, I need to display a series of percentage changes in a plot. This is the code I have so far \documentclass[a4paper]{article} \usepackage{pgfplots} \pgfplotsset{compat=1.11} ...