{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

11
votes
0answers
496 views

XeLaTeX and TikZ - how do I ensure my PDFs are using the CMYK color model?

The place I want to print my document at needs the PDF to be provided in CMYK. The document is mostly text, except for a few graphs and plots which are done in TikZ or pgfplots. As suggested in this ...
7
votes
0answers
116 views

Automatically add discontinuities in some plots

I have multiple plots (about 15 different figures) that have the same axes (i.e., same ymin and ymax values and same xticks). One of the plots has very large values. I don't want to either increase ...
6
votes
0answers
409 views

Resizing pgf plots in an A0 beamer poster

I am creating a A0 scientific poster with the beamerposter package and I want to include TikZ/PGF plots. However, if I typeset these plots, the line width for the axis and for the data are too small. ...
6
votes
0answers
345 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
139 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
145 views

Help creating 3D solids of revolution in pgfplots?

I have done a lot of plotting in 2D using pgfplots but I am new to the 3D portion. I am attempting to illustrate a solid of revolution. For example, I have the area under the curve y = x^2 + 1 on the ...
5
votes
0answers
61 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
166 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 ...
5
votes
0answers
237 views

legend problem in highlighting a data plot

I followed the tips on highlighting in data plots at http://www.howtotex.com/tips-tricks/highlighting-in-tikz-plots/ The highlighting does not work well with \addlegendentry. A MWE is shown below. ...
5
votes
0answers
432 views

Trying to make an automatic histogram (in pgfplots?)

How can I convert the automatic table generated by the macro, to an automatic histogram? Is the best way do it using pgfplots? \documentclass{article} \RequirePackage{ifthen} ...
4
votes
0answers
95 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
86 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
126 views

grouped bar colors in pgfplots

I have a simple grouped bar chart but would like to have all group bars the same color. Currently each bar in a group is colored, possibly because of the way I have used addplot. I've tried to use a ...
4
votes
0answers
209 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
135 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
133 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
198 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
204 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
90 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
664 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
303 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
183 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
249 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
140 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
522 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
461 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
416 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
102 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
43 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
190 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
111 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
88 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
270 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
192 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
91 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
78 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 ...
3
votes
0answers
110 views

How to color groups of bars in a graph, coming form an external file?

I have a graph displaying bars and error bars, the numbers comming from an external .dat, being simply black and white. And this is how I got there: \documentclass[12pt]{report} ...
3
votes
0answers
202 views

Normal probability plot with percentile grid and axis

How can I make a normal probability plot with a percentile grid and y-axis as shown in figure? I've read the pgfplots documentation but i can't find anything useful.
3
votes
0answers
69 views

Pgfplots fails to generate boxplots for some data set

I use pgfplots to generate boxplots, however with some small data sets as the following, I get an error message. speed 2 3 1 2 2 11 Here is the error message : Sorry, an ...
3
votes
0answers
178 views

pgfplots - divide y-axis in 2 parts

I have a plot, code here. Now the problem I have is that because of the scale of y-axis it looks as if the plots are actually just 3 lines. Now what I want is that the y-axis is sort of splitted. Into ...
3
votes
0answers
392 views

PGFPlots: importing data from a txt file

So I imported data from two txt files. However, I would like to plot the mean of the data and then the standard deviation bars. How can this be done? \documentclass[tikz, convert = ...
3
votes
0answers
95 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 ...
3
votes
0answers
206 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 ...
3
votes
0answers
305 views

Clustered Stacked bar Chart Overlapping Labels

I have following code by which I generate the following graph \documentclass{article} \usepackage{pgfplots} \usepackage{tikz} \usepackage{xcolor} \usetikzlibrary{arrows,automata,calc,shapes, ...
3
votes
0answers
212 views

drawing lines using polar axis coordinate system in pgfplots

I would like to draw arrows with polar axis notation in a pgfplots figure that has Cartesian axes with the draw command: \draw[->] (polar axis cs:radius=1, angle=30) -- (polar axis cs:radius=2, ...
3
votes
0answers
210 views

pgfplots trim to axis area even with extra ticklabels

I have a plot with extra x tick labels on top in pgfplots that i wish to display in a figure at the top of my page. I wish to have the top of the actual axis rectangle directly at the top, with the ...
3
votes
0answers
215 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: ...
3
votes
0answers
206 views

Relative coordinates in pgfplots across multiple table plots

This is a follow up question to this one: Use pgfplots \addplot plot coordinates with relative coordinates Is it also possible to have the relative coordinates across multiple plots? For example if ...
2
votes
0answers
35 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, ...
2
votes
0answers
73 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} ...