{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

8
votes
0answers
382 views

Switching math fonts and back to normal fails in figures?

For my current document I want to use a normal serif font for the main text. Most diagrams from other sources and myself are with sans serif fonts (TeX Gyre Heros). Now I want to use pgfplots to ...
5
votes
0answers
227 views

Shell Scheme with pgfplots/gnuplot

I have a problem with pgfplots. I want to create a shell scheme from an E-motor characteristics. In the end it should look like this (well, with some more pleasing colours): The data is stored in a ...
5
votes
0answers
66 views

pstool + pgfplots + parskip conflict

I've recently observed extremely strange latex bug if pstool + pgfplots + parskip packages are used at the same time. \documentclass{article} \usepackage{pstool} \usepackage{pgfplots} ...
5
votes
0answers
209 views

Tick labels in pgfplots data time format

I tried to plot a data set containing seconds and milliseconds with pgfplots. I’ve found a solution for my task here (pgfplots data time format), which I changed a bit. This principally works very ...
4
votes
0answers
36 views

About the actual meaning of \pgfplotsunitxlength macro from the pgfplots package

From the pgfplots manual (sec. 8.4): \pgfplotsunitxlength,\pgfplotsunitylength,\pgfplotsunitzlength,... Macros which expand to the vector length ||xi|| of the respective unit vector xi... ...
4
votes
0answers
75 views

Specify legend entry as \addplot option?

Somehow, specifying the legend entry for each \addplot using the separate command \addlegendentry bothers me... I'm not sure why, probably because my sense of order says that the legend entry belongs ...
4
votes
0answers
227 views

pgfplots: howto read touchstone files (s1p, s2p, s3p,…)

With pgfplots you can simply create nice plots that seamlessly integrate into your tikz figure. As a high frequency engineer you will inevitably use a network analyzer to measure S-parameters. The de ...
4
votes
0answers
128 views

Pgfplots histogram with density less than one

I want to plot two histograms over each other in order to compare densities of two different datasets. The problem is that the second dataset has less observations than the first one, and I want its ...
4
votes
0answers
287 views

Multiple ternary plots and pie charts in pgfplots

I'm trying to plot lots of ternary plots and pie charts. Ideally it should look smth like this: The pie-chart (ternary plot) on the left-hand side serves as an explanation of what is happening, ...
4
votes
0answers
185 views

Problems with pgfplots, loops inside tikzpicture and reading from files

I was trying to implement this method (How to import ASCII coordinates to TikZ) to import coordinates and draw them, but I am having this problem Undefined control sequence \end{tikzpicture} Extra }, ...
4
votes
0answers
153 views

pgfplots: Plot only parts of table and in “random” order

I have been lurking around stackexchange for a long time and so far been able to find solutions for my newbie problems but now I'm really stuck! My problem is probably not that complicated, yet a bit ...
4
votes
0answers
105 views

Nested symbolic x coords in bar chart

any ideas on how to create something like this in latex? the image is of a basic grouped plot (using pgfplots) but with a nested x axis group (the numbers in red) that I've added using an image ...
4
votes
0answers
221 views

Convolve two 2D Gaussians using tikzfading - intensity issues

I would like to visualize the convolution of two 2D Gaussians (or something looking similar). To do this, I declare them in a tikzfadingfrompicture environment. However, to get the desired result and ...
4
votes
0answers
267 views

How to add marks to all graphs at certain y level

I'd like to add markers to my plots only at certain y levels. How to do this for certain x levels is obvious, I didn't manage to do it inversley though. What I have (equi-x): What I want is ...
4
votes
0answers
95 views

Let ymin be at most 0

I would like to make a graph of some points, where ymin is at most 0. By default, ymin is the value of the lowest point in the graph. I would like to let ymin be the value of the lowest point or 0 if ...
4
votes
0answers
276 views

Common label for a groupplot

This can be considered a combination of the following questions How can a title be placed for a group of pgfplots? Align ylabels of grouped plots at a common line The following piece of code ...
4
votes
0answers
835 views

Tikzscale, trim axis left/right, and externalizing

