{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
1answer
271 views

One axis in pgfplots

I try to make one axis exercices for students, thus I try to customize pgflots but I don't understand what append in this examples : \documentclass{article} ...
8
votes
2answers
419 views

Contour plot of arbitrary R^3 function without gnuplot

Is there a way to make pretty contour plots of arbitrary functions in R^3, like the one below for example, without the use of the gnuplot contour-stuff? The reason I'm asking is I prefer a simple ...
5
votes
2answers
228 views

special axis distribution

The bar chart below is what I have at the moment. As you see there is a huge difference between the y-values. I could use a logarithmic x-axis, but this is not readable for non-scientists. I want to ...
6
votes
2answers
421 views

How to draw the unit hyperbola in LaTex?

I want to make a graph of the unit hyperbola, but I'm not sure how to make it appear using pgfplots. Basically, what I'm using is this: \documentclass[12pt]{article} \usepackage{pgfplots} ...
4
votes
2answers
116 views

Custom Spacing on PGF legend

I'm trying to change the spacing of a single legend entry in a PGF bar plot. This is my MWE: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} ...
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 ...
1
vote
0answers
56 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 ...
5
votes
1answer
182 views

Plot mean of measurements with pgfplots

I have a file of measurements that I am planning to plot with pgfplots. There are multiple measurements for each input: Size Time 100 599.3 100 598.0 100 597.7 ...
9
votes
1answer
191 views

Local colormaps in global coordinate system

I am trying to get a surface graph with two colormaps. Instead of using the full Z range i want to give the first surface its own colormap and the second surface should receive its own colormap too ...
0
votes
0answers
110 views

How can I plot an implicit function in pgfplots without having to use gnuplot?

I have been trying to plot a couple of really simple implicit linear functions using only pgfplots internal facilities. Here is my MWE: \documentclass{article} \usepackage{pgfplots} ...
3
votes
1answer
221 views

Errors when plotting a bar chart

This is my crude attempt to create a graph from copied example. I want to plot the diseases on the Yy axis and QoL scores on x axis. It has resulted in errors. Could anyone be kind enough to point out ...
3
votes
2answers
165 views

Custom axis line location for PGFplots table with tikzpicture

I am trying to change the axis y line location from 0 to 100 from these questions (1, 2). Say that the error bars represent confidence intervals on percentage scale, so 100% is no difference. Here is ...
2
votes
0answers
116 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 ...
4
votes
1answer
354 views

2 axes scaling problem

I have two problems : the arrow on x axis. The left y axis does't match all the hight as the right does. I want on the left axe ymin=0 ymax=25 and the ticks lines in front of the tick lines of the ...
2
votes
0answers
99 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 ...
4
votes
1answer
178 views

How to keep the same mark colour when using meta data for marker size?

Probably an easy answer to this, but I can't get it to work, and I obviously don't understand the manual or the other answers given to similar questions here on tex.sx (see 1,2, and 3). Basically I ...
3
votes
1answer
106 views

Place several plots on one page

I have 4 plots that should be placed on the same page. Does anyone know how to do it? I need to have a caption/title under each plot (and I cannot place it above the plot as there are numbers), a ...
3
votes
1answer
178 views

\newcommand Tikz argument problem

I have this two commands to read x from y or y from x on a plot. The problem is that the label is 180:#3 with above position instread of #3 east position. The wish (less important) : how to merge ...
2
votes
0answers
88 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 ...
1
vote
1answer
133 views

Drop shadow of node with pgfplot inside

I have this code: \documentclass[tikz]{standalone} \usepackage{pgfplots} \usetikzlibrary{shadows} \begin{document} \begin{tikzpicture} \node[drop shadow,draw,fill=green] { \begin{tikzpicture} ...
5
votes
2answers
194 views

Bouncing ball over time

I have this clumsy code to plot the height of a bouncing ball over time. Is there a possibility for optimization? Perhaps writing the functions directly with the tikz math library? Also at the moment ...
2
votes
1answer
244 views

pgfplots: How to change color of boxplot?

How is it possible to change the color of a boxplot from pgfplots? Black would be wounderful! Here is an MWE: \documentclass{scrartcl} \usepackage{pgfplots} \usepgfplotslibrary{statistics} ...
4
votes
1answer
104 views

PgfPlots ybar and ybar stacked conflict

I have one document with 2 documents included. In the first document I have a pgfPlot with \pgfplotsset{ ybar stacked, ...etc } and in the second one \pgfplotsset{ ybar, ..etc }, but the first ...
2
votes
1answer
177 views

How to exclude negative values from plot of PGFPlots package?

I'm plotting bar plot using this code: \documentclass[tikz,12pt]{standalone} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english]{babel} ...
1
vote
1answer
249 views

PGFPlots: semilogxaxis and y axis tick marks

I am trying to set up a semilogxaxis in pgfplots. The image I am trying to generate is but my code below is generating \documentclass[tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{compat = ...
6
votes
4answers
773 views

Drawing a triangle with smooth curves in the middle

I need to draw a picture like this. I made it by using Paint so it is not very clear. I need the smooth curves inside the triangle as well as the straight lines that connect the curves and the ...
3
votes
1answer
110 views

Why does datatool/pgfplots only plot for last row in table?

I'm trying to use datatool to put a bunch of circles on a pgfplots plot. I tried the following: \documentclass{article} \usepackage{datatool,tikz,pgfplots} \pgfplotsset{compat=1.9} ...
5
votes
1answer
102 views

How do i get the x axis on top but keep a line on the bottom

I have the following plot \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[ xlabel=$x$,ylabel=$\sin x$, axis x ...
5
votes
2answers
245 views

How to have half circle arrow?

The following MWE: \documentclass{article} \usepackage{pgfplots} \usepackage{filecontents} \pgfplotsset{compat=1.8} \begin{filecontents}{depensezero.dat} 2010,14.0,67.0,19.0 2011,33.0,39.0,28.0 ...
3
votes
1answer
215 views

\pgfplotstabletypeset heatmap: logarithmic scale

I am trying to create my own rendition of this heatmap. My values range anywhere from 1 to 783764. I want to plot them as colors on a logarithmically (base10) scaled colormap. So the values' ...
7
votes
1answer
136 views

Cycle not working with pgfplots \foreach

I'm trying to plot some data from a text file, and I would like to be able to cycle the styles of the markers using a custom list. I was able to get the cycle list working, but when I added error ...
1
vote
1answer
121 views

Place coordinates halfway (or 75%, etc) up the plot

I am using this macro \newcommand{\ymax}[0]{\pgfkeysvalueof{/pgfplots/ymax}} to do stuff like the following: \draw[dashed] (axis cs:4, \ymin) -- (axis cs:4, \ymax); and this works fine. ...
8
votes
3answers
235 views

Two backgrounds in a graph

How can I set two different backgrounds in a graph using pgfplots? In my case, I need a colored background for x<5 and a different background for x>5.
4
votes
2answers
151 views

Making the z-buffer attend to axis lines

If I use centered axis lines, they don't seem to be considered worthy by the z-buffer. Surfaces get drawn on top of them, even when they should be behind them - like this: Code used: ...
3
votes
1answer
55 views

calling an expression in the document in pgfplot

Say I have the following function which I would like to plot. $S(z)=\frac{p.(\alpha_H+z.\alpha_W)}{p.(\alpha_H+z.\alpha_W)+\beta_H+z.\beta_W}$ While I could specify it in the \addplot command, I ...
3
votes
1answer
270 views

Alignment of several pgfplots of different widths inside subfigures

I try to fit six pgfplots created with matlab2tikz onto a page by placing them inside subfigures. So my document looks something like this: \documentclass[a4paper,11pt, BCOR=12mm, ...
2
votes
2answers
349 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} ...
4
votes
1answer
152 views

Remove data points without changing the original table

I would like to know a way to remove one or more data points from a plot, using pgfplots, generated by an external table "data.csv". In the minimal example below, I would like to remove the third ...
11
votes
2answers
271 views

Automatically label groupplots (A), (B), (C),

Is there a way to automatically label a set of groupplots from the pgfplots package (A), (B), (C), ...? \documentclass[margin=2pt]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{groupplots} ...
6
votes
1answer
70 views

Partial instead of full markers are shown in PGFplots

When using \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot [ red, ...
3
votes
1answer
63 views

place 'axis' at specific coordinates

Is there any way to put axis environment at specific coordinates? For example if I want the function plot to be a secondary part of a big tikzpicture. This is a MWE: \documentclass{standalone} ...
1
vote
0answers
29 views

Base 2 logarithmic scale [duplicate]

I am plotting data with pgfplots using semilogxaxis that use base 10 logarithm. Is there a way to change the base of logarithmic-axes (I need an axis where power of 2 values are separated by the same ...
5
votes
4answers
198 views

How to add a labeled mark on your plot in xy-plane by using (tikzpicture)?

I need a picture like Here is a try: \documentclass{article} \usepackage{pgfplots} \usetikzlibrary{decorations.markings} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[-stealth, ...
4
votes
1answer
156 views

How to plot a graph of a function with undefined constants?

I want to plot a graph of a function with "undefined" constants. Specifically, I am trying to plot the following function: $$\sqrt{\frac{\lambda}{\pi}}e^{-\lambda(x-a)^2}$$ The original problem just ...
7
votes
1answer
197 views

Reverse graphics in pgfplots

Issue and Question I encountered that my graphics are all upside down. Now I have to mirror them in pgfplots. How can I perform this step? It is no solution using the option [y dir=reverse] which ...
5
votes
3answers
229 views

How to draw two opposite arrows on the same curve?

How can I draw opposite arrows on the same curve? The following image shows my aim.
7
votes
4answers
351 views

Generate a Hinton diagram using pgfplots

In one of my previous questions, the magnificent Jake helped me generate a heatmap that looks identical to using imagesc on a 2D matrix within MATLAB. The results look great, but now I'm looking to ...
6
votes
1answer
149 views

Is it possible to write text in 3D plots? (And newbie questions on 3d graphics)

I'm making my first steps in 3D graphics in LaTeX. What I got so far is this image In the backgorund one can sense a small D_g; the blue domain should be denoted with that. The red surface should ...
1
vote
1answer
371 views

How to extract/convert tikz to a format suitable for powerpoint

I am trying to extract/convert a tikzpicture to a format that is suitable for powerpoint without losing quality. The code that I have found and adjusted is the following: ...