{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

2
votes
1answer
154 views

Error when there are plotting macros before \pgfplotsinvokeforeach

Why does \pgfplotsinvokeforeach produce ERROR: Undefined control sequence. when there are plotting macros before it inside a groupplot? \documentclass{article} \usepackage{pgfplots} ...
2
votes
1answer
459 views

Matching Rotated \hyperref in arbitrarily rotated x-label in Pgfplots

Similar to this question: How to make pgfplots vertical labels have proper hyperref erence box? Except, that I am trying to get hyperref working with angled rotated x-axis labels: Got it working, ...
2
votes
0answers
24 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
72 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 ...
2
votes
0answers
20 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
1answer
31 views

Missing folder paths in tikz picture when loaded with tikzscale/standalone

I have a standalone mytikz.tikz picture which loads test.png. Both reside in the folder pics/. My main.tex, which uses tikzscale to load mytikz.tikz, is in the parent folder. Loading the test.png ...
2
votes
0answers
54 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
35 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
40 views

Centre plot inside a node (Sigmoid Neural Node) [closed]

Essentially I want to make a graph topology of a neural network. Since I have different type of nodes (rbf, sigmoid, linear) I want them to have in the node a shape of the function, something almost ...
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
42 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
23 views

Removing commas in x-axis values for pgfplots graph [duplicate]

I want to remove the commas in the x-axis values for a pgfplots graph. Here is an example with commas: Is there a way of removing these commas only in the x-values (not in the y-values)?
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
18 views

Changing max/min a function will be plotted with pgfplot [duplicate]

I was hoping someone could shed some light on this issue: When I plot a function using something like \addplot+[mark=none,smooth,] (\x,{2 * \x^2 + 4 * \x + 1}); the line of the function does not ...
2
votes
1answer
56 views

Not distinct x values and different domain in one graph

I want to plot data like this \pgfplotstableread{ x y 5 10 6 12 6 12 7 11 }\dataA \pgfplotstableread{ x y 5 8 5 15 6 10 7 13 8 14 ...
2
votes
0answers
172 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
23 views

pgfplots: plot data table until n-th line [duplicate]

Is there a way to plot only the first n-th lines of a data file using pgfplots? Currently I'm plotting the whole csv-file using (MWE): \documentclass{article} \usepackage{pgfplots} ...
2
votes
0answers
91 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
161 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
85 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
21 views

Passing changing (in a loop) parameters to Pgfplot function [duplicate]

Usually I just use TikZ for plots but was hoping Pgfplots would simplify life (axis, labels, etc...) but I can not find what is the right syntax to pass parameters to the function. Here is the MWE: ...
2
votes
0answers
94 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
1answer
109 views

pgfplots: plot from csv file starting at a specified row

I do have a large csv file which contains more data than that what I actually want to plot. E.g. I have data starting from x=0, but I want to plot it starting from x=2, but still let the axis start at ...
2
votes
0answers
104 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
47 views

Histogram and nodes near coords [duplicate]

When using pgfplots's hist in combination with nodes near coords, the nodes are misplaced on the edges of the bars and the last node is shown twice. Is this a bug or is nodes near coords not meant to ...
2
votes
0answers
53 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
13 views

pgfplots: dont plot each point from table [duplicate]

I have a large file with data which I want to plot using pgf. Since I don't want to edit the file and it consists of roughly 5000 data points, compiling takes quite a while. Is there any way to tell ...
2
votes
1answer
96 views

pgfplots - Is there an equivalent to 'cycle list name=color list' for custom lists?

I defined my own cycle list mycolor, which equals the vanilla color one except for 2-3 different colors and I added two more items to the cycle. The manual says on page 176: The cycle list ...
2
votes
0answers
65 views

Can pgfplots perform nonlinear regression? [duplicate]

Can pgfplots do nonlinear curve fitting? In Excel, the fitting option is called log(agonist) vs response. I couldn't find an option in the regression section of pgfplots.
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
147 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
49 views

How to get rid of base 10 multiplier in pgfplots axis [duplicate]

I'm making a graph in tikzpicture using the code below. \documentclass[11pt]{article} \usepackage[usenames,dvipsnames]{xcolor} %must come before tikz \usepackage{tikz} \usetikzlibrary{arrows} ...
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
21 views

Legend symbol not being displayed correctly in pgfplots [duplicate]

I'm trying to create a horizontal bar plot with log axis. Adapting several examples I could get what I needed. However, the legend symbols are not being displayed the way I want. Here's what I got so ...
2
votes
0answers
91 views

Why does LaTeX impose a memory limit of 8,000,000 and can I circumvent it? [duplicate]

A few people have already asked the question of how to increase the maximum memory LaTeX is allowed to use (see here and here) because it is quite common for LaTeX to run out of memory when using, for ...
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
137 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
30 views

Legend for selected functions only [duplicate]

In my plot, there are 6-7 \addplot[] entries but I want legend for only one of those functions. How can I do that? I tried \addlegendentry after the function I wish to have a legend for but it creates ...
2
votes
0answers
65 views

pgfplots: gnuplot fails to plot series [duplicate]

I want to plot a function containing a (converging) series. To plot this function I changed the series to a finite sum. \documentclass{standalone} \usepackage[utf8]{inputenc} \usepackage{tikz} ...