{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
162 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
99 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
147 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

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
708 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
524 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
296 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
32 views

Weird plot from discontinuous data

Tex gurus; I'm trying to plot some data against time, for which I have some missing values. Most of the time, this works well, but for one plot in particular I am getting some very strange results. ...
2
votes
0answers
29 views

Why does pgfplots scale dimensions differently in a polar plot

I am using pgfplots to draw two images with polar coordinates. Even though I specify the same value that represents the 100% value (radius of a 100 for both red circles, they are the last plots in ...
2
votes
0answers
40 views

Positioning of named nodes and paths within groupplot environments

I am having issues with pgf, pgfplots and the groupplots library. The issue is best explained with an example \documentclass[tikz]{standalone} \usepackage{pgfplots} %\pgfplotsset{compat=1.12} ...
2
votes
0answers
32 views

Import data to smith chart?

I have data in CSV format (or I can make it tab-delimited ASCII) and I would like to import it to a smith chart using the pgf (edit: pgfplots) package. The data contains 2 columns with the real and ...
2
votes
0answers
36 views

Groups of boxplots using symbolic coordinates

I would like to create a plot similarly as to the bar plot example, but with boxplots instead of bars. So far what I have this MWE: \documentclass{article} \usepackage{amsmath} ...
2
votes
0answers
40 views

Legend image arguments for the command `\addlegendimage`, 3d legend image

In the 3d plot I want to modify the third legend entry to only show the marks and not the line. From http://tex.stackexchange.com/a/113765/28093 I understood that I'm supposed to use something ...
2
votes
0answers
32 views

How to remove the border in axis with pgfplot?

As illustrated in the circle in the image, there's a little gap between the 0 and the border. How can I remove that little gap? MWE Sample code to generate above plot % in preamble ...
2
votes
0answers
44 views

Mark nodes/coordinates by label (pgfplots)

I am drawing a scatterplot, where the data is in a table and the values are labeled. I want to connect certain nodes with straight lines and in order to do so, one has to label the nodes/coordinates. ...
2
votes
0answers
33 views

pgfplots: Fixing overlapping X axis labels

I am trying to create a time series plot but my X axis labels overlap: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{width=14cm,compat=newest} \usepgfplotslibrary{dateplot} ...
2
votes
0answers
50 views

3D plot from file

Hi I am currently learning how to do plots in Tex and I found a problem which I cant solve. I would like to do 3D surface plot from file but all what I get is a 3D line. For learning purpose I used ...
2
votes
0answers
51 views

Problem with pgfplot

I'm trying to use the template that can be found here https://github.com/matze/mtheme but I'm running into a problem which I can't resolve. The error message says; I can't find file ...
2
votes
0answers
75 views

How to plot multiple plots associated to different colors of a colorbar with pgfplot

I HAVE EDITED THIS THREAD, NEW QUESTION AT THE END First of all, I apologize for my possibly bad English as it is not my mother tongue. My problem is complex but I am going to try to explain it the ...
2
votes
0answers
76 views

Plot data and the mean of each column

I have a data file which looks like this: 1 256 2 197 3 190 4 188 5 219 6 169 7 179 8 181 9 182 10 178 where the first column are timesteps and the second column contains the ...
2
votes
0answers
75 views

Tips for making a lightweight long document

I wonder what tips should we keep in mind to keep a long document lightweight. I've written 3 chapters from my thesis with ~30 figs and some math, and document size is exponentially increasing (10MB ...
2
votes
0answers
99 views

Comparison of the plots of the same line on the Cartesian plane using pgfplots and TikZ

I have the plot of a line using pgfplots and the plot of the same line using TikZ. I would like them to be identical. I need to correct a mistake in the plot of a line using pgfplots. The point ...
2
votes
0answers
80 views

Automatically positioning a legend relative to multiple plots in groupplots

This question deals with centered legend placement in a set of plots aligned with groupplots. However, as the OP stated in a comment, the (accepted) solution requires some hand tweaking. I suspect ...
2
votes
0answers
92 views

Problem with pdfpc and latex-beamer presentations

I have a figure which uses pattern. The same behavior I notice with one of the examples of pgfplots, http://pgfplots.sourceforge.net/pgfplots.pdf page 211. When I use envince everything looks normal ...
2
votes
0answers
73 views

pgfplots: rotating a shape in 3D independent of the axes

I have a group of shapes I'm plotting in 3D via \addplot3 (such as a cone) and need to have them pointed in a direction specified by the macro arguments. I do not want to just change the view angle or ...
2
votes
0answers
41 views

Prevent Tikz externalize from rebuilding figures

I am using Tikz externalize for the figures in a manuscript. The original files containing the Tikz/pgfplots code have been deleted (but will be regenerated in several hours when my simulations finish ...
2
votes
0answers
64 views

vertical axis doesn't show in ymode=log with pgfplots

Consider the following MWE (mostly copy-pasted from this example) : \documentclass[12pt,% a4paper,]{scrreprt} \usepackage{pgfplots} ...
2
votes
0answers
49 views

pgf stacked bar plot not displayed correctly - wrong intersection with x-axis

I'm trying to generate a bar plot with the code below. As you can see does the bar plot not start at zero, as it should. It starts below zero!!! Can anybody help me? ...
2
votes
0answers
52 views

How to make ybar chart where the final bar start at the end of the other one?

I want to make a ybar chart like this picture here (sorry for my bad painting skills ;) ) So that the bars switch from minus to plus or the other way round and the bar lenght should be noted as a ...
2
votes
0answers
124 views

Zero space between bars of the same interval in pgfplots ybar interval plots

I need a bar plot (containing multiple \addplot) with following requirements: ticks between x labels (and, in this respect, my question differs from Adjusting width of ybar interval separator to ...
2
votes
0answers
65 views

pgfplots: Distributing random points on surface

I want to distribute some random points on a surface. My working example looks like this: \documentclass[border=2pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \usepackage{tikz} ...
2
votes
0answers
79 views

Grouping bins in bar charts?

I have below bar-chart. I want to group the bars together by color. It makes no sense to compare the bins directly, but only the values with the same color directly. Is there a way to create two ...
2
votes
0answers
82 views

Obtaining a particular 3d view in pgfplots

I am trying to achieve the following plot, with the indicated perspective and the axis lines centered: I've played around with several view options and I'm just not able to reproduce the figure. Any ...
2
votes
0answers
53 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
108 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
37 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
70 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
36 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
71 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
64 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
67 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
287 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
66 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
93 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
210 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
108 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
161 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
118 views

Scaling inset plot relative to main plot axis length

I want to create a plot with a second, smaller plot as an inset. This is easy enough using the following code, where the widths of the plots are defined. However, I often use figures in several ...
2
votes
0answers
270 views

pgfplots - How can I increase TeX's capacity for plotting large datasets? (TeX Live on Windows)

There are several questions and replies on this topic, yet so far I haven't found one which reliably details the steps for TeX Live and TeXstudio on Windows. Of course the editor might be an ...
2
votes
0answers
246 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 ...