{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

3
votes
0answers
130 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
242 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
93 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
204 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
537 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
420 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
238 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
245 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 ...
2
votes
0answers
16 views

Appending arbitrary code to a pgfplots axis environment before curve and axes are drawn

I am forced to produce my own grid lines, but they overlap when I use the code below. How can I draw the lines before the axes and curve are drawn? \documentclass{standalone} \usepackage{pgfplots} ...
2
votes
0answers
21 views

How can I make my pgfplots title multiline

I tried title = {really\\ long title} but it does not work. One thing that I find is working is to use title = {\parbox{0.4\textwidth}{\centering really long title}}. But this is not as flexible. Is ...
2
votes
0answers
19 views

Getting the same angle marks using pgfplots as those using TikZ

I am using pgfplots to draw intersecting lines. Three right triangles are made by these intersecting lines - two of them in the third. I am trying to mark the two pairs of acute angles of equal ...
2
votes
0answers
52 views

pgf plots, barplot, irregular spacing between bars/columns

I've created a (grouped) bar plot with three groups of bars/columns, but it would be great if the space between the first and the second group would be a bit larger than the space between the second ...
2
votes
0answers
32 views

pgfplots plot only odd 3d segments

Given a table of 3d coordinates like this: x1 y1 z1 x2 y2 z2 x3 y3 z3 x4 y4 z4 I would like in a single \addplot3 command print the the segments that go from the 1st point to the 2nd point, ...
2
votes
0answers
30 views

PGFplots 3D: Axis labels are placed “in the middle” of axis instead at the tip

I would like to use the "center"-style for axis and place the label of the axis near the arrow tip. It works in 2D but in 3D the labels for the x and y axis are placed at very weird places. See the ...
2
votes
0answers
34 views

Custom column intervals in a PGFPlots histogram

Is is possible to give columns in a PGFPlots histogram custom interval of different sizes? Eg. I would like my histogram to have five columns over these intervals: [-100,-50[ [-50,0[ [0,1[ [1,50[ ...
2
votes
0answers
32 views

pfgplots: customize annotation for one point

I have the following scatter plot: \documentclass[class=elsarticle]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ enlargelimits=0.2, xlabel=Depth, ...
2
votes
0answers
34 views

Axis drawn longer than specified

The y-axis in the following graph is about ten times higher than I want it to be. The graph has a maximum height of 0.5 units. I specify that the y-axis should go up to 2 units. ...
2
votes
0answers
52 views

Creating Tikz Legends in the Caption

i'm having a few issues with creating a legend in the caption of an image. I've made a lot of graphs using matlab2tikz and i've externalised them to reduce my compiling time and memory usage. ...
2
votes
0answers
40 views

X label in multiple bars and problem in bars

Can someone help me in this problem? I am trying to draw an histogram, but I am having some problems. This is the histogram I have made so far: \begin{center} \pgfplotstableread{ 1 800 900 ...
2
votes
0answers
54 views

Mosaic/Marimekko charts; does this answer still work?

I found this answer How can I produce a mosaic chart / Marimekko chart? and have used it before to create beautiful charts. Under Texlive-2014, with pgfplots version 1.10, I receive a lot of white ...
2
votes
0answers
66 views

Part of specified graph is missing

I have the code to graph a rational function f(x)=(3x^{2}+5x)/(2x-3) with a vertical asymptote and a slant asymptote. The equation for the vertical asymptote is x=3/2. I decided to have two parts to ...
2
votes
0answers
169 views

Contour plot of data, where the data is of the form x_i, y_i, f(x_i,y_i)

I would like to plot the following data in a contour plot using pgfplots: data.txt. The data is of the form x_i, y_i, f(x_i,y_i) and contains NaN values. I am able to plot this exact data in a surface ...
2
votes
0answers
90 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
45 views

Forcing graphic, table, plot .. out of page boundary

I am very new to latex, so this question might be very basic. However, I have been searching the whole evening, so either I don't know how to google this effectively, or what I am trying to do is not ...
2
votes
0answers
79 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
160 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} ...
2
votes
0answers
159 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 ...
2
votes
0answers
84 views

How to draw stacked /vastellated bar charts

i want to draw a chart like this (Chart / Image taken from here): First of all: How is this type of diagram called? By searching "stacked bar chart" in google, I cannot find charts like this. My ...
2
votes
0answers
93 views

pgfplots, representing bars from same category and series adjacently

I would like to represent the number of counts from specific cell types on a bar chart. The cells are from different mutants, consequently there are four series (742, 743, 744, 745). However there are ...
2
votes
0answers
98 views

Location and size of pgf plot axis in a tikzpicture - with tikz positioning library?

This could be a second part to Positioning pgfplots axis in tikzpicture , I guess ; consider the following MWE: \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{positioning} ...
2
votes
0answers
103 views

Barchart, Boxplot Data Table PGF Math Errors from mixed format inline data

My code for a horizontal bar chart with a summarizing boxplot is coming together, but I still have a nagging PGF Math problem if I try to plot the boxplot values, which are commented out at the bottom ...
2
votes
0answers
52 views

Problematic rendering of mark=+ in pgfplots

Consider the following MWE: \documentclass{article} \usepackage{pgfplots} \usepackage{tikz} \pgfplotsset{compat=1.5.1} \xdef\doPlotCoords{} \foreach \r in {0,1,...,10}{% \xdef\tempCoords{} % ...
2
votes
0answers
56 views

Change unit from a read in data table

I use pgfplots to create a graph from a csv file. The column that I use for the x-axis contains time values measured in ms. As my timelapse is a bit more as a min I therefor have values between 1000 ...
2
votes
0answers
142 views

Tikz for generating pdfs and using in latex, compiling problems

I tried using the advices online for implementing tikz into the texmaker and Miktex combiantion. The Miktex is updated and the texmaker runs normally. The tikz version from a flow example runs ...
2
votes
0answers
203 views

pgfplots: problem with stacked histograms

I want to plot data for a node that has several inflows and one outflow, using stacked histograms. I want the plot to look like this: First, I have tried stacked histograms (ybar stacked, see the ...
2
votes
0answers
63 views

Dimension too large with a small set of data

I'm trying to compile a simple tikz plot with floating point numbers, but I'm gettin a Dimension too large error. The tikz file works with a different data set, so I guess the problem has something to ...
2
votes
0answers
136 views

pgfplots in beamer class with BaKoMa TeX

I have a problem concerning plotting of functions in beamer class with pgfplots. I use BaKoMa TeX. In the article class, all works fine, but switching to beamer, an error occurs as soon as ...
2
votes
0answers
113 views

tikz externalize and pgfmath error

Using external and \pgfmathdeclarefunction at the same time results in ! Illegal parameter number in definition of \pgfmathfloat@expression. ! Package PGF Math Error: Could not parse input '' as a ...
2
votes
0answers
107 views

Pgfplots: date range and integers as input data

I have a data table that looks something like: Week,value 2010-01-03 - 2010-01-09,0 2010-01-10 - 2010-01-16,0 2010-01-17 - 2010-01-23,0 2010-01-24 - 2010-01-30,0 2010-01-31 - 2010-02-06,0 2010-02-07 ...
2
votes
0answers
156 views

Histogram improvement or to plot histogram in 3D

I have created this histogram! I wanna ask: Can I further improve it as at one "normalized frequency, 41" I have two "frequency shift values, 4 and 11"? Is it possible to plot such histogram in 3D, ...
2
votes
0answers
165 views

How to make a tidy grouped and stacked barchart?

I found this chart in a recent paper. I've emailed the author about it but they didn't reply. I want to create something similar but I don't know what the correct software to use is. I need the ...
2
votes
0answers
358 views

LaTeX Box plot drawing using pgfplots

Two issues I have in the following code. I want to put the box in the middle of the line and I like to show the for the maximum value. Any suggestion will be appreciate. Thanks. ...
2
votes
0answers
169 views

How to align bars with the legend?

I'm able to draw bar chart using tex file mentioned below \documentclass[landscape,a3paper,11pt]{article} \usepackage{pstricks-add} \usepackage{pgfplots, pgfplotstable} \begin{document} ...
2
votes
0answers
421 views

Adding a legend next to subfigures of pgfplots

I have an error bar chart, where I would like to add a legend. Using this type of code, I am facing problems to add any kind of legend. Please consider my current code: ...
2
votes
0answers
302 views

matlab2tikz/pgfplots adding colorbar afterwards

I am currently using both matlab2tikz and pgfplots with external graphics since I am not completely convinced by either yet. Is it possible to add a colorbar with any of the two afterwards (meaning ...
2
votes
0answers
220 views

pgfplotsforeachungrouped in groupplot

I want to create a grid of plots with groupplots, where every plot is taken from an external file and included via pgfplots. Due to the fact, that foreach doesn't work nicely in a axis environment, ...
2
votes
0answers
288 views

Free space in bar-chart with empty entries

I would like to plot some data set with the ybar option of pgfplot. But not all entries are nonzero. The zero entries waste space between the bars and when the plot gets crowed it is not clear anymore ...
1
vote
0answers
34 views

Specify arc radius in coordinate systems units

This is a follow up on Specify radius of an arc with pgfplots and axis direction cs? If I'd like to change the MWE from there to the following: \pgfplotsset{compat=1.10} \begin{tikzpicture} ...
1
vote
0answers
51 views

How do I do a scatter with trend line?

I'm trying to remake this table from an article about Nested Containment List by Alekseyenko: I have a file with all my points in this format: 1183 0.561 1222 0.384 1473 0.425 1941 ...
1
vote
0answers
63 views

Convert image to code (TikZ? PSTricks?)

I have a ... pdf file, which contains figures of plots such as the following: Now the second plot isn't too hard to draw on TikZ (I assume... I hope? I don't have any experience apart from ...