{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

7
votes
0answers
192 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 ...
7
votes
0answers
357 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
67 views

TikZ/PGF 3.0 datavisualization vs pgfplots

To follow-up on a previous question TikZ datavisualization or pgfplots?, the current release of TikZ 3.0 has a flexible datavisualization engine that creates the same kind of plots as the more mature ...
5
votes
0answers
159 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
155 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
63 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
178 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
246 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. ...
4
votes
0answers
33 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
121 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
97 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
227 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
146 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
137 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
201 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
222 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
225 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
705 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
316 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
191 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
266 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
146 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
541 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
469 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
425 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
54 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
97 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
119 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
48 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
232 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
130 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
92 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
292 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
201 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
95 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
83 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
116 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
215 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
76 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
188 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
420 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
97 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
326 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
218 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
216 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
223 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: ...
2
votes
0answers
39 views

Conversion of big “amount” of seconds into HH:MM:SS when plotting timeseries with pgfplots

My aim is to plot a timeseries (experimental data) using pgfplots in LaTeX (pdfLaTeX, TexLive on Mac). The data I'm using is seperated with semicolons (columnwise) and has the following structure: -- ...
2
votes
0answers
104 views

Very fancy bar chart

Just wonder if this could be done with tikz? I know I should provide at least a MWE, but I am new to latex and have absolutely no idea where to start. MWE (Addition by HK) ...
2
votes
0answers
28 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? ...