{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

10
votes
1answer
2k views

How can I mix an “ybar” and an “ybar stacked” with pgfplots?

I tried a while to create that kind of chart with ybar but it's a mix between "ybar stacked" and "ybar". How can I do that? I tried this way but with no great results: \begin{tikzpicture} ...
1
vote
0answers
172 views

Make the boundary of markers more apparent in pgfplots? [closed]

I use pgfplots to draw a black-white array resembling imshow() in MATLAB. I use the following code (from Plot a matrix of real values with TikZ/PGF like imshow in matlab ) to do it ...
13
votes
1answer
1k views

How can I automatically mark local extrema with pgfplots and scatter?

I am trying to have TikZ automatically mark a local maximum in a fourth-degree polynomial I built using a curve-fitting tool. I am new to LaTeX and TikZ, and am a bit overwhelmed - there seem to be a ...
12
votes
2answers
2k views

pgfplots: mark max/min value of a function

How can I mark the maximum or minimum value of a function like x^2 in pgfplots? \begin{tikzpicture} \begin{axis} \addplot+[mark=none] plot {x^2}; \end{axis} \end{tikzpicture}
2
votes
1answer
689 views

Legend with Markers for Mesh Plot

I use a mesh plot with scatter points (2d) where the colors are determined from a third coordinate of the data as described in this question. The legend however should contain the markers of a curve ...
0
votes
0answers
50 views

How can I divide a legend to second part? [duplicate]

Possible Duplicate: multiple legends in pgfplot I want to divide a legend to several (two) part?(like below figure)
10
votes
1answer
2k views

Is it possible to “transform” a histogram into a density plot in pgfplots?

I just figured out that there is the pgfplots package with the hist feature, that allows to "draw" histograms based on an external data table. What I'm looking for is a possibility to transform a ...
1
vote
1answer
286 views

Using pgfplot externalize with .eps output in letter 10cm*10cm

Using pgfplots, externalize an .avi file and using DVI>ps, externalize an .eps file on A4 but I want a figure with width and height of 10cm in letter (10cm x 10cm). How can I make it? (If you ...
2
votes
1answer
780 views

conditional inside a pgfplotsinvokeforeach loop

I'm using \pgfplotsinvokeforeach to do mathematical computations inside the \addplot options. Now I need a conditional to decide whether to plot a line or not depending on the current index of the ...
2
votes
1answer
484 views

How can automatically determine min and max on pgfplots?

I want to delete empty space around graph automatically.my external picture is below graph without green box. I want delete this empty space green box automatically not by using xmax and xmin.
2
votes
0answers
64 views

Clash between tikz externalization and references to plots [duplicate]

Possible Duplicate: pgfplots: externalization and legend referencing I am trying to implement references to plots using there legend image with pgfplots. I use the example on page 164 of ...
2
votes
1answer
2k views

pgfplots: I do not know the key '/tikz/nodes near coords' error [closed]

I'm trying to create a simple plot using pgfplots. I have a problem though that drives me crazy. I'm working on a debian installation and had installed the tex-live version from the repositories. The ...
3
votes
1answer
187 views

pass a set of numbers to pgfplotsinvokeforeach <list>

Is it possible to pass a numeric set to the list argument of the \pgfplotsinvokeforeach command? I need something like this: \newcommand{\a}{1,2,...,10} \pgfplotsinvokeforeach{\a} {<...>} ...
9
votes
1answer
976 views

Use text data as mark labels in pgfplots

I have a table with numerical data and text in different columns, like this: 0 0 0.1 1 0 \pi 2 0 \frac{\pi}{2} I'd like to put text labels on a plot using the text in the third column ...
4
votes
1answer
1k views

Plots with only a few (shifted) error bars

I want to make a figure with several plots with error bars. Each curve has 1100 points. I want to draw only a few (5) error bars to increase legibility. For the same reason, I would like to have each ...
9
votes
1answer
1k views

Plots with data coming from different files

Is it possible to draw a graph with pgfplots using data from different files ? Let say I have two data files : data.dat and error.dat and would like to plot column 1 versus column 0 from data.dat and ...
9
votes
1answer
1k views

position of axis multiplier and one other

I have a question concerning the appearance of the multiplier above axis if scaled ticks = true is used. I like to have two curves in one plot. The example shows my problem. I like to have scaled ...
12
votes
2answers
5k views

Drawing curves and multiple y-axes in one plot with pgfplots

I'm aware of the possibility given by pgfplots to have two y-axes, one on the left and one on the right with two different scales. But I'd like to explore other ways to have multiple axes, e.g. ...
8
votes
1answer
924 views

Conformal mapping with pgfplots

I would like to realize the following graph with pgfplots: which represents the following conformal mapping: u=x^{1/q} v=y^{1/q} where q=2*(pi-alpha)/pi. EDIT: Here is the formula for the ...
23
votes
2answers
8k views

How to combine fill and pattern in a pgfplot bar plot?

Is it possible to combine a TikZ pattern with a background of a chosen color? \addplot[black,fill=yellow,pattern=north east lines] ... yields bars which have black stripes on white (transparent?) ...
6
votes
2answers
952 views

Insert a separate mark inside a pgfplots graph

First of all, let me apologize if the title is not enough clear, but I didn't know how to explain myself better. I have a graph consisting in three different curves that are covering almost the same ...
6
votes
4answers
913 views

Drawing a Zero Pole plot

I'm trying to draw a zero-pole plot for use with some filter design. Since i couldn't find any standard way to go about this, I tried using the polar library of PGFPlots. I'm having some trouble, ...
6
votes
1answer
2k views

How can multiple pgfplotstable columns be used in a legend?

I'd like to plot a few sets of data using the groupplots library of pgfplots. On each plot, I'd like to add a few other pieces of data that do not change from plot to plot. So I put the plot ...
6
votes
2answers
470 views

Keeping the same style inside a scaled plot

I have a graph with three different curves, two of which are very small compared to the other. I therefore decided to add a magnification of such curves inside my graph, in the following way: ...
5
votes
1answer
447 views

Hiding a part of a plot

Is there a way to hide a part of a plot, possibly by specifying the interval numerically? I have a plot with xmin, xmax, ymin and ymax defined and I need to move it from the y axis without using ...
8
votes
1answer
241 views

Translator doesn't work in external pgfplot legend

I would like to have my pgfplot legend automatically translated wrt the language used in my article. Thus, I use to use the translator package, which a very easy and pleasant solution. It works like a ...
11
votes
2answers
2k views

How to plot three-dimensional polar functions with pgfplots

I would like to plot the following functions with pgfplots: I know how they are defined: \sqrt{r}\sin\frac{\theta}{2}, \sqrt{r}\sin\frac{\theta}{2}\sin\theta, \sqrt{r}\cos\frac{\theta}{2}, ...
6
votes
1answer
747 views

Symbolic coordinates with commas

How can I use symbolic x coords={} with commas as decimal separators? For example, I need to use symbolic x coords={0,1.5,1.3}, which gives full stops as decimal separators. Using use comma does not ...
4
votes
1answer
3k views

Plot and label data from file with PGFPlots

Given some data from a file, I would like to use the first two columns as coordinates, and the second two columns as label for every point. The data is given in this form: x y ...
4
votes
1answer
359 views

Typesetting one symbolic coord differently than the others

In my plots, I have one bar (labelled dummy below) whose tick label needs to be typeset differently. Here's my current attempt (and minimal example), which doesn't quite work yet: ...
4
votes
3answers
1k views

Incorrect plot with pgfplots and gnuplot

I'm attempting to plot atanh(x) although there seems to be a giant straight line linking the top and bottom points. Am I doing something wrong? \documentclass{standalone} \usepackage{pgfplots} ...
4
votes
1answer
947 views

Style to make axis tick label opaque using “extra y tick” feature

This is a follow up to Style to make axis tick label opaque, where a suggestion was made to use the extra y ticks to specify special tick marks and use extra y tick style to apply a style to only ...
9
votes
1answer
1k views

Style to make axis tick label opaque

I would like to make a specific tick label have a white opaque fill around it, so that the a line does not cross over it. Ideally I would like to be able to specify exactly which tick, but do not ...
13
votes
1answer
1k views

3D Arrow Tips for TikZ/pgfplots

I really like the arrow tips shown in How to get rid of the viewer's (incorrect) axes in an Asymptote 3D graphics and am wondering how to produce this in pgfplots: I admit I have not tried ...
8
votes
1answer
2k views

pgfplots: Reduce number of ticks

I'm doing a histogram with a large number of bins: \pgfplotstableset{col sep=semicolon} \begin{tikzpicture} \begin{axis}[ ybar interval, ] \addplot+[hist={bins=200}] table[y index=0] ...
13
votes
1answer
1k views

How can I draw a quiver plot with varying line thickness?

This question originates in Scalar field in pgfplots . How can I draw a quiver plot in which the arrows have the same length, but their line width varies according to some scalar property of the ...
8
votes
3answers
2k views

Cut-off cone in TikZ

How would I draw the following cone using TikZ? I have no clue how to incorporate the "cut-off". I want to draw a picture of the cone given by the points (y, t) for y in R^d and t in (0, infty) such ...
5
votes
1answer
388 views

Embed text in pgfplots or tikz generated pdf files

I generate data plots in my LaTeX documentation using a combination of TikZ and pgfplots. Many of the plots are generated using script files which can also include the raw data if data is being ...
8
votes
1answer
605 views

Scalar field in pgfplots

I want to make a PGF plot which, besides normal 2D graph, includes scalar field, that is values of the 2D function in various positions of the 2D graph. Of course, I tried to do that using \foreach ...
6
votes
1answer
10k views

Reduce font size and keep label position in bar chart using PGF/TikZ

I am preparing a bar chart in PGF and it is a pleasure to work with. The only problem is that I have trouble reducing the font size used to indicate the value associated to each bar. Consider the ...
8
votes
1answer
2k views

Multi-line texts in xticklabel from a File in PGFplot

I am using LaTeX, TikZ and PGFplots to generate a bar chart, in which the xticklabel is read from testdata.dat file. In the following example, the xticklabel is a single line, i.e., Big-Bed, ...
3
votes
1answer
405 views

Using counter values as part of style name for plots

I figured I should be able to give a bunch of line styles and access them using counters. Sure enough, this works out fine; this document \documentclass{article} \usepackage{tikz,pgfplots} ...
6
votes
1answer
6k views

Adjust size and position of a PGFplots plot

I created a 2x2 array where each box contains a subfigure. For three subplots I use \addplot3 from PGFplots with colorbar and in the other, a \addplot. Due to the use of colorbar, the symmetry of the ...
5
votes
1answer
1k views

How to create the graph only once in Tikz/pgf/pgfplots

I saw Why is tikz so much slower when plotting a huge amount of data than WYSIWYG plotting tools? that pgfplots can be configured to do the plotting only once. How to do this? I have a document with ...
5
votes
1answer
674 views

Using foreach loop variable as node label in pgfplots

I have a (multi)line plot generated from a table in pgfplots: \begin{document} \begin{tikzpicture} \begin{axis} \pgfplotstableread{table.tsv}\loadedtable \foreach \metavar in {foo,bar} { ...
7
votes
2answers
8k views

y label tikz plot interferes with y axis

I'm trying to make an tikz plot from a matlab plot. The problem is that de y label is on the y axis. I used the following code: \begin{tikzpicture} \begin{axis}[% width=\figurewidth, ...
4
votes
1answer
1k views

Inserting the slope inside a log-log chart with pgfplots

I would like to insert the slope inside a log-log chart with pgfplots. I checked both the pgfplots documentation and the net, but I didn't find something helpful about this problem. Here is the MWE: ...
3
votes
1answer
2k views

Rescaling the colors in a colormap and the axes

I have cerated a file (workfile.dat) at the following format: <x1> >y1> <z> <x1> >y2> <z> <x1> >y3> <z> <x2> >y1> <z> ...
10
votes
1answer
4k views

generate a surf plot from a text file

I would like to create a surf plot (like mesh in Matlab) with a view from the top. From a bit leasing I found this way for accomplishing that: \begin{tikzpicture} \begin{axis}{view={0}{90}] ...
7
votes
1answer
1k views

Is it possible to create a table and bar chart on the fly?

I am a beginner in Latex, using it tentatively for industrial documents. I have reached a point where the anticipated benefits from using it in a Corporate environment appear to me very significant. I ...