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

pgfplots - Data set doesn't get cut off

When doing a groupplot such as the one starting on the bottom of page 385 in the manual, is there some specific setting to cut off the data at the specified new xmin- and xmax-values? Or is there some ...
1
vote
1answer
137 views

how to add annotation to ybar pgfplots with symbolic x coords

I would like to add an annotation, or better, an arrow to a particular ybar in a plot, but I am struggling with the symbolic x data. I've used \pgfplotsinvokeforeach to read in variable data, and so ...
1
vote
1answer
186 views

! Package tikz Error: missing semicolon [closed]

I have found this sample of code from here: Block diagram generation in LaTeX. Initially I had some problems while I was compiling the code and I solved them due to copy paste features some of the ...
1
vote
1answer
93 views

particular prominent yticklabels

Since the paraview legends look horrible when they appear inside a latex document, I want to replace them using Python's matplotlib and Nico's matplotlib2tikz package. So I have compiled a python ...
1
vote
1answer
156 views

Modify tikzpicture plot outside .tikz file

I am not sure if my title gets through what I'm after, but basically I am using matlab2tikz to generate some plots for me and am wondering how you can do some modifications from outside the .tikz ...
1
vote
1answer
98 views

Axes for bivariate normal distribution with tikz

I got the following figure: with this code: \documentclass{standalone} \usepackage{pgfplots} \begin{document} \def\centerx{2} \def\centery{-1} \begin{tikzpicture} \begin{axis} ...
1
vote
1answer
92 views

Number of rows in loaded table

Is it possible to determine the number of rows in a table read by pgfplotstableread{values.dat}\val ? My setup is the following. I make experiments to see how a parameter affects a convergence ...
1
vote
1answer
108 views

Drop shadow of node with pgfplot inside

I have this code: \documentclass[tikz]{standalone} \usepackage{pgfplots} \usetikzlibrary{shadows} \begin{document} \begin{tikzpicture} \node[drop shadow,draw,fill=green] { \begin{tikzpicture} ...
1
vote
1answer
206 views

PGFPlots: semilogxaxis and y axis tick marks

I am trying to set up a semilogxaxis in pgfplots. The image I am trying to generate is but my code below is generating \documentclass[tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{compat = ...
1
vote
1answer
189 views

Plotting a function when date coordinates are used (pgfplots)

I want to plot a simple function on a plot where date coordinates are used in x but it seems that pgfplots cannot accept both. Here's a MWE of what I'm trying to achieve: \documentclass{standalone} ...
1
vote
1answer
164 views

Force 10 base multiplier

How can I get a 10 base multiplier at every tick? I only get 1 multiplier that has a strange position scaled y ticks={base 10:-3} I can't recreate it right now, however by default I got the lowest ...
1
vote
1answer
108 views

Weird Axis Labelling problem with 3D Plot Axes

Note: This was a bug and has been fixed This has been answered by Christian. It's a bug that had been resolved in pgfplots 1.8. I've updated my pgfplots and am now running 1.9. Similar Question ...
1
vote
1answer
120 views

Using a macro inside the axis options for pgfplots

I want to create an macro to replace the string '{a,b,c}' in my code: xticklabels={a,b,c} so I set \newcommand\inputnames{a,b,c} xticklabels=\inputnames but this gives me the same result as ...
1
vote
1answer
172 views

Complete Figure using Tikz

I want to draw the figure where x size and y size will be different. Mark of x will be like 10, 20, 30 etc. and y will be 0.1, 0.2, 0.3 etc. It will be also nice if there is a small grid in the back ...
1
vote
1answer
364 views

Plotting 1/x not correct in pgfplots? [duplicate]

When I'm drawing f(x)=1/x or similar functions, pgfplots draws asymptotes. Do I have to draw the function in two pieces with different domains, or am I missing something? ...
1
vote
1answer
138 views

Adding horizontal space between plots in pgfplot

I couldn't find any solution for adding horizontal space between two plots in pgfplots. The xshift thing didn't help. Here's the code: \documentclass{sigplanconf} \usepackage{pgfplots} ...
1
vote
1answer
150 views

Gap between xaxis and bars in tikzpicture

I am adding a bar chart with tikzpicture and I am getting a strange gap between the bars and the y axis. Am I doing something obviously wrong? Because my other bar charts works fine... Should I ...
1
vote
1answer
104 views

adding complexity to a hyperbolic trajectory

Jubobs generated this code from Drawing a hyperbolic trajectory. If we draw a horizontal line that intersects the hyperbola (I really dont want to add this to the picture), we would have some angle. ...
1
vote
1answer
156 views

Bad horizontal alignment in pgfplots figure

If I try to horizontally align two nodes by giving the same y-coordinate, the text $D_{\textrm{X-ray}}$ and $D_{\textrm{C-ion}}$ is still not aligned properly, which has apparently to do with the ...
1
vote
1answer
154 views

Move ylabel with pgfplot

My ylabel is to far from ticks and I would like to make it closer. Especially ylabel of the right plots. \begin{tikzpicture} \begin{axis}[% view={0}{90}, width=5.5cm, height=4.5cm, scale only axis, ...
1
vote
1answer
796 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
333 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
175 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
279 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
662 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
31 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
39 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
104 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
95 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
64 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
111 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
87 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
137 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
109 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
283 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
72 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
227 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
425 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
105 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
65 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
172 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
226 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
124 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
242 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
141 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
288 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
406 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
354 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. ...