{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
98 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
68 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
114 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
88 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
139 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
110 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
294 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
73 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
231 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
431 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
106 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
67 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
181 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
57 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
127 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
145 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
289 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
409 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
297 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
777 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
234 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
881 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
248 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
0answers
54 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
59 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
54 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
44 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
25 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
43 views

Data manipulation in contour maps (x/y-axis and contour label)

I am using contour maps in pgfplots as part of CAD as well as documentation. Serving both purposes I would like to improve the readability of my contour maps, by multiplying x- or y-axis times a ...
1
vote
0answers
36 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
90 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 ...
1
vote
0answers
46 views

how to draw a unfinished data point bar in pgfplots?

I want to present some experiment comparisons. One of the candidate (SHJ) takes too long to run. Could anyone give me some suggestions on how to present such data point in a bar chart? Thanks in ...
1
vote
0answers
48 views

Scaling inset plot relative to main plot axis length

I want to create a plot with a second, smaller plot as an inset. This is easy enough using the following code, where the widths of the plots are defined. However, I often use figures in several ...
1
vote
0answers
28 views

Pgfplots histogram with input data already counted

I have input data that looks like this: Age Count Cumulative Count Percent Cumulative Percent 24 1 1 1.4084507 1.4084507 25 1 2 1.4084507 2.81690141 30 2 4 ...
1
vote
0answers
70 views

Special decoration for TikZ pin feature

I try to achieve the curvy pin style I sketched below. It would help to distinguish pin lines from grid and other lines in the diagram. How can I realize a decoration that automatically draws such ...
1
vote
0answers
34 views

Stacking scatter plots with different y-axes in pgftex

I'm trying to create a stack of scatter plots with a common x-axis but different y-axes, alternating between left and right sides. I'm just learning pgfplots and while I've read up on using multiple ...
1
vote
0answers
40 views

Plotting a signal along with its harmonics in one figure [duplicate]

I would appreciate it if someone could help me plot a figure similar to the following picture. I want to draw the fundamental signal along with a few first harmonics using pgfplots.
1
vote
0answers
50 views

pgfplots: Explicitly Setting 'Line and Mark Intersection' In Plot

Is there a way to specify where a line intersects a 'mark' on a pgfplot? MWE: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{figure}\begin{tikzpicture} ...
1
vote
0answers
88 views

PGFPLOTS: Insert a boxplot outside the chart axis labels, much like GNU R

I have some code that plots a horizontal barchart. What I would like to do is put a boxplot or confidence interval above my horizontal axis which is on top of the chart. GNU R (see R In Action, Robert ...
1
vote
0answers
44 views

“Dimension too large” error with pgfplot generated with matlab2tikz [closed]

I would like to insert a tikz plot generated with matlab2tikz in my code. This is the code to generate the matlab image X1=[7.4632 8.0349 8.5251 8.8176 9.2251 9.5559 9.9214 ...
1
vote
1answer
97 views

PGF stacked bar graph not drawn correctly

I am having problem with the following code which is supposed to produce a simple stacked graph. \documentclass[tikz,border=2pt]{standalone} \usepackage{pgfplots} \usepackage{tikz} \begin{document} ...
1
vote
0answers
63 views

pgfplots - How can I increase TeX's capacity for plotting large datasets? (TeX Live on Windows)

There are several questions and replies on this topic, yet so far I haven't found one which reliably details the steps for TeX Live and TeXstudio on Windows. Of course the editor might be an ...
1
vote
0answers
47 views

Why these thin lines on a PGFPlot doesn't appear on some PDF readers?

I remember reading about PDF reader issues on this StackExchange, but I cannot find the links. The following TikZ picture has some thin lines in light green that doesn't show up on some readers (e.g. ...
1
vote
0answers
112 views

Incomplete parametric curve, ''written letter e'' [closed]

I have tried plotting some parametric curves like (x^3-3*x,3*x^2-9), and it works fine. The following, however, does not work: (x-x/(1+x^2),1/(1+x^2). I have tried several ways of plotting it but the ...