{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
290 views

Peculiar tikz-external, pgfplots, tikzscale combination problem

I want to use \tikzexternalize and tikzscale with pgfplots' \addplot graphics command and \clip=false option. I am using three files: A.png, A.tikz and A.tex. A.png can be any graphics file. A.tikz ...
2
votes
1answer
321 views

Simple Line-Plot with date on x-axis

I need to do a really simple line plot and my data is looking like this: Date Value Apr2013 0.06 Mai2013 0.08 Jun2013 0.1 Jul2013 0.2 Aug2013 0.4 Sep2013 1.5 Okt2013 2.0 Nov2013 4.1 Dez2013 8.1 ...
2
votes
1answer
107 views

Loop in pgfplots doesn't work

I'm trying to do a loop in pgfplots to draw a bunch of rectangles under a curve, but it doesn't work. This is my code \begin{tikzpicture}\begin{axis}[ width=160pt,compat=1.5.1,grid ...
2
votes
2answers
151 views

How do I group curves in 2-D plots with pgfplots

In the above image, you can see that there are 4 curves. I have two techniques (black and red). I test them on two different experimental scenarios. So corresponding to each scenario, I get one red ...
2
votes
1answer
153 views

Why do these two plot commands give different results?

Why the following two MWE codes, using pgfplots with and without gnuplot give different results (a phase shift)? \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
2
votes
1answer
107 views

Special design of 3 plots with LaTeX

I wish design 3 plots (A, B and C) in the form of: ------------------------+---------------+ | | A | | ...
2
votes
1answer
90 views

Vertical labeled markers

I have a plot with four curves, and I wish to add vertical marker to pinpint the exact moment the curve drops below a certain threshold, much like this: I'd like to be able to control the width of ...
2
votes
2answers
234 views

pgfplots: markers with text above the marked points

first an image of what I would like to have I want to have a free text of the nth marker of each plot. I am symply providing no example, because I am not really sure to solve it and I am maybe ...
2
votes
1answer
154 views

Ternary plot: points outside of the triangle

although my test data points are all inside the (0,0,1),(0,1,0),(1,0,0) triangle, my ternary plot unexpectedly plots some of them outside of the triangle. \documentclass{beamer} ...
2
votes
1answer
500 views

Polar plot: label and legend rotation

I am using the polar library with pgfplots to plot a graph like this: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat = newest} \usepgfplotslibrary{polar} ...
2
votes
1answer
205 views

pgfplots: How to fix the number of yticks?

With max space between ticks= it is possible to set space between ticks, but I would like to setup the number of ticks, so all my graphs will look similar. I would be happy with 4 ticks, so if y vary ...
2
votes
1answer
239 views

How can I get the grid done correctly?

I'm trying to put the grid in my graphic, and I'm getting this problem below. The grid style must be help lines, and dashed, this I know how to do, but the problem remains in put the grid correctly. ...
2
votes
1answer
444 views

Trouble including a Matlab surf plot (pdf or png) with pgfplots

I have successfully used \addplot graphics before. Now I have a surf plot in Matlab, which I exported as png and pdf and I would like to include the image with \addplot3 graphics. I found some ...
2
votes
1answer
518 views

PGFPlots \addplot cannot read regression column [closed]

I am trying to plot a small dataset and a regression line for it. Here is my MWE: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{tikz} \usepackage{pgfplots} \usepackage{filecontents} ...
2
votes
1answer
153 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
29 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
30 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
48 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
33 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
52 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
58 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
53 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
140 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
84 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
42 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
73 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
150 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
151 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
82 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
90 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
95 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
102 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
99 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
45 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
50 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
90 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
55 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
130 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
195 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
90 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
61 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 ...