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

pgfplots: Color a 3D surf plot based on y-value

I'm not sure if things have changed since version 1.7, but this is the closest thing I could find. I'm wondering if there's an easier way to use the y-value with a colormap to determine the color, or ...
2
votes
1answer
153 views

Strange behavior with \draw within axis environment

Consider the following snippet of code: \documentclass{standalone} \begin{document} \begin{tikzpicture} \begin{axis} \draw[-latex,cyan] (axis cs:0,0) -- (axis cs:1,1); \addplot coordinates ...
2
votes
2answers
43 views

PGF-Plot not at centre

I would like to plot some circles with pgfplots inside a diagram, however, they are always off-centered. \pgfplotsset{width=7cm, compat=1.12} \pgfplotsset{compat=1.5.1} \begin{tikzpicture} ...
2
votes
1answer
204 views

Electromagnetic Wave Propagation with TikZ [closed]

I'm looking for a code drawing the below picture with TikZ if it is possible: I just need the graph in the middle, i.e. there is no need to also include the text and/or equations. Simply the plot ...
2
votes
1answer
211 views

Display max value of an y bar stacked plot

The following MWE generates an y bar stacked plot: \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ ybar stacked, ...
2
votes
1answer
171 views

Help drawing vectors in a PGFplots axis environment using calculated coordinates and \draw

Why does using \draw and calculated coordinates not follow what a graph of projectile motion ought to look like? Any suggestions for code that would work using formulas in coordinates? ...
2
votes
2answers
284 views

How can I make a simple graph with grids using pgfplots?

I want it to look like this: Preferably with comments so I can learn how to make my own!
2
votes
1answer
150 views

Cylindrical Bar Chart

I know this might be a long shot, but does anyone happen to know (or point me to where to start) how to draw this chart. Say we have 6 values (5, 10, 15, 20, 25, 30), one for each column. Thanks in ...
2
votes
1answer
3k views

Enabling “--shell-escape” on TeXworks under MiKTeX

After resolving the problem on my previous question, I applied to finally install Gnuplot 4.6; and after a successful installation I had to allow the --shell-escape option on TeXworks, so I added a ...
2
votes
2answers
519 views

Pgfplot Automation tool

Are there any good graphical software that I can use to draw diagrams/graphs and export them as pgfplot code? For example, I want to create an histogram so I drag an histogram icon from a menu to the ...
2
votes
2answers
597 views

ybar stacked plot with negative coordinates

When using ybar stacked on a mix of positive and negative coordinates I cannot seem to find the answer I want. \begin{figure} \begin{tikzpicture} \begin{axis}[ybar stacked] ...
2
votes
1answer
46 views

How to escape any CSV file automatically for pgfplots

I want to plot something from the file "processor.csv" from http://cpudb.stanford.edu/cpudb.1416196069.zip. How can I automatically escape this file or ANY OTHER to use it with pgfplots. I've already ...
2
votes
1answer
52 views

Pgfplots: Add curly rotated braces to a graph

I created a simple graph of a demand function so far. Is there an easy way of addition curly rotated braces and labels to the graph (like in my sketch). Those should mark the intervals for a value ...
2
votes
1answer
294 views

Color coded plots with colorbar in pgfplots

In matlab I can achieve this result using the structure of this minimal working example (in matlab): figure('color','white'); hold on xx=0:1; colors = parula(5); for i = 1:5 color = colors(i,:); ...
2
votes
1answer
57 views

How to make parametric plot?

I wonder how to make multiple parameters in pgfplot? In the code I used x and y as parameters to draw sphere, with radiuse 1cm. When I added x=2cm, y=2cm, z=2cm, so that the plot would look better: ...
2
votes
2answers
154 views

Print comma instead of period in node near coord

I need to print the Y-values for each point with a comma for decimal seperator. See my MWE. The data is provided as a .csv within my folder. \documentclass{standalone} ...
2
votes
1answer
234 views

Creating performance profiles

A performance profile is a kind of plot used in the optimization community; here below is an example from http://www.gamsworld.com/performance. For an introduction, see Section 22.4 of Higham and ...
2
votes
1answer
99 views

