{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

4
votes
1answer
29 views

Line break in date ticks label

I want to plot some data depending on dates, but as the date range is quite large (4-5 years) I would like to have ticks in the form dd.mm\\yyyy, is it possible ? It would be even better not to repeat ...
7
votes
2answers
84 views

Using LaTeX commands inside pgfplotsset

Is there any way to use LaTeX commands inside \pgfplotsset? For instance, the following code produces an error indicated in the \pgfplotsset line, whereas if one replaced \contents in the ...
1
vote
0answers
59 views

pgfplots - plusminus doesn't match its definition

I've been trying to make a ybar plot with error bar using pgfplots. I want to make this graph inside a tex template, but one weird thing has occurred - when I inserted the following code (be more ...
6
votes
2answers
186 views

Graphing trigonometric functions, axes labeled with tick marks

I am providing the code for graphing three trigonometric functions. (In the preamble, I had to put a % before the command \usetikzlibrary{calc,angles,quotes} because LaTeX could not compile it with ...
3
votes
1answer
64 views

multiple colormaps

I would like to define multiple colormaps. But when I try this \pgfplotsset{ colormap={something}{ color(0cm)=(blue); color(1cm)=(orange!75!red) } colormap={somethingelse}{ color(0cm)=(white); ...
1
vote
1answer
35 views

How can I add the index of value of a table to a point on a graph?

I would like to add to each branch of my polar comb graph the index value as a label. I give you my code and a screenshot with what I would like to have: \documentclass{minimal} ...
4
votes
3answers
142 views

How can already binned data be plotted as a histogram?

I have the following data: [0, 1000) : 14524 [1000, 2000) : 38214 [2000, 3000) : 36169 [3000, 4000) : 25875 [4000, 5000) : 16942 [5000, 6000) : 10603 [6000, 7000) : 6778 [7000, 8000) : 4288 [8000, ...
3
votes
2answers
56 views

How to plot only some value of a table?

I want to plot only some values of an external tex value table, for example from the 3rd value to the 6th value. I could manually comment the non-wanted values but the table may often change and I ...
9
votes
2answers
253 views

Plotting a directed graph using pgfplots

I have a few files in the following format: x y 12 12 12 13 13 15 15 15 15 13 13 12 12 10 10 8 8 8 8 10 10 12 12 12 12 10 10 10 And I wanted to plot them as a directed graph in a ...
4
votes
1answer
32 views

zmin axis value for a 3d plot in TikZ

If I plot this the z axis does not start at 0 but somwhere negative. How do I fix this? \documentclass[border=2pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \usepackage{tikz} ...
4
votes
1answer
81 views

How to add labels to polar plot / polar comb in polaraxis and show FULL coordinates?

In pgfplots, I am trying to: for a first figure: label 12 polar plots plotted on the bases of 12 tables (values given in cartesian coordinates) without showing a legend but adding a label directly ...
5
votes
1answer
50 views

pgfplotstable will not generate table

I have some data from a table that I would like to tableize with pgfplotstable. After many hours of going through the pgfplotstable 1.10 manual and basicly copying the example code with my data. Are ...
5
votes
1answer
72 views

PGFplots - label each group plots

In this group plot how do I add labels to individual graphs. I want to label each graph as (a), (b), (c)... \documentclass[margin=5mm]{standalone} \usepackage{pgfplots} ...
4
votes
2answers
108 views

Black Fill in my plot

I'm using the following code and when it compiles the result is not what i expect. \begin{figure}[h] \begin{tikzpicture} \begin{axis}[xbar,enlargelimits=0.15] \addplot [draw=blue,pattern=horizontal ...
8
votes
2answers
104 views

Gap between line and point in pgfplots, like pointintervalbox in gnuplot

I wondered if it is possible to create a scatter plot in pgfplots with a similar style as the "pointintervalbox" option in gnuplot, i.e. a plot with points and lines, but there is a gap between the ...
2
votes
1answer
61 views

pgfplot: how to render 3dplot with colors black, white and gray

I my previous question, I rendered a 3d plot, but as I want to print my plots they should be in black, white or gray coloring format. How should I change the coloring scheme? ...
4
votes
2answers
99 views

pgfplot: 3d function plot

After my previous question, I want to plot a 3d surface; as a simple function I tried to render the bellow plot but I was not successful. \documentclass{standalone} \usepackage{blindtext} ...
3
votes
0answers
37 views

pgftables: nodes near coords align depending on value? [duplicate]

The following code results in node labels overlapping the graph. How can I align them depending on the graph so that '1375' und '1574' are below the node and the others still above? ...
2
votes
0answers
49 views

Insert pgf with referenced png file from a different folder

I'm trying to insert a pgf file that I made with matplotlib. This file references to a png file (since I inserted a png figure in the plot). When I put the png in the same folder than my tex file, ...
1
vote
2answers
78 views

pgfplots - How can I define one cycle list for all graphs (or the least amount possible)?

Due to all the maintenance after changing a color in a list, I tried to define just one cycle list so I do not have to update all my lists anymore. It is all in all an annoyingly huge amount of time, ...
2
votes
0answers
103 views

Solid of revolution about arbitrary axis

I'd like to rotate the region between y=cos(x) and y=x^2 - 0.25*pi^2 about the line x=pi. How to do this? So far I have only managed to rotate around the x-axis: \documentclass[letterpaper]{article} ...
5
votes
1answer
68 views

pgfplots - How can I use 'nodes near coords' with multiple data values for one tick?

When using displaying multiple values for a tick and then activating the display of the values/coordinates, things get messy. This is why I want to display the values inside of the bar. Or on the ...
4
votes
1answer
85 views

pgfplots - How can I define the bar width for a xbar plot?

I found the key bar width on page 82 in the manual. However, when I use it: ! Package pgfkeys Error: I do not know the key '/pgfplots/bar width', to which you passed '5pt', and I am going to ...
6
votes
1answer
92 views

plot legend : increase its area

So my question in general is what is the method to change the precise area of the rectangle used in pgf plots? Yes, to make it larger ... MWE: a typical bar chart ...
12
votes
2answers
249 views

Derivative of a tikz path?

I would like to draw curves that are smooth and have linear segments. These curves are to be used in the graph of one-dimensional functions, x(t). [To be used as position vs time graphs in writing ...
4
votes
1answer
44 views

style odd and even nodes near coords differently

I'm using this style definition in the preamble: \pgfplotsset{ base/.style={ ymin=0, xtick=data, nodes near coords, } } \pgfplotsset{ random/.style={ ybar=3pt, bar ...
4
votes
1answer
64 views

How to make logarithmic axis “readable”?

How can I make a logarithmic axis more readable? I have many plots that look similar to this one: The problem is in the y axis. Anyone can imagine what 10^5 represents, or 10^6. It is not so easy ...
1
vote
1answer
33 views

Problem with documentclass memoir + pgfplots from data file

I'm using the documentclass memoir and I want to make a plot from a file.dat of two rows, nothing special. But I keep getting that pgfplots could not open the file. The point is that if I make a new ...
5
votes
1answer
62 views

Scatterplot with marginal histograms using pgfplots

I've tried to use pgfplots to create a scatterplot with marginal histograms like it can be seen here: ...
0
votes
0answers
23 views

Using tikzscale along with correct references in externalized tikzpictures

It is not advised to use tikzscale package along with mode=list and make based on Patrick's comment here: http://tex.stackexchange.com/a/89595/24167 However, the references (e.g. \cite) does ...
0
votes
1answer
63 views

Combination Function with Factorial - Not correct result - Pgfplots

\begin{tikzpicture} \begin{axis}[ axis lines = left, xlabel = $Number of Elements$, ylabel = {$Combinations=\frac{(n)!}{(n-r)!(r!)}$}, ] %Axis \addplot [ domain=2:10, samples=100, color=red, ] ...
0
votes
0answers
40 views

pgfplots update Texlive2014

I am currently using Texlive' 2014 on Ubuntu 12.04LTS machine. The problem I am facing is updating different packages (eg. Pgfplot). I have tried changing repositories, and this does not seem to ...
1
vote
1answer
61 views

PGFPlots - trying to combine legends

I have an interesting problem. I am trying to create two graphs using the groupplots environment, side-by-side, that show different sets of data elements with different legend entries and different ...
0
votes
1answer
63 views

Add a horizontal line to a PGFPlot and add it to the legend

I have a PGF Plot with some computational results from a CSV file. At the time the CSV file was generated, there was a value that was not known. That value needs to be on the plot also, however. What ...
1
vote
1answer
39 views

Two dimensional error bars in pgfpot

How can one plot a graph with specified error bars on both coordinates x and y in pgfplots? I have been trying to use the following: \addplot[scatter,only marks, scatter src=explicit symbolic, ...
3
votes
1answer
92 views

pgfplots: “group” legend entries?

Actually, I'm working on a study where I've to plot a lot of temperature data etc. Therefore, I use "pgfplots". Everything works pretty well, so that I get the result as shown in the attached picture ...
17
votes
1answer
194 views

Rotation transformation of a parametrized plot

I'm working on this plot with pgfplots: The image is from our sister-site Mathematica.SE and there's also a nice explanation how to do it with Mathematica. I follow these steps: Parametrize the ...
1
vote
1answer
92 views

PGFplots - single legend in a group plot [duplicate]

I have a group plot and when I try to add a legend it repeats on all subgraphs. I want a single common legend line at the top of the whole graph. \documentclass{standalone} \usepackage{graphicx} ...
1
vote
1answer
61 views

PGFplots multiple ylabels

I want to have multiple y labels in a group plot. Now I have 4 different values for ylabels:Range1, Range2, Range3 and Range4. I want to add a common ylabel say "throughput". How do I do that? ...
8
votes
2answers
127 views

Arrow tip center with TikZ (and pgfplots)

The arrow default behaviour is shown on the left picture part. How can I achieve that the “circle” arrow tips (see the picture below) end at their center, as drawn in the right image, but without ...
4
votes
2answers
88 views

How can I add zero lines to a groupplot?

I'd like to add zero lines to a groupplot by defining them once in the groupplot environment. I of course based this on the clues and replies I found on here & in the manual, but so far I ...
7
votes
1answer
66 views

PGFplots xaxis to use exact values and not scale

I have a graph with values in xaxis as powers of 2. PGFplots automatically changes the x labels. I want it to use the exact values. What option should I use? \documentclass{article} ...
7
votes
1answer
121 views

How to change the annotation of a clickable bar plot

Reading the manual always helps, but in this case it hasn't been very fruitful. I have created the following stacked bar plot. The bars are clickable (only in acrobat pdf). I would like to be able to ...
2
votes
1answer
68 views

PGFPlots x-axis problem

I've been stumped on how to get the y-axis to turn off, but to have the x-axis have a set domain. Every time I run the two code samples, the x-axis domain is always 0->1. The goal is to set the x-axis ...
3
votes
0answers
118 views

Create violine plots

I use pgfplots for most of my plots. Now I need to add a violin plot. Is this possible with pgfplots or any other package?
2
votes
1answer
86 views

pgfplots - How can I use the same single coordinate from multiple data files for one plot?

I have multiple .csv files which are organized like force-stats.txt (see MWE below). I'd like to make a plot based on several single points in these data files. Is this possible? So far searches with ...
5
votes
2answers
89 views

Make pgfplot load data automatically

I have a (hopefully) nice pgfplot (If you have any optimization suggestions towards the layout, don't hesitate to tell me :) ), which I will be using repeatedly. Therefore I would like to create a new ...
1
vote
2answers
84 views

pgfplots - How to draw zero line for y (from xmin to xmax) when one uses symbolic x coords?

Based on the code provided by Jake: \draw[very thin] (axis cs:\pgfkeysvalueof{/pgfplots/xmin},0) -- (axis cs:\pgfkeysvalueof{/pgfplots/xmax},0); I am drawing a zero line for y-values for bar plots. ...
2
votes
1answer
49 views

pgfplots - How can I fill the background to a “node near a coordinate”?

I'd like to have the nodes/values for each plot fill with white, so the grids get overdrawn, so to speak. Is this possible? (Note: I only activated the major grid for x for the sake of the thread.) ...
0
votes
1answer
32 views

Title distance to axis/labels [duplicate]

How can I change the distance from the title to the axis of a plot? I'd like to have some tick labels at a axis at the top of a plot and a title above it. The title and the labels are written to near ...