tikzscale and trim axis do not play well together, with the produced figure being larger than requested because it ignores the size of the labels. I was wondering whether it is possible to use both ...
4
votes
0answers
344 views

using bar chart to compare two groups of data, how to draw one node (showing the ratio) per two bars?

I have two groups of data, you can think of them as one control group and one treatment group, and each data point shows the system's performance under certain parameter x. Now for each value of ...
4
votes
0answers
210 views

pgfplots: percentages and endvalues in stacked ybar

I have two questions regarding the pgfplots package. I have attached the source code I worked on. There are two features I am not able to realize: I would like to put the total value (sum of the ...
4
votes
0answers
299 views

Using `external` selective for TikZ-pictures

For the following example: \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{calc,external} \usepackage{pgfplots} \tikzexternalize \begin{document} ...
4
votes
0answers
167 views

Increasing dateplot's resolution to seconds

These three dots should be spread out over a period of 50 seconds, but for some reason they all appear at 13:00:30. \documentclass{minimal} \usepackage{pgfplots} \usepgfplotslibrary{dateplot} ...
4
votes
0answers
253 views

Using pgfplots and gnuplot and compiling with output-directory

I would like to use the pgfplots package along with gnuplot. However, I cannot get this to work if I compile using the -output-directory option. For example, if I have the following MWE: ...
4
votes
0answers
592 views

Matlab2tikz adds extra legend entries

The legend from a boxplot figure is not being created properly. I get this: Instead of thiS: But really only need 2 legend entries. Any Ideas why all the objects in this plot are being given ...
4
votes
0answers
517 views

How can I display negative error bars in a logarithmic plot using pgfplots?

I have error bars representing 95% confidence intervals in a logarithmic plot. Some of the error bars extend to negative numbers for which the logarithm is undefined, so pgfplots simply drops the bar ...
4
votes
0answers
449 views

Decorate pgfplots mesh

In my quest to solve this question I'm trying to see if I can decorate a mesh-plot by drawing many circles or maybe rectangles with a radius determined by \pgfplotspointmetatransformed. But I can't ...
3
votes
0answers
111 views
+50

Putting coordinate axes on a TikZ picture

I get the following error: Package pgf Error: No shape named Q is known. Without the \begin{axis} ... \end{axis}, the code is compiled but the images depicted is a jumbled mess. I intended to get a ...
3
votes
0answers
38 views

Labeling only one tick mark but having other tick marks on x-axis

The code provided has pgfplots mark 5 tick marks on the x-axis (at increments of 5 starting at 5). I would like to have only one extra tick mark labeled - the one at 2. \documentclass[10pt]{amsart} ...
3
votes
0answers
50 views

Compactifying histogram at empty tick values

I have the following histogram: \begin{tikzpicture} \begin{axis}[ x tick label style={ /pgf/number format/1000 sep=}, ylabel=Throughput, enlargelimits=0.15, legend style={at={(0.5,-0.15)}, ...
3
votes
0answers
39 views

Error message: Dimension too large

I am graphing the restriction of a cubic function on the domain [0, 20]. The function has a maximum value of about 3,079 at about 11.5. To get some view of it, I use the specification unit vector ...
3
votes
0answers
57 views

PGFPlots only have one 0 at the origin

When I create a figure using tikzpicture, tikz adds two 0's at the origin for a plot (one for the x-axis and another for the y-axis). I think it looks cleaner to only have one zero at the origin. I ...
3
votes
0answers
102 views

How to draw the vectors from point to point

I have the file "gradmethod.dat" that contains the values ​​of the 3D coordinates: "gradmethod.dat" is 0.4166337995 -0.0003214561 0.1735863062 0.0036860331 0.0076438475 0.0014742969 ...
3
votes
0answers
126 views

Illustration of Lagrange multipliers

I want to draw with pgfplots and/or tikz an illustration of Lagrange multipliers. For reminder, Lagrange multipliers are used to optimize thing like this: min_x f(x) such that g(x)=0 Basically, I ...
3
votes
0answers
44 views

pgfplot error bar in foreground

I would like to get the error-bar of the lower y-bar ontop of the stacked bar. Which command can I use to get the error bar to the foreground? Thank you in advance. ...
3
votes
0answers
69 views

\addplot table with input filename relative

I include plots using matlab2tikz to generate tikz-files. There was a nice feature added which enables external datasets. A file plot.tikz is generated with the following code (unnecessary code is ...
3
votes
0answers
83 views

Pgfplots: How do I make a style with consistent width while using `axis equal image=true`?

Workaround: If I set height very large, the width of the resulting plot is what I want and the resulting height is no more than it needs to be. In my case, I can set height=11in, which is the height ...
3
votes
0answers
71 views

Creating a tornado plot with pgf and force a break in one of the horizontal bars

To display a sensitivity analysis I want to produce a Tornado plot. In the plot a specific base case value is compared to the values produced after changing parameters in the model. I started from ...
3
votes
0answers
112 views

pgfplots groupplot: fillbetween breaks alignment of plots

I recently (foolishly) updated all my TeXlive packages, including pgfplots (from 1.10 to 1.11). I now have an issue with the groupplots and fillbetween libraries, where using the fillbetween library ...
3
votes
0answers
78 views

create bar chart from select table row(s) for select column

The code below creates a bar chart but does not use the included data table. I would like to create the chart for an arbitrary year by specifying the year and using the table. Possible? ...
3
votes
0answers
82 views

normalizing graphs in pgfplots

Suppose you have multiple graphs in a pgfplot whose y ranges are [0 y1] [0 y2] etc, y1 < y2 < .... I want to divide all graphs by max(yi), so that the plot would be in the y range [0 1] (but ...
3
votes
0answers
169 views

pgfplots error using matlab2tikz

I am trying to plot a matlab figure in latex file. so i use this matlab2tikz function. It works really well, until I try to add some customised text on the figure before converting it to tikz file, ...
3
votes
0answers
133 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?
3
votes
0answers
69 views

My boxplot draws but the coordinates are NaN when I try to label the plot

I have been slowly getting my barchart with a boxplot to come together. My current project is to label the whiskers, quartiles and median. Using examples from the manual, no label is printed. This is ...
3
votes
0answers
334 views

using gnuplot to plot data from a file

I am trying to plot some data using pgfplots, but the data are so extensive that the maximum capacity is reached. I get the error: TeX capacity exceeded, sorry [main memory size=3000000]. What can I ...
3
votes
0answers
167 views

How to automatically optimize the PDF output of TiKZ externalize?

I use pgfplots with externalization for generating plots in my document. For heavy plots the output PDF for a figure can grow to few hundred KB. I used Adobe Acrobat to optimize the PDFs which ...
3
votes
0answers
105 views

External PDF from pgfplots contains several pages when with floatrow

Plotting with pgfplots and the external library creates the single PDFs for every plot as wanted. But every of those PDFs contains several pages, each showing the same plot. Sometimes there are three ...
3
votes
0answers
345 views

Decorating a PGFPlots bar graph with Tikz decorations

Update :- This appears to be a problem in which nodes near coords are handled by PGFPlots and incompatibility with Tikz decorations and fading library. I simply commented the nodes near coords line ...
3
votes
0answers
241 views

Generating Gantt Charts for process scheduling

I am trying to create a gantt chart for my thesis on blocking analysis. I know of the pgfgantt package for generating gantt charts. But this package generates charts for normal schedules, what I need ...
3
votes
0answers
122 views

How to scale both data and error bars in pgfplots

I am able to scale the data using the y filter option in pgfplots plot object (like here How to scale existing coordinates data in pgfplots?). However the error bars are not rescaled as expected. Is ...
3
votes
0answers
124 views

tikzscale and \tikzsetnextfilename

I'm using Windows 7 or 8.1 with MiKTeX 2.9. I still have the problems, described here and here. I updated the packages with the package manager and I use \documentclass{report} ...
3
votes
0answers
89 views

How to automate right node alignment for labels from table AND marker size AND marker color of scatter plot?

Problem: Labels from table are placed right, but overlap. Is there a way to automate alignment of the labels near nodes so that labels do not overlap? This is a small example but I have bigger table ...