plot points depending on x value?

Is there any options to replace each nth point={100} for something dependent on column value? My table is something like: x y 0 5 1 4 2 5 3 3 3 -3 2 -4 1 -1 0 0 I just want to ...
2
votes
2answers
612 views

Inserting graphics into asymptote or pgfplots

How another graphics can be inserted into Asymptote or pgfplots? The following is a MWE in pgfplots that creates three figures in the document. The main figure which I want to insert graphics in is a ...
2
votes
1answer
429 views

PGFPlots and gnuplot: How to add asymptote, a xtick that isn't a number, and can intersection be used?

\documentclass[tikz, convert = false]{standalone} \usepackage[utf8]{inputenx}% http://ctan.org/pkg/inputenx % Euler for math | Palatino for rm | Helvetica for ss | Courier for tt ...
2
votes
1answer
106 views

Can \draw .. controls .. be found in pgfplots?

I just want to use something like .. controls .. in an addplot command. Unfortunately, the option "smooth" does not produce the image I desire. I haven't found it in the manual so far. The reason I'm ...
2
votes
2answers
294 views

Negative y value in polar plot

I'm having some trouble with polar plots. I have to plot negative values, but without changing direction. I tried to set the ymin value to be negative, but it doesn't work. ...
2
votes
1answer
617 views

pgfplots: using pi in foreach

How can I use pi the number in a \foreach in pgfplots? \documentclass[tikz, dvipsnames]{standalone} \usepackage{pgfplots} \usepackage{mathtools} \pgfplotsset{compat = 1.8} \begin{document} ...
2
votes
2answers
1k views

barchart in pgfplots looks really bad

Problems: The bar value "90" is written over a black line, almost impossible to read The value "58" is written over an x tick, hard to ready Bar spacing is bad. There is too much space between the ...
2
votes
1answer
599 views

Need help in drawing the following Stacked Bar Graph

I want your help in drawing the following figure. I think it is called as stacked bar graph.
2
votes
2answers
1k views

Remove border around area legend rectangle

I have a legend with the option area legend to draw a little rectangle in the legend instead of a line segment. There is a border around the rectangle I would like to either remove or make the same ...
2
votes
1answer
155 views

biblatex and pgfplots

I'm using pgfplots to plot some graph of data I stored in a file (a lot of data points). If i charge the bibtex package and I obtains the famous error: TeX capacity exceeded, sorry [main memory ...
2
votes
1answer
79 views

Oriented curves

Can someone link me to a tutorial or some examples of how to make oriented curves using pgfplots? Something along the lines of I'm not asking for someone to spend the time reproducing the above ...
2
votes
1answer
83 views

get caption/subcaption every plot using groupplot pgf tikz

Hello I want to have Under each plot (subgroup plot) its caption or label, so I can also reference it in my document. Here in my example I used (a), (b), (c) I can keep them but they are not well ...
2
votes
1answer
166 views

I am trying to draw a clustering Euclidean diagram

I am a biochemistry graduate student, and I have classified breast tumours using a Euclidean centroid-based approach with 437 up-regulated and 370 down-regulated genes (dimension = 807). I would like ...
2
votes
2answers
69 views

Can we get references into externalized pgfplots images to work?

I have some plots created with TikZ and pgfplots. In the captions, I use \ref{...} with plot labels in order to get the marker printed there; a neat feature indeed. Now, when submitting to arXiv one ...
2
votes
3answers
65 views

Text beneath two function graphics inside of a figure

Is there a way to put extra text under some function plots in the following code? I need them to appear side by side on the page in the same figure and I do not what to use an extra caption. The text ...
2
votes
1answer
106 views

Plotting a Bivariate Normal Distribution in Tikz

