{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
1answer
804 views

Bold Y-Tick Label and Every Node Near Coord

I can make my xticklabel apply \bfseries, I can make my xlabel and ylabel apply \bfseries. For some reason, I cannot seem to get my yticklabel to apply this effect. At least when I compare the "1" ...
1
vote
1answer
336 views

pgf stacked bar graph with line plot

I want to draw a stacked bar graph plot with one parameter as a line plot. Here is my code below - \begin{tikzpicture} \pgfplotstableread{Figures/measurements.dat} \datatable ...
1
vote
1answer
176 views

PGFPlots: strange behaviour

Look at the differences between the following two plots. I would like to have in plot "1" the same distances between the colorbar, axis labels and the ticks labels that I get in plot "2". How can ...
1
vote
1answer
281 views

pgfplots: externalization and ifthen

I use pgfplots with externalization. When I try to include a macro that uses \ifthenelse, always the 'else' statement is being executed. When I switch off externalization, it works again. See this ...
1
vote
1answer
673 views

Using \footnotesize in tikz node labels

I have used \footnotesize to scale labels before and it has produced the desired results. But am having problems when I pass this as part of the label to a macro. The following MWE compiles but not if ...
1
vote
1answer
1k views

\pgfresetboundingbox is undefined control sequence?

I'm sure this question has a simple answer that I'm missing: I'm trying to use pgfplots to put two graphs right next to each other with no space in between. I thought I could do this by using the ...
1
vote
1answer
65 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
48 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? ...
1
vote
1answer
33 views

after end axis messes up pgfplots axis position

Latex and Tikz are going to get the life out of me... I saw Need to do some changes to pgfplots axis #39099, and that example was working fine for me; so I modified it a bit, and came up with the ...
1
vote
1answer
44 views

PGFPLOTS boxplot data from inline file

I have The following code: \documentclass{article} \usepackage{filecontents} \usepackage{pgfplots, pgfplotstable} \usepgfplotslibrary{statistics} \begin{document} ...
1
vote
1answer
46 views

Loop through table for boxplot prepared

I am trying to produce figure with 2 boxplot prepared plots from an inline data file. I grabbed this code from here to use as a starting point. Given that the wrapper code allows the boxplot data to ...
1
vote
1answer
111 views

Engineering notation (scientific) as tick labels with pgfplots (maybe via siunitx)?

I would like to have numbers on the ticks labels formatted in engineering notation -- but unlike in How to control pgfplots axis scaling for engineering notation (multiple of 3 exponent)?, I would ...
1
vote
1answer
103 views

String column tick labels and plotting selected samples on y axis with groupplots?

I have seen other relate questions (like Basic bar chart with text as x axis labels), but still cannot figure out where the problem is in my example. The MWE below contains a snippet of a .csv table ...
1
vote
1answer
74 views

Can I make an xbar plot based on an external file?

I'd like to use the, imho, most common value alignment of x- and y-values in an external file and then produce an xbar with it. It shall look like the examples here (the better example because there ...
1
vote
1answer
119 views

Overlapping transparent impulses (ycomb) with pgfplots?

Consider the following MWE: \documentclass[% 12pt, journal, twoside, draftcls, letterpaper, ]{IEEEtran} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{tikz} ...
1
vote
1answer
89 views

How can I resolve the side effects of AddEverypageHook to external pgfplots?

I have quite a huge document with many pgfplots, which I would like to externalize. Well I can externalize them, but my \AddEverypageHook command from the everypage package affects this externalized ...
1
vote
1answer
143 views

rectangle in 3d plane

I am trying to plot a 3d axis with a rectangle perpendicular to the x-plane using the following code: \documentclass[tikz]{standalone} \usepackage{pgfplots,pgfplotstable} \usetikzlibrary{calc} ...
1
vote
1answer
111 views

Place coordinates halfway (or 75%, etc) up the plot

I am using this macro \newcommand{\ymax}[0]{\pgfkeysvalueof{/pgfplots/ymax}} to do stuff like the following: \draw[dashed] (axis cs:4, \ymin) -- (axis cs:4, \ymax); and this works fine. ...
1
vote
1answer
302 views

How to extract/convert tikz to a format suitable for powerpoint

I am trying to extract/convert a tikzpicture to a format that is suitable for powerpoint without losing quality. The code that I have found and adjusted is the following: ...
1
vote
1answer
75 views

pgfplots tick lines are behind const plot

The tick lines in the plot are in a layer behind the actual plot. Have a look at this example below: \documentclass[11pt, oneside]{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} ...
1
vote
1answer
235 views

datetime plot in pgfplot using gnuplot

I have a large data file with several columns wherein the first column is a date and time in the format, 'yyyy-mm-dd hh:MM' and the rest are numerical values of different variables. I often have ...
1
vote
1answer
438 views

Legend marker in pgfplot bar chart

I spent the last hours trying to solve this issue. I hope you can help me, sorry if the answer appears clearly somewhere else, I was not able to find it. I would like to adjust the marker/symbol in ...
1
vote
1answer
108 views

Composite plot in PGFPlot

I am trying to get pgfplots to do produce a plot like the following: i.e. a scatterplot with a second scatterplot below the x-axis. I am having a hard time figuring out how this kind of plot is ...
1
vote
1answer
71 views

Position of colorbar with multi plots without using groupplot

I have 6 plots (2 rows, 3 columns) with the same colormap and I want to put only one colorbar on the top of the plots. Using anchor and at does not give the expected result, I think this is because ...
1
vote
1answer
198 views

pgfplots: multiple legends or one legend and a heading

In my plot, I want my standard legend that says what value of c corresponds to what color. However, I would also look to put the function in plot. \documentclass[tikz]{standalone} ...
1
vote
1answer
228 views

Only the old version of pgfplots is available with MiKTeX (version 1.7)

I am looking for a solution to install the last version (currently 1.8) of pgfplots via the package manager MiKTeX on Windows. However, MiKTeX only offers the old version 1.7 of pgfplots. Is there a ...
1
vote
1answer
58 views

Problem with referencing plots

I want to reference some plots (done with pgfplots) in my text but somehow it's not possible. If i copypaste the examples from the pgfplot- documentation it works but if I move one of the labels to ...
1
vote
1answer
128 views

Scale only dataset read from file without scaling whole graphics

I have datasets which vary strong in range. So i want to scale my dataset to adjust it to my template, so that the grids, axes and so on are identical with the neighbour-subfigures. What is the ...
1
vote
1answer
243 views

Including a tikz figure with a reference to a table on file, problems with folder structure

I am trying to include a tikz figure in the chapter 6 of my thesis. I am using separate folders and .tex files for each chapter, as you may notice in the example. This means that in my main document I ...
1
vote
1answer
147 views

Set xstep and ystep pgfplots

I have this MWE. My question is how can set xsep and ystep in the axis so that they will properly appear, and without have to know in prior the range of values: xtick={0,0.1,...,1}, ...
1
vote
1answer
290 views

Pgfplot figure off-center

I create a tikzpicture in standalone mode (see code below). Then import the resultant .pdf file into my document via \includegraphics (see pic). However the axis labels are cut off and part of the ...
1
vote
1answer
412 views

Problem in modifying contour label style in pgfplots

I am trying to modify the contour label style in a TikZ picture. I would like to have the label values in the format 0.0 instead of being integers. The following code produces a picture in which ...
1
vote
1answer
366 views

Debugging TikZ and PGFPlots compatibility issue

I just tried to compile an old TikZ code (which as far as I recall compiled perfectly in the past and was not changed in the meanwhile) and I faced some serious compilation issues related to TikZ. ...
1
vote
1answer
93 views

Specifying ymin in pgfplots misalignes images vertically [closed]

I have two plots drawn with the \pgfplots package. In one of them, I specified that ymin=0 when I created the axis since the plotted curve never goes below y=0 (otherwise something like ymin=-0.2 ...
1
vote
1answer
165 views

pgfplots externalize and references: some work, some don't

I have started using the tikz externalization library for my current project. From here I learned to use \pgfplotsset{invoke before crossref tikzpicture={\tikzexternaldisable},invoke after crossref ...
1
vote
1answer
298 views

Vertically aligned legend to PGFPlots subplots

What I want to do is to have 3 PGFPlots subplots and the legend arranged in four equally sized boxes. However, when I use the following code, in the output the legend is not vertically aligned with ...
1
vote
1answer
783 views

TikZ Label multiple plots outside of axis box

I'm endeavouring to make a graph similar to the following using PgfPlots and TikZ. I can make all of this work, except for the placement of the R=2, R=3, R=5, and R=10 markers on the left-hand ...
1
vote
1answer
1k views

How to include extra ticks in pgfplots without them appearing in bold face?

In order to include a cross through the origin in my plot, I write the following under \begin{axis}: extra x ticks={0}, extra y ticks={0}, extra tick style={grid=major}, However, the 0s appear in ...
1
vote
1answer
239 views

Using pgfplot externalize with .eps output in letter 10cm*10cm

Using pgfplots, externalize an .avi file and using DVI>ps, externalize an .eps file on A4 but I want a figure with width and height of 10cm in letter (10cm x 10cm). How can I make it? (If you ...
1
vote
1answer
887 views

Fill a quadrant with PGFplots and axis equal=true

I need to fill quadrant three and want to use axis equal=true. However, using this setting changes the minimum value of x. How do I adjust this to fill the entire quadrant independent of axis ...
1
vote
1answer
249 views

pgfplots: correlation for data values from file works, but with errors

maybe I do not to see the wood for the trees, but I'm always getting error messages for compiling the following pgf code, while the output looks like the way it should. Does anyone see whats wrong ...
1
vote
1answer
49 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, ...
1
vote
0answers
21 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 ...
1
vote
0answers
59 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 ...
1
vote
0answers
64 views

Flip x and y axis of ternary graph

I am trying to reproduce the USDA Soil Triangle. To do so, I would need to flip the x and y axis of the default pgfplots-ternary. I understand, that I could switch my inputs (don't really want to do ...
1
vote
0answers
58 views

How to put legend below the chart?

I have the following code that produces a line chart: \begin{figure}[p] \centering \begin{tikzpicture} \begin{axis}[ use units, cycle list name=exotic, %This defines the color. It ...
1
vote
0answers
48 views

how to change color at line chart?

I have the following code. \begin{figure}[p] \centering \begin{tikzpicture} \begin{axis}[ use units, width=15cm, height=8cm, % size of the image grid = major, ...
1
vote
0answers
28 views

\draw via \pgfplotstableforeachcolumnelement fails outside {axis} environment, but works inside?

Consider this MWE: \documentclass{article} \usepackage{pgfplots} \usepackage{pgfplotstable} \usetikzlibrary{calc} \pgfplotstableread[col sep=space,row sep=newline,header=true]{ ts val 0.0 0.0 1.0 ...
1
vote
0answers
38 views

Make a large heatmap with gaps and tables between

I am trying to make a large heatmap which looks like this with gaps and row or column names written in some of the cells. Empty cells are also present in the heat map. Can i make this using pgfplots? ...
1
vote
0answers
93 views

Embedded axis Pgfplots

So I need to display data as follows: every day for a month I have a set of values obtained in different hours. I want the axis to contain the date but between a date an another I want to have the ...