{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
31 views

x axis domain/range in a plot [duplicate]

Please consider the following code of a plot and its result. What I want to be shown in the plot is the actual values of the x axis i.e 1000, 5000, 10000 and not 0.1*10^4, 0.5*10^4 , 1*10^4 to be ...
4
votes
1answer
148 views

Enlarge graphic axis

I have a function ploted with pgfplots: \documentclass{standalone} \usepackage{pgfplots} \usepackage{helvet} \usepackage{sansmath} \begin{document} \begin{tikzpicture} \begin{axis}[ xlabel=$X$, ...
6
votes
1answer
259 views

tikzpictures inside pgfplots' axis

When having a tikzpicture inside pgfplots's axis environment strange effects can be observed which I guess stem from the fact that the corresponding coordinate systems are interfering with each other: ...
5
votes
1answer
211 views

Different marker at specific intervals using pgfplots

I have a number of large data files with x rows in the range of 0 to z. Is there an easy way to set a different marker at specific intervals using pgfplots/TikZ? How can I produce a figure such that ...
10
votes
1answer
160 views

Labelling (pinning) points in a plot automatically

I have a scatter plot that I am generating based on some data stored in comma-separated format. I need to add a label to each point: this information is available as part of the .csv file as it's used ...
5
votes
1answer
121 views

Alter font used for every pin in a plot

In some scatter plots I'm producing, I want to label each point using a pin. I achieve that by adding \node elements after the \addplot but within the axis environment, and using the pin property: ...
4
votes
1answer
193 views

Add a gaussian curve in a specific location in a tikz diagram

I'd like to put a gaussian curve in a specific location in a diagram I am creating with tikz. I found the question Bell Curve/Gaussian Function in TikZ/PGF, and I can use this to add the gaussian ...
1
vote
1answer
131 views

Adding horizontal space between plots in pgfplot

I couldn't find any solution for adding horizontal space between two plots in pgfplots. The xshift thing didn't help. Here's the code: \documentclass{sigplanconf} \usepackage{pgfplots} ...
6
votes
0answers
58 views

Why importing pgfplots changes behavior of \vfill? [duplicate]

When I import pgfplots, it affects behavior of \vfill. The following code works as expected: This should be at the top of the page. \vfill This should be at the bottom of the page. \eject \end ...
5
votes
3answers
255 views

Aligning plots in pgfplot

I've read both this Plot alignment using groupplot in pgfplots and this Using pgfplots, add vertical/horizontal spacing between plots? and neither helped me. I'm trying to align horizontally plots in ...
4
votes
0answers
209 views

legend problem in highlighting a data plot

I followed the tips on highlighting in data plots at http://www.howtotex.com/tips-tricks/highlighting-in-tikz-plots/ The highlighting does not work well with \addlegendentry. A MWE is shown below. ...
6
votes
1answer
2k views

\addplot and \draw

I generated some pgf/tikz code with Geogebra with good result \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm] \draw[->,color=black] (-6.72,0) -- (7.8,0); ...
3
votes
1answer
502 views

Bar chart - Single colored bar

For the bar chart proposed, I would like to use different color for each single bar. How can I do this? \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
2
votes
0answers
37 views

pgfPlots color plots [duplicate]

So I would like to present data using a color plot subdivided into squares. For a large data set, it is easy to use a 3D plot with surf, however when there is not so much information, this does not ...
5
votes
1answer
145 views

Ticks misaligned in ternary plot

I am using TikZ for ternary plots and have problems with a misalignment of ticks after changing the axis range. An example is given below where ymax is set to 0.8 but actually seem to get a maximum ...
2
votes
1answer
560 views

Axis font size in pgf plots when using a large set of data

I am trying to plot a large set of data from a .dat file. The following is my code. I can plot the data using this code. But, I am not able to increase the size of the fonts used in the axis labels ...
9
votes
2answers
303 views

Customizing unit display position

How can I adjust the placement of y unit with pgfplots? I'm trying to put it near the top-left corner of the graph box. However, there may (but does not have to) be a scientific multiplier. As shown ...
7
votes
1answer
124 views

Labeling the center of a closedcycle area

I have this figure: \documentclass[border=2pt]{standalone} \usepackage{pgfplots} \usepackage{kpfonts} \newcommand{\func}{ .00038*(x+8)*(x+6)*(x+3)*(x-1)*(x-6)*(x-8) } \pgfplotsset{ every x tick ...
2
votes
1answer
172 views

Pgf plots and a tabular legend

I have a plot where I want to add a legend which is the combination of lines and marks. For that I want to replace (or define a new) the original pgf plots legend type. As said before, in the ...
4
votes
1answer
143 views

Legend on second frame has only one entry, labeled wrong

Using pgfplots in beamer with \only frames, the legend for the second frame (only) inexplicably shows only one entry, with the color of the last \addlegendentry, but the legend of the first. The other ...
31
votes
3answers
1k views

Replicate the Fourier transform time-frequency domains correspondence illustration using TikZ

The following time-frequency correspondence illustration is in the wikipedia entry of the Fourier transform. Also a gif animation version (if the animation doesn't show, please open the following ...
1
vote
0answers
127 views

pgfplotsforeachungrouped in groupplot

I want to create a grid of plots with groupplots, where every plot is taken from an external file and included via pgfplots. Due to the fact, that foreach doesn't work nicely in a axis environment, ...
3
votes
2answers
161 views

Set the axis range according to the data range, that is, no scales for axis

I use the matlab2tikz package to creat surface in LaTex editor, but it display ugly unlike the Fig. created in the Matlab. Can anyone help me out? Is there a way of adjusting the x,y and z axis ranges ...
9
votes
1answer
277 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
175 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
347 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
101 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
303 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
296 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
680 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
721 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 ...
5
votes
1answer
348 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
596 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
127 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
329 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 ...
1
vote
1answer
404 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
308 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
126 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 ...
6
votes
1answer
440 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
465 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
345 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
402 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. ...
5
votes
1answer
323 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 ...
13
votes
3answers
878 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
391 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
65 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
184 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
49 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
1k 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 ...
7
votes
1answer
254 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 ...