{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

9
votes
1answer
348 views

Conditional format for correlation table

I'm using the script by Christian Feuersänger: \documentclass{standalone} \usepackage{colortbl} \usepackage{pgfplots} \usepackage{pgfplotstable} \pgfplotstableset{ /color cells/min/.initial=0, ...
3
votes
2answers
196 views

How can I find the location (coordinates) between two ticks in pgfplots?

I would like to change the behavior of pgfplots for the placement of tick scale labels and units. My desired placement would be or between the last two ticks or in place of the second last tick. For ...
5
votes
1answer
495 views

tikz/pgfplot unstacked ybar with “switched” overlay

So, i'm trying to make a nice ybar plot using pgfplot, but i have some issues i want to solve, hope you can help me. 1) the ybar are not centered on the x value as they should, i mean, the bar for x ...
3
votes
1answer
141 views

Gnuplot invisible

I'm trying to plot two implicit curves (using pgfplots and raw gnuplot) but they don't appear in the document. In gnuplot it works just fine so I guess it has something to do with pgfplots but i can't ...
3
votes
1answer
352 views

curious xticklabel style error

I'm receiving the strangest error when trying to plot a simple graph. Let me show you - this works: \documentclass{standalone} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{pgfplots} ...
4
votes
1answer
339 views

Scale Axis in PGFPlots without changing orientation

I'm trying to plot a data matrix using pgfplots and a surface plot. The method described in this question worked well for me: Using pgfplots, how do I arrange my data matrix for a surface plot so ...
8
votes
1answer
798 views

Barchart with pgfplots with data from R

It took me a while to create a nice (... to some extent) bar chart with R which represents what I need. However I noticed it doesn't look very aesthetic in my Latex document. Sweave isn't a good ...
2
votes
1answer
1k 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 ...
8
votes
1answer
464 views

dashed line in pgfplots legend results in incomplete marks

When defining the pgfplots legend entries myself, I have a problem when using dashed lines in combination with marks. The mark is also dashed (or dotted, etc.), just as the accompanying line is. Is ...
8
votes
1answer
681 views

How to project a function over a 3D plane

When I looked up the method to express two variable functions as a sequence of intersecting horizontal planes, I thought to use PGFplots to construct a simple set of "slices" of a generic function ...
3
votes
1answer
133 views

Missing pictures when using pgfplots

When preparing an article I came across with a strange problem. To draw graphs I use pgfplots. Like here: \documentclass[twoside,11pt,a4paper]{article} \usepackage{daiostyle} \usepackage[all]{xy} ...
6
votes
1answer
361 views

Axes for notched box plots from data files

I am trying to create notched box plots similar to those shown in the picture from data files. I have managed code that creates the box plots with notches like I want (the code below without the ...
2
votes
1answer
541 views

Adjusting arrow style on pgfplots axes

Using axis line=middle in pgfplots creates arrow tips on the end of the axes. How can I adjust the size, style, etc? I suppose one way would be to make axes without arrows (using axis line*=middle) ...
4
votes
1answer
404 views

pgfplots - How to use figures with commas when comma separator is defined empty?

As the MWE shows, the separator for every 1000th count was defined empty (for the lack of a better term) since the first column represents the year. So running the MWE does not work, since pgfplots ...
6
votes
1answer
150 views

Hyperref does not work for legend labels inside \subbottom

When I use Hyperref package together with memoir class, and when I put a label to a PGFPlot inside a subbottom environment, and try to reference to it, an error reported: ! File ended while scanning ...
7
votes
1answer
577 views

draw grid in pgfplots when axis line=none

I would like to have a grid in the y axis although the axis y line is not drawn, either by setting axis y line=none or hide y axis. In the MWE below the horizontal line along y=0 is not drawn when I ...
5
votes
1answer
547 views

pgfplots: Showing tick marks and labels but not axis lines

Using pgfplots, it's possible to turn on or off printing of axis lines and ticks using axis lines for all axes or axis x line (etc.) for only selected axes. However, sometimes it is desirable to print ...
5
votes
1answer
456 views

How do I set units in pgfplots without square brackets?

This MWE: \documentclass{article} % translate with >> pdflatex -shell-escape <file> % This file is an extract of the PGFPLOTS manual, copyright by Christian Feuersaenger. % % Feel free ...
4
votes
1answer
455 views

Axis labels and ticks in degree, plot in radian

I've got a plot - the x axis is in radian (from pi/2 to pi) and with gnuplot it works like a charm - the problem is - that my x-axis labeling should be in degree (-90, -75,...,90) and i'm kinda stuck. ...
6
votes
1answer
416 views

Common colorbar for groupplot

I want to group two surface plots with the groupplots library from pgfplots and place a common colorbar from the top of the first plot to the bottom of plot. At the moment (code below), both plots ...
14
votes
3answers
1k views

How to draw a irregular circle(shape)?

I want to draw some irregular circle(shape) in my wireless scenario. with a basestation in the center. around is some irregular circle(shape). I find something(could be used) in this web(but I feel ...
8
votes
1answer
498 views

pgfplots sample colors from colorbar

I would like to get the color definition from a sample of colors in a pgfplots colormap using for example the RGB model. When I choose colormap/bluered with colorbar style={samples=10} I need to have ...
3
votes
1answer
69 views

Access label, title in pgpfplots

I would like to know if is possible to access the standard nodes in pgfplots such as ylabel, xlabel, title. I am pretty sure this is quite easy, since each node should have a name by which it can be ...
4
votes
2answers
224 views

Overriding hyperref in TikZ/pgfplots

Is it possible to override the hyperref instruction of showing the references in a specific colour but only within the context of TikZ and pgfplots? The problem is that I am using legend to ref and ...
1
vote
1answer
57 views

Problem with referencing plots

I want to reference some plots (done with pgfplots) in my text but somehow it's not possible. If i copypaste the examples from the pgfplot- documentation it works but if I move one of the labels to ...
8
votes
1answer
2k views

Customizing legend in pgfplots

I am trying to customize the legend for this graph. First of all, I would like the legend width to be equal to the x-axis width. At the moment, I am setting the width of the legend via ...
8
votes
1answer
304 views

Perpendicular lines on sloped lines

I'm trying to make a diagram in TikZ which is supposed to illustrate the triangle you construct when constructing a 60 degree angle. I'm having some troubles, mainly concerning the title of the ...
4
votes
1answer
217 views

How to adjust the y-axis of pgfplots

In the right pgfplots, I hope that it could have (0, 10000,20000,30000,40000,50000)[in normal scale], rather than (1000,10000) [in log scale] now, how should I do that? This the the code ...
3
votes
1answer
388 views

Showing grid on top of plot fill with PGFplots?

I have a plot with a pass/fail metric, and wish to show this clearly by having to seperate colors in the plot. To make the data stand out, I have a background grid to the axis tick marks. However, ...
7
votes
1answer
262 views

How to scale a pgfplot in a tikzpicture correctly?

I created a figure in pgfplots and added some extra labels in a tikzfigure environment. Now it turns out I need to rescale the whole figure. Normally this can be done by adding scale=2 but here the ...
11
votes
1answer
532 views

Brownian motion with drift

I have a code for the Brownian motion and it indicates three paths which initially started at point 0. My goal is to increase the initial starting point from 0.0 to e.g. 0.6. This is achieved by ...
6
votes
1answer
91 views

Generating an xtick for maximum value

I want to find the maximum value of a plot given by a function like in How can I automatically mark local extrema with pgfplots and scatter?. Is there any way of writing the x-value on the x-acis ...
7
votes
1answer
332 views

Plotting Population Regression Function with pgfplot

I want the make the following population regression function with pgfplot. My attempted code is \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \begin{document} ...
10
votes
1answer
307 views

Compiling a tikzpicture including \ref

I've been reading and gathering material from multiple sources online about what steps are required to externalize a document that contains TikZ pictures which store a reference to their legends using ...
3
votes
1answer
540 views

Modify the legend-style in pgfplots

I have a question concerning pgfplots. I made a minimal example which is related to the example in the pgfplots manual (page 182): \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} ...
8
votes
1answer
270 views

legend placement with bounding box restrictions and externalization in pgfplots

I find it useful to add \pgfplotsset{/tikz/every picture/.append style={trim axis left,trim axis right}} to my preamble for bounding box restrictions. But then when I use the legend to name feature ...
8
votes
1answer
201 views

pgfplots: problem in the legend using custom marks

With the help of \pgfdeclareplotmark I defined a custom mark for a plot and it worked as expected; however, in the legend, the mark appears with a vertical shift. What is causing this problem and how ...
6
votes
1answer
269 views

Draw reduced graph with pgfplot

I want to reduce the information contained in a graph to the minimum. I started with a spectrum that I drew from a data file ( http://www.sendspace.com/file/wwydju ). \documentclass{standalone} ...
5
votes
1answer
243 views

Draw ticks over external plot using pgfplots

I plotted a contour/surface plot with gnuplot using set pm3d map and want to include this picture via \addplot graphics {...};. When I match the plot area of the axis environment with the plot range ...
9
votes
1answer
1k views

How to remove ticks from the top and right axes of a plot generated with PGFPlots?

I want to remove ticks from the top and right axes of the bounding box of a plot generated with pgfplots. Any help appreciated. Here is sample code which generates unwanted ticks. ...
4
votes
0answers
657 views

Tikzscale, trim axis left/right, and externalizing

tikzscale and trim axis do not play well together, with the produced figure being larger than requested because it ignores the size of the labels. I was wondering whether it is possible to use both ...
11
votes
0answers
490 views

XeLaTeX and TikZ - how do I ensure my PDFs are using the CMYK color model?

The place I want to print my document at needs the PDF to be provided in CMYK. The document is mostly text, except for a few graphs and plots which are done in TikZ or pgfplots. As suggested in this ...
9
votes
1answer
349 views

pgfplots: Tilted and Rotated sphere

I can make sphere with pgfplots through the following code. \documentclass[tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.8} \begin{document} \begin{tikzpicture} \begin{axis}[% ...
7
votes
2answers
988 views

Draw sphere pgfplots with axis at center

I want to draw a plot that illustrates the ration pattern of an isotropic antenna. I thought about pgfplots to do the job. I grabbed the code from pgfplots manual and did some changes; but it doesn't ...
1
vote
0answers
142 views

pgfplot Boxplot How to change the thickness of median [closed]

Is there a way to change the thickness of median line in box plot. I am using the code given in Pgfplot : change the distance between 2 adjacent boxes in box plot
4
votes
1answer
862 views

Declare function for tikzpicture

I'd like to declare a function that will be part of the equation that I then want to plot. The equation that I want to plot is defined as \frac{e^{-rT}N'(d_{2})}{S\sigma\sqrt{T}} The function to ...
4
votes
1answer
408 views

pgfplotstable manage strings and values

I like the pgfplotstable package for reading and plotting tables but handling of strings and values (especially when strings contain spaces) drives me crazy... I often use a table as shown here: ...
4
votes
1answer
586 views

ylabel style when axis y line=right

When I'm using axis y line=right, it appears ylabel style is not applied, as illustrated by this MWE: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.8} \begin{document} \Large ...
7
votes
1answer
293 views

Pgfplot : change the distance between 2 adjacent boxes in box plot

Hi I want to change the distance between 2 adjacent boxes in boxplot. I am using following code. What should I change in code to get it similar to as desirable diagram \begin{filecontents}{lmpqd.dat} ...
6
votes
1answer
420 views

Connecting subplots

Is there a way to draw a sort of connection between subplots in TiKz/pgfplot, like in this example? I'm looking to achieve something like this: But I would need to draw the "x 2000" line between ...