I have been trying to make a 3D plot of a certain bivariate normal distribution but that is far from ideal at the moment. The code I have been using is \begin{tikzpicture} \centering \begin{axis}[ ...
2
votes
1answer
123 views

PGFplots z buffer does not sort the plotted objects properly

I have a PGFplots axis environment in which I attempt to plot several line objects and a surface object. The objects have to be 'sorted' in the sense of which object is drawn before or behind the ...
2
votes
1answer
117 views

Survival Curves with pgfplots

I'd like to plot Kaplan-Meier (survival) curves with pgfplots from output generated in Mathematica. A typical output table would look something like this: 211 1 253 1 307 1 344 0 365 0 365 1 ...
2
votes
2answers
267 views

Tikz addplot fill between depending on sign

i have following problem. I read data from a table and plot it and then fill the area between the x-axis and the curve. This works fine. Well at least a bit. I want the "negative part" filled in ...
2
votes
1answer
62 views

Suppress auto axis range in pgfplots

I have an axis with two \addplot commands inside in pgfplots. Every \addplot command cause the axis limits to automatically re-arrange in order to show all the plotted data. I would like to suppress ...
2
votes
2answers
264 views

Drawing and labeling asymptotes

How do I label the asymptotes for the rational function y=(x+1)/(x-1)? I copied the code \draw[dashed,latex-latex] ({{1,0}}|-{{axis description cs:1,1}}) -- ({{1,0}}|-{{axis description cs:1,0}}) from ...
2
votes
2answers
390 views

addplot3 [area plot] filling the wrong area

using some saved data, i use (The data file cane be download from pX.txt where the first column is the x and at each iteration, I plot the other columns with respect to the first column) ...
2
votes
2answers
643 views

Plot theoretical Binomial distribution with pgfplots

I am trying to plot the theoretical binomial distribution with pgfplots but don't get the desired output: \documentclass{article} \usepackage{pgfplots} \usepackage{python} \begin{document} ...
2
votes
1answer
215 views

Pgfplots - Labeling Regions

I'm trying to draw chart which indicates different regions of stability/instability in all the areas demarcated by the different curves. How can I manually put in Roman numerals or letters on ...
2
votes
1answer
789 views

pgfplots: How to specify custom tick and label at specified value on an axis

I would like to specify a custom tick with a custom label at a sp \begin{axis}[ symbolic y coords={<{Critical point} at 2.138 ???>}, ] \addplot+[samples=100,domain=-2:2] {x^2}; ...
2
votes
1answer
465 views

read strings from csv file for usage as figure meta data

I got the following problem, I use pgfplots(table) to generate plots and tables in my latex document from generated data. I would like to read additional information from a metadata file. The reason ...
2
votes
1answer
191 views

Lines missing in the graph

The code \pgfplotsset{mystyle/.style={mark=none}} \begin{figure}[t!] \resizebox{.4\textwidth}{!}{\begin{tikzpicture} \begin{axis}[title=QWS Dataset, legend pos=outer north east, ...
2
votes
2answers
2k views

Can't load file for bar plot

I have the following: \documentclass{article} \usepackage{pgfplots} \usepackage{pgfplotstable} \usepackage{filecontents} \begin{filecontents}{testdata.csv} Probe Mittelwert ...
2
votes
1answer
1k views

Moving axes labels in pgfplots

How can one have an axes labels (x and z near the axis) like this:
2
votes
1answer
2k views

How to draw a plot from .xls file in pgfplot?

I want to read .xls format file in pgfplot to draw a graph. I couldn't find how to do that. Is it possible to do that? I have attached a small .xls file here for which I want to compute plot. ...
2
votes
1answer
415 views

Footnote on graph title

I'd like to add a footnote to the graph title. After adding the footnote, it disappears! Here is my MWE: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \pagestyle{empty} ...
2
votes
1answer
130 views

How to change to dotted style

How to change the line style to line style with different line style such that people need not to have a color printer to view it? \pgfplotsset{mystyle/.style={mark=none}} \begin{tikzpicture} ...
2
votes
1answer
133 views

How can I shift ymin to zero when values are near to zero?

How can I shift ymin to zero when values are near to zero? I also try ymin=0 command but it does not work. \begin{figure}[h] \centering \begin{tikzpicture} \begin{axis}[ ybar, ymax=4, ...