{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

5
votes
0answers
161 views

How can I create a 3D Manhattan bar chart? [duplicate]

I have some data which I would like to visualize. This data are 3-tuples of integers: (Threads,Sum,# of occurences) (1,2,20) (1,7,18) (1,100,25) (2,7,15) (4,103,24) I would like to visualize this ...
2
votes
0answers
183 views

elementwise division of two columns loaded from different files [duplicate]

My next question follows on Sum up rows from different data files where I asked how to sum up the data from different files. In this case I have e.g. two data files, consisting of m (here e.g. m=3) ...
3
votes
2answers
520 views

How to reference an axis label, e.g. xlabel

I'm new to that forum but it already helped a lot, thanks for this! But now I really got stuck. Basically I'm looking for a possiblity to reference the xlabel of an axis in a TikZ picture. The ...
6
votes
1answer
979 views

Can Pgfplots extra tick grid line be drawn behind the axis line?

In the example code below, the extra tick at x=0.45 has its gray grid line drawn over the x axis line. At other ticks there is a normal major grid line, and it is ok. I assume the extra tick is not ...
4
votes
2answers
382 views

Fix append pgfplots style to all pictures breaking plain TikZ compilation

I have the following code in my preamble to align the pgfplots in my document. \pgfplotsset{ every axis/.append style={ scale only axis }, /tikz/every picture/.append style={ ...
3
votes
1answer
238 views

Odd result in pgfplots when scale and set layers is used together

I have a problem when I use scale and set layers in pgfplots. I have to use set layers because I want that several curves in one plot are above each other (that is not really visible in my example ...
3
votes
1answer
151 views

One pgfplot per page in single PDF file

I'd like to reduce my redundancy when making plots with pgfplots. I want to have a single PDF file, such that I can include them on a per-page basis with graphicx. The multi class option for the ...
15
votes
1answer
9k views

pgfplots - number format on axis

How can I force pgfplots to draw my axis ticks labels consistently? I mean instead of 0 a 0.0, instead of 1 a 1.0 in the below image. EDIT: Code \documentclass[a4paper,10pt]{scrartcl} ...
5
votes
2answers
587 views

pgfplots xbar example fails

I have only modified the pgfplots xbar example very little and it completely fails: EDIT: Removed original example, it contained only a missing comma. And do I really need to define for every entry ...
2
votes
2answers
330 views

Ideas for drawing this plot?

I need idea for drawing the following graph. I, obviously, do not expect full code. I hope I can get an idea about the best way to plot this graph. Should I try to draw each rectangle separately? Is ...
3
votes
1answer
933 views

pgfplots - how to specify ticks?

I know how to specify ticks manually. But this is too much work if you have multiple plots. I am searching a way to do that automatically. What I want to specify is the number of ticks for an axis. Is ...
5
votes
1answer
128 views

pgfplots - close path for surrounding rectangle

is it possible to close the path from the coordinate frame in pgfplots? If I plot something, the frame rectangle of the coordinate system looks fine except the bottom left corner: the lines do not ...
6
votes
1answer
816 views

pgfplots: Set exponent of scientific number format for nodes near coords

As you can see, my plot currently has node labels with scale factors of both 10^6 and 10^5: My goal is to specify a scale factor of 10^6 for every node label: So my question is: How can I ...
3
votes
0answers
681 views

Problem with TikZ area legend [closed]

I am trying to produce an area legend like the following picture. For some reasons, the output of the following code does not produce a single box for each dataset in the legend. ...
4
votes
2answers
923 views

How can I adjust the size of my pgf plot and get rid of these colours

I am having too much trouble trying to get a nice looking plot that takes latex font with gnuplot so I am trying pgfplots again. The only trouble is that I cannot resize the plot, so that it fills ...
9
votes
2answers
2k views

Help with circle and arrows diagram with PGFPLOTS

I'm trying to make a plot similar to this one but I'm having a really hard time. If anyone can help me getting the details, I'll appreciate. I thought I couldn't post questions like this, but as ...
3
votes
1answer
658 views

pgfplots won't produce error bars

The following error is thrown when I try to compile the MWE below: Package pgfkeys Error: I do not know the key '/tikz/error' and I am going to ignore it. Perhaps you misspelled it. I'm running ...
15
votes
1answer
3k views

pgfplots: reduce tick density

I am using matlab2tikz to produce plots in latex. The default tick settings produce very dense ticks, making the axes look ugly. I know that I can use something like /pgfplots/xtick={0, 1, ... 3} ...
5
votes
1answer
731 views

How to align plot axis with different tick label widths?

I want to set tick labels of positive numbers to occupy the same space as negative numbers for alignment of 'ylabel'. I want to avoid absolute setting of location since I have other concerns not to do ...
7
votes
1answer
316 views

How to plot a graph with separate scale reference lines?

I have searched through different plots generated by pgfplots and could not find my desired style as below: I know how to hide axes, but would like to know does PGFplots have an option to ...
12
votes
1answer
3k views

What “smooth” plot interpolation algorithm does pgfplots use?

In the pgfplots manual it says: \addplot+[smooth] Smooth plots interpolate smoothly between successive points. In order to choose the right sampling of points from a function evaluation for ...
12
votes
1answer
353 views

Having tick labels like 1, 10, 10^2, 10^3,

I would like to have y tick labels like 1, 10, 10^2, 10^3, ... So far I found found to display them either 1, 10, 100, 1000, ... or with exponents. Is this possible with pgfplots?
12
votes
1answer
950 views

How to jam the axis of a pgfplots plot?

I need to have some kind of jump on the axis of the plot in pgfplots package. Something similar to the following figure where some part of the scales are jammed. It would be interesting to have ...
5
votes
1answer
868 views

how to create an histogram with a string label using pgfplots?

Dear i try to generate an histogram / barplot result.csv: overlap,hit,organism 100,274,Unknowns 100,228,Coccomyxa subellipsoidea 100,11,Eukaryota -500,153,Unknowns -500,145,Coccomyxa subellipsoidea ...
6
votes
1answer
1k views

Scaled ticks with ymin and ymax

For a publication I am preparing multiple plots with PGFPlots and would like to have them all look alike, i.e. having the same axis and identical ticks. For this I intended to use ymin and ymax, but ...
10
votes
1answer
1k views

How to have linked axes on plots?

I plot infrared spectra in many reports and I display the energy units in two ways, wavenumbers $cm^{-1}$ on the bottom x-axis and wavelength (nm) on the upper x-axis. The relationship is ...
6
votes
2answers
6k views

Proper way to change axis in plot tikz

I am trying to reconstruct the image below in tikz, and I think I have done a fairly decent job. The problem is that my code is a mess. Is there any simple clean way to produce this image? My ...
14
votes
4answers
2k views

Plotting the solution of inequalities with WolframAlpha or Maple

I want to plot the solution of two inequalities and include them in a LaTeX paper. I really like they way this looks: Wolfram Alpha. Unfortunately, I have no idea how to export this into a ...
13
votes
2answers
596 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
2k views

TikZ: bars width and size of plot

This is a followup on my previous question. I have tried to plot my data and I see the following now. Would it be possible to define the size of the area that is used for the plot? I have tried to ...
6
votes
1answer
2k views

TikZ plot: centering and units on axis

I have the following. I'm trying to center the plot and putting \begin{center} around the TikZ image does not work. Also I'm trying to change the units of the x-axis. The x-axis is used to ...
3
votes
1answer
584 views

TikZ: plot datapoints with bars

I'm currently generating data files which have points as follows 5 1 3 2 2 1.4 ... Each line 2 values of which the first is indicating the time and the second some value. I'm currently (as I'm ...
5
votes
1answer
271 views

Plot weighted frequency matrix

I wish to create this plot preferably in pgfplots or tikz. I have actually got a version plotted (with help from SO), but I have used R and exported the plot using tikzDevice. I can't post the ...
7
votes
1answer
714 views

How can I place numbers into marks of a plot?

I have the following plot with this latex-source: \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{plotmarks} %%%< \usepackage{verbatim} \usepackage[active,tightpage]{preview} ...
7
votes
2answers
651 views

Plotting a reciprocal of a sine function in tikz + pgfplots

This is my code at the moment: % Rest of document omitted brevity... \subsection*{f(x) = cosec(x)} \begin{tikzpicture} \begin{axis}[every axis plot post/.append style={ mark=none, domain=0:360, ...
5
votes
1answer
784 views

Arrow heads as plot marks

I would like to draw a plot and put arrow heads pointing in the direction of the plot instead of marks. My first idea was to use the quiver option from pgfplots by duplicating and stagering the ...
2
votes
1answer
3k views

How to draw a plot from .xls file in pgfplot?

I want to read .xls format file in pgfplot to draw a graph. I couldn't find how to do that. Is it possible to do that? I have attached a small .xls file here for which I want to compute plot. ...
6
votes
1answer
1k views

How to expand linear regression fit to the full x-axis range while using semilogyaxis

Since I was asked in another post: Trend line or line of best fit in pgfplots to ask this question explicitly, I'm now doing so: How can I expand the linear regression fit, generated with for ...
7
votes
1answer
1k views

tikzscale and histograms in pgfplots

Tikzscale is giving wrong results for histograms drawn in pgfplots. Histogram without scaling by tikzscale: Histogram after scaling: I have included a histogram from page 67 from pgfplots manual ...
5
votes
1answer
2k views

Log axis in pgfplots

When I add the log ticks with fixed point option, pgfplots ignores the x-axis range instead of just affecting the y-axis. without log ticks with fixed point with log ticks with fixed point ...
5
votes
1answer
635 views

Too many contour labels in contour plots

I am trying to create a contour plot with labels in the contour lines. The data is imported from Octave, and stored in a file called data.dat. It contains many contour lines, so that manual ...
2
votes
0answers
1k views

“Fatal error” when using TikZ externalize [closed]

So I'm having problems with TikzExternalize. I have a paper with a large amount of dynamically built graphs. I get to a certain point in my files and I can't build anymore. Once I get to this point I ...
4
votes
1answer
659 views

Multi axis plot problem with appearance

I have a problem with the appearance of a mutli axis plot... Currently I have the following: However I do not want the arrow in the right y-axis but from the documentation I read that the * in the ...
11
votes
2answers
263 views

Can I rotate a marker with a scatter source?

I'd like to be able to use pgfplots to show a skier going down a ski slope. Here is what I have done so far. \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.7} \makeatletter ...
4
votes
1answer
1k views

Trend line with pgfplots and dateplots

Is there an easy way to avoid the following pretty straightforward error message at compile time: Could not parse input '2010-01-01' as a floating point number, sorry. The unreadable part was near ...
10
votes
1answer
2k views

How to read value from table, assign to variable and use it in x expr=\thisrow{}

How can I read the first value from the first column of a table, assign it to a variable and the use it in some math expression with x expr=\thisrow{}? The code would be something like this, but in ...
3
votes
1answer
5k views

Dashed Line with marker when adding plot from table

In the pgfplot, I would like to have a line plot from a table which is read from a .csv file. I would like to have a line which is dashed and has a marker. I put the code like this - \addplot ...
13
votes
1answer
3k views

pgfplots - Placing Nodes on x Coordinates of a Plot

I want to plot some graphs in pgfplots and want to place nodes on the exact same x coordinate of the plot. The position of the note has to be set in x direction but free in y direction. Here is one ...
11
votes
2answers
513 views

Visualize data on a variable-radius graph/network

I am trying to visualize the output from a simulation model I have been working with. The simulation finds the steady-state solution to a system of differential equations on a variable-radius (and ...
3
votes
1answer
217 views

How to make the legend border tighter?

I am trying to make the legend border tighter. What is the \begin{axis}[legend style={...}] property to adjust the legend border (both width and height of the border)? \documentclass{article} ...