{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

6
votes
2answers
746 views

pgfplots exponent in ylabel instead of yticklabel

I know there are already a lot of questions answered about the exponents of the ticklabels and how to get rid of them, but in my extensive search I was not able to find an answer to my specific ...
7
votes
1answer
2k views

pgfplots axis enlargelimits [duplicate]

Possible Duplicate: Image with axis I want to place an image against the edge of an axis frame, but because of the (unknown to me) value of the enlarged limits, I can't find the coordinates ...
8
votes
1answer
363 views

Get the number of columns of a table

Consider the following plots \documentclass{article} \usepackage{pgfplots} \begin{document} \pgfplotstableread{ 1 3 6 4 2 2 5 2 3 4 4 1 4 5 2 3 }\table \begin{tikzpicture} \begin{axis} ...
8
votes
1answer
248 views

Usings tikz, how can I specify a coordinate with the x value from the coordinate in one system and the y value from the coordinate in another system?

Usually, I would use (a, b |- c, d) to get the coordinate (a, d). But what do I do when (a, b) and (c, d) are in different coordinate systems? In particular, my first coordinate is (axis cs:a, b) ...
6
votes
1answer
460 views

Command to set cycle list position?

Is there a command to (re)set the starting point of a cycle list? What I am using now is the cycle list shift command but I end up doing some time consuming calculations and my code is oftenless ...
4
votes
1answer
900 views

Control output grid with in pgfplots while doing everything else automatically

A nice feature of pgfplots is that it automatically chooses reasonable values for maximum/minimum x and y values and for the x and y unit vectors which especially effects the grid size and the labels ...
4
votes
1answer
192 views

Subgrid with pgfplots

I know how to get a grid in pgfplots as shown below, but how can I get additionally a subgrid without labels? \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
9
votes
1answer
814 views

Meta data for marker size instead of colour

In pgfplots, is it possible to have meta data affect the size of markers instead of their colour? I am referring to the set of commands described in section 4.4.10 about scatter plots in the pgfplots ...
10
votes
2answers
2k views

Intersection of 2 surface plots in pgfplots

My question is pretty much a duplicate of this one. I'd like pgfplots to display the intersection between tho surface plots properly. Unfortunately, my function is quite different from the one in the ...
6
votes
2answers
748 views

Color gradient for bars in pgfplots

I want that each bar in my diagram has a color gradient from black to white (from left to the right). However, for the following code, the gradient exists for the entire diagram such that the left bar ...
2
votes
1answer
149 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 ...
4
votes
1answer
257 views

Relative coordinates in pgfplots across multiple table plots

This is a follow up question to this one: Use pgfplots \addplot plot coordinates with relative coordinates Is it also possible to have the relative coordinates across multiple plots? For example if ...
3
votes
1answer
1k views

Use pgfplots \addplot plot coordinates with relative coordinates

I want to use in pgfplots \addplot plot cordinates with relative coordinates. However the following syntax doesn't work: \documentclass{article} \usepackage{pgfplots} \begin{document} ...
2
votes
1answer
787 views

pgfplots: how to fix axis length?

I used ymin=0 and ymax=1000 to give axis the length I want. The problem is that if I have some "crazy" data that escape (I have to plot stable solution vs. unstable solution of my algorithm), pgfplots ...
8
votes
1answer
1k views

Using pgfplots, how do I arrange my data matrix for a surface plot so that each cell in the matrix is plotted as a square?

I have a matrix of size MxN and I want to make a surface plot directly from above so that each cell in the matrix is drawn as a square. None of the pgfplots shaders really do what I want, since they ...
5
votes
1answer
454 views

How can I make logarithmic axes through the origin?

I have this graph: The x-axis looks like it should look like: arrow head at its end label near the arrow head it goes through the origin But the y-axis does strange things: It does not go ...
8
votes
1answer
452 views

Annotating family of curves in `pgfplot`

I am using pgfplot to generate a family of curves. I would like to annotate each curve with the appropriate parameter as specified by foreach variable (in this case temperatureRatio). However I get an ...
11
votes
1answer
365 views

Place point on helix

Pasted below is a helix created with PGFPlots package and now I need to add points to a helix. What I was able to get so far is pasted below. I also included a figure depicting desired output I ...
5
votes
1answer
307 views

Use macro to draw inside pgfplot/axis

I would like to implement a gantt chart function inside pgfplots. To draw the tasks, I have a macro that calculates the start and finish time of a task. However, when I use multiple tasks, the values ...
4
votes
1answer
945 views

pgfplot annotation spacing and arrow length

I am trying to make the following figure using pgfplots. \documentclass{article} \usepackage{pgfplots} \pgfplotsset{width=8cm,compat=1.5.1} \usetikzlibrary{decorations.markings} % Arrows ...
2
votes
1answer
440 views

Error when using pgfplots and beamerposter

I'm trying to create a poster presentation using beamerposter, and it refuses to compile when I insert my pgfplots plot. I get the following error message ! TeX capacity exceeded, sorry [input stack ...
5
votes
3answers
192 views

pgfplotsinvokeforeach is invoked only twice

I would like to plot the family of curves with equation xy=c for several values of c. I also want each curve to be labeled with the value of c it corresponds to. Here is my MWE: ...
9
votes
2answers
1k views

How can I plot sin(1/x) with a logarithmic x-axis?

I would like to plot the function f(x) = sin(1/x) and it should look like this. I get this so far: You might notice, that my image doesn't look as good as the linked one because of the axis. How ...
12
votes
1answer
4k views

How to change label and ticks of a pgfplots colorbar?

I have a 3d plot with colored surface and a colorbar made with pgfplots. My probably related questions are: How can I set the label of the colorbar? What are the equivalents of zticks (positions of ...
3
votes
1answer
781 views

Properly squish a pgfplot bar chart

I am trying to make a bar chart with the following lengthy data: Character X-Position Probability space 1 0.18211 e 2 0.10083 t 3 0.07298 h 4 0.06721 a 5 0.05862 o 6 ...
3
votes
1answer
390 views

Use symbols with \label and \ref in custom legend

I would like to build a legend entry that refers to two simultaneous plots, because it is more intuitive to do so. I use \label and \ref to refer to the plot symbols, but they are shifted in the ...
8
votes
1answer
602 views

Problem: tikz, pgfplots and external coordinates using overlay

I need to draw arrows from text to a pgfplots graph using TikZ. For some reason, the arrow coordinates are not where I want them to be in the pgfplots graph. Here is an example: ...
10
votes
4answers
1k views

Plot inverse function in pgfplots

pgfplots is not quite comfortable plotting sqrt(x) near x=0. The graphic can be improved by setting samples=2000 (not less), but this seems overkill to me. Is there a way to plot x as a function of ...
9
votes
1answer
780 views

How can I add space between two separate plots, using pgfplots?

I currently have the following: Now as you can probably imagine I do not want this. I want the upper right plot to be aligned with the lower right plot. However when I do this, using the at and ...
16
votes
2answers
5k views

pgfplot: plotting a large dataset

I try to plot a dataset which is large using pgfplots. Since I'm aware of problems with large files, I used the external mode. I additionally increased main_memory from 3000000 to 6000000. It crashes ...
8
votes
1answer
2k views

tikz: plotting a one column file [closed]

I use tikz/pgf to plot plots with data from a file. This works perfectly fine if I have at least to columns in the file that I can choose from. However, I have a rather huge file with just one column. ...
8
votes
1answer
754 views

Two level labels in bar plot

I need to group the labels in the x axis by putting a second level label. I need to separate the nodes that are grouped from the other ones or marked them somehow. For example, if I have the labels ...
10
votes
1answer
2k views

Placement of scale tick labels in pgfplots

When i use scale ticks in my plots i can't get those multiplicators to move anywhere. So basically i use plots like: \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \begin{document} ...
1
vote
1answer
1k views

Bold Y-Tick Label and Every Node Near Coord

I can make my xticklabel apply \bfseries, I can make my xlabel and ylabel apply \bfseries. For some reason, I cannot seem to get my yticklabel to apply this effect. At least when I compare the "1" ...
0
votes
0answers
57 views

Pgfplot with two ordinates y tick base position [duplicate]

Possible Duplicate: position of axis multiplier and one other I have a plot with two ordinates. The tick base for the "right" y-axis is "10^-3". However, the "*10^-3" is placed on the left ...
3
votes
0answers
1k views

Set ticks precision with pgfplotsset [closed]

First, this forum has been a great resource for me for some time now. I recently started using pgfplots and tikz, so some things I still need to figure out. I hope my question will be clear and the ...
2
votes
2answers
1k views

Using pgfplots, is there a way to overlay multiple stacked plots with different ranges?

I am using the accepted answer to the question “Is there an easy way of using line thickness as an error indicator in a plot?” to draw error bands around my regular line plots. However, I find myself ...
11
votes
1answer
551 views

Is there a workaround against loss of precision in pgfplots axis?

I am generating a bunch of plots automatically using pgfplots. For some datasets the span of data in one axis (y) is relatively small (relative to the absolute value) and therefore pgfplots when ...
5
votes
1answer
1k views

Pgfplot barplot with cluster of stackedbars

How can I create a pgfplot that have two stacked ybar for each "point in x axis" ? I wan't something like this: I already have a graph that have one stacked bar for each x point. Some hint on how ...
2
votes
1answer
541 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} ...
1
vote
0answers
51 views

pgfplots: function with a filled confidence band [duplicate]

Possible Duplicate: Is there an easy way of using line thickness as error indicator in a plot? How can I plot a function with a filled confidence band using pgfplots? I have table data in ...
3
votes
0answers
93 views

width=\textwidth yet plots overlaps with margin [duplicate]

Possible Duplicate: pgfplots: how can I scale to text width? Without using such command as trim axis=left or scale only axis, I would expect the following plots to be contained in the text ...
6
votes
1answer
1k views

Manually add legend symbols in text (without \label and \ref)

I would like to add legend symbols from pgfplots in my text. I am aware of the possibility to use the \label and \ref commands but my setup is complicated and I fear that making it work will more time ...
1
vote
1answer
349 views

Vertically aligned legend to PGFPlots subplots

What I want to do is to have 3 PGFPlots subplots and the legend arranged in four equally sized boxes. However, when I use the following code, in the output the legend is not vertically aligned with ...
5
votes
1answer
1k views

Create custom colored PGFPlots ybar with consistent spacing

I am trying to create a ybar graph that has consistent spacing between a set of columns. I have obtained the color scheme I need in the following example, based off guidance from this question on ...
8
votes
1answer
789 views

Custom legend for intensity plot

I created an intensity-plot (x and y axes are positions, the color of the point gives the intensity) in an external program (igor pro) and included the "bare" plot via the \addplot graphics command ...
8
votes
3answers
1k views

Improved Unit Circle Animation

I'm trying to improve the sine/cosine animation provided on texample.net to suite my needs. I wanted to add a plot of the sine and cosine part and tried using pgfplots for this, as it can evaluate and ...
8
votes
1answer
3k views

Disable scientific notation for Y-axis and data in pgfplots?

I've been trying to figure out how to change the chart from scientific notation to just show the 5 digit numbers. I've tried scale and scale ticks with not success. How can I change the y-axis and ...
1
vote
1answer
385 views

pgf stacked bar graph with line plot

I want to draw a stacked bar graph plot with one parameter as a line plot. Here is my code below - \begin{tikzpicture} \pgfplotstableread{Figures/measurements.dat} \datatable ...
2
votes
1answer
524 views

pgfplots: x-axes do not align due to different labels

This is my first post, so I hope I do everything right :) I have the following problem: Using pgfplots I create two graphs next to each other which have identical y-axes, but different x-axes. I want ...