{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

1
vote
0answers
161 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 ...
12
votes
1answer
796 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 ...
0
votes
1answer
1k views

Labeling the axes of my plot

I would like to add a label to the axes of my plot. This is my code: \begin{figure}[!h] \centering \begin{tikzpicture}[scale=1] \begin{axis}[% % Lengend position legend pos = outer ...
13
votes
2answers
3k views

Using a pgfplots-style legend in a plain-old tikzpicture

I am using a plain-old tikzpicture to produce a pie-chart-like plot. Now, all other plots in my paper are handled using pgfplots (which doesn't do pie charts) and have their legend typeset by ...
0
votes
0answers
49 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)
14
votes
3answers
3k views

\pgfmathsetmacro - dimension too large (biggest value allowed?)

I want to import some data with parameters to parametrize some plots. After importing a table, I assign specific variables of the table to a placeholder by using \pgfplotstablegetelem. And it works ...
5
votes
1answer
522 views

How to make a single barplot with different yticks, ytick labels and ylabel on its left and right side?

I have earlier asked two questions here related to barplots and labels/ticks for double y-axes: (1) How to make an xbar plot, with pgfplots, having different y tick labels on the left and right side y ...
4
votes
1answer
680 views

How to shift error bars along with data bars?

I am trying to create a figure with two bar graphs with bars grouped two by two. I use bar width and bar shift to separate the bars. My problem is that I want to add error bars to these plots but I do ...
2
votes
1answer
555 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 ...
5
votes
2answers
2k views

How can I change format of number's axis on pgfplots [closed]

I want to change format of x or y number in green box of below graph .
8
votes
3answers
2k views

How can I change place of y label on pgfplots?

I want to change place of ylabel near the axes.
2
votes
1answer
392 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
62 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 ...
13
votes
2answers
502 views

Better way of embedding OpenOffice plots into LaTeX?

Right now, I create plots in the spreadsheet, copy them to OpenOffice Draw, save as images, and then put them (as images) into my .tex file. But that leads to problems with resolution (labels too ...
3
votes
1answer
144 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} {<...>} ...
2
votes
2answers
526 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] ...
37
votes
1answer
2k views

Plotting several 2d functions in a 3d graph

I am trying to reproduce a similar figure to the following one. My first guess was to use pgfplots but I didn't find any example that I could use as a starting point. At the moment I am unsure if ...
9
votes
1answer
786 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 ...
8
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 ...
4
votes
1answer
317 views

Trouble typesetting pgfplots with context (mkiv)

I'm trying to typeset the minimal pgfplots example from the Context Wiki but with no success. Context-Wiki Example \setupcolors[state=start] \usemodule[tikz] \usemodule[pgfplots] \starttext ...
8
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 ...
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 ...
45
votes
4answers
6k views

3-dimensional histogram in pgfplots

I have a simple 3d histogram which I want to import into pgfplots, e.g. using matlab2tikz or by hand. PGFplots does not offer 3d histograms. Is there an easy way to do this?
17
votes
1answer
1k views

Intersection of two surfaces

I'm trying to create a signed distance function S(x), where I want to intersect S(x) = 0 with a plane. The problem is not to get the two functions into a plot, but to get the two functions to visual ...
6
votes
1answer
921 views

How to make a pgfplots stacked xbar plot with bar-“explicit meta” labels computed from input table data

I am making a pgfplots stacked xbar plot where each bar has a distinct label, in addition to a numeric bar length. Each pair of bars also has a common label. I would like to mark each bar with its ...
8
votes
1answer
782 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 ...
6
votes
2answers
439 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: ...
6
votes
2answers
759 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
751 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, ...
5
votes
1answer
533 views

“nodes near coords” shows y value instead of x

I am pretty new to LaTeX and have the following problem. From the pgfplots manual I found the example: % Preamble: \pgfplotsset{width=7cm,compat=1.5.1} \begin{tikzpicture} \begin{axis}[ ...
5
votes
1answer
395 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 ...
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 ...
8
votes
1answer
221 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 ...
4
votes
2answers
783 views

Alignment of colorbar with colorbar to name

I am trying to make a group of plots with groupplots sharing the same colorbar and the same y axis. An example: \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{groupplots} ...
4
votes
1answer
2k 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
350 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: ...
6
votes
1answer
656 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
3answers
862 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} ...
11
votes
2answers
1k 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}, ...
4
votes
1answer
768 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
2answers
2k views

Changing arrowheads size in pgfplots axes

I need to change the default axes arrowheads size of pgfplots when using the option axis lines=center. Following this answer, I tried this code: \documentclass{standalone} \usepackage{pgfplots} ...
13
votes
1answer
894 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
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

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 ...
5
votes
1answer
348 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 ...
1
vote
1answer
255 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 ...
8
votes
1answer
530 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
7k 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 ...