{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

12
votes
0answers
1k views

PGFplot Axis Labels Detaching From Graph

Update: Oct 11, 2012 With the current version of TeXLive 2012, this problem no longer occurs with the standalone class. However using the article class, this problem still reproducible. The MWEs ...
7
votes
0answers
219 views

Multiple axis discontinuities with pgfplots

I want to show narrow segments out of a large spectrum. Since it is one spectrum, I want to use one single plot, but hide the irrelevant parts. To make clear that I show disconnected parts, I want to ...
7
votes
0answers
351 views

pgfplots: problem with “non-smooth” intersection of two lines' ends

I have a problem like the one in this question, concerning a tikz drawing but for a pgfplots plot. I want to create a plot that has one region filled without opacity and a neighboring one filled with ...
5
votes
0answers
108 views

Adjustable absolute axis labels in pgfplots

How can I use absolutely placed y labels, but still adjust the absolute placement? In the below example, I want to be able to get the two plots to align exactly, including the y labels. If I add ...
5
votes
0answers
322 views

Trying to make an automatic histogram (in pgfplots?)

How can I convert the automatic table generated by the macro, to an automatic histogram? Is the best way do it using pgfplots? \documentclass{article} \RequirePackage{ifthen} ...
5
votes
0answers
210 views

Switching math fonts and back to normal fails in figures?

For my current document I want to use a normal serif font for the main text. Most diagrams from other sources and myself are with sans serif fonts (TeX Gyre Heros). Now I want to use pgfplots to ...
4
votes
0answers
90 views

pgfplots: Aligning multiple bars and marks horizontally along symbolic X-axis

I want to plot average values of some measure as bar charts with error bars and its maximal values as marks above the bars. I use two separate plots for that now. The problem is aligning marks with ...
4
votes
0answers
84 views

Time plot with pgfplots

I tried to plot this type of data x y 00:00 99.42 00:15 99.44 00:30 99.41 00:45 99.37 01:00 99.00 01:15 99.29 01:30 99.51 01:45 99.58 02:00 99.49 02:15 99.50 ...
4
votes
0answers
251 views

Decorate pgfplots mesh

In my quest to solve this question I'm trying to see if I can decorate a mesh-plot by drawing many circles or maybe rectangles with a radius determined by \pgfplotspointmetatransformed. But I can't ...
3
votes
0answers
138 views

Adding a normal vector to a curved mesh area

How can I put a normal vector on the outer blue mesh? TeXample \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{positioning} \usepackage{amsmath} \usetikzlibrary{arrows} ...
3
votes
0answers
56 views

pgfplots: changing line axis and plotting lines width

I have some problems with the width of the lines in my graph. When I try to change the width of the plot lines, straight lines remain in the default width whereas the non-straight lines are shown in ...
3
votes
0answers
58 views

How to use only mathematical input in the first column with pgfplotstable

I can use a mix of text and mathematical input in the first column of a table generated with pgfplots with no problem, and also mathematical input in, e.g. the last column, as this mwe shows: ...
3
votes
0answers
52 views

Dissapearing plot (All values has been filtered away)

I am trying to get the following plot to work \documentclass[a4paper,10pt]{standalone} \usepackage{pgfplots,tikz} \pgfplotsset{compat=1.6} \begin{document} \begin{tikzpicture} \begin{semilogyaxis}[% ...
3
votes
0answers
85 views

How to autoscale a horizontal barchart (pgfplots)

I need to export statistics from a database into PDF files, with a program. The database contains several tests and they need to be displayed as barcharts. Here is an example: The problem is clear: ...
3
votes
0answers
91 views

Scale markers in external Tikz file

I use external .tikz files to include graphics in my LaTeX document. These .tikz files are generated by matlab2tikz. The scatter plots that come out though have very small markers. I want to scale ...
3
votes
0answers
213 views

pgfplots - how to create a horizontal line plot in a bar chart with symbolic x axis labels

I was wondering if there was a way to get the line plots "Unseamed" and "Requirement" to span the whole width of the graph not just from the centre points of the first and last x axis labels. Is there ...
3
votes
0answers
138 views

Resizing pgf plots in an A0 beamer poster

I am creating a A0 scientific poster with the beamerposter package and I want to include TikZ/PGF plots. However, if I typeset these plots, the line width for the axis and for the data are too small. ...
3
votes
0answers
161 views

Matlab2tikz adds extra legend entries

The legend from a boxplot figure is not being created properly. I get this: Instead of thiS: But really only need 2 legend entries. Any Ideas why all the objects in this plot are being given ...
3
votes
0answers
136 views

Naming 3D axes in pgfplots

I want to label the axes in a 3D plot with pgfplots. Using the anchors .right of origin and .above origin, I can label the axes as "x" and "y" in 2D with ease. In 3D, the labels must be tweaked to ...
3
votes
0answers
237 views

Tikz bar plot problem: Missing number, treated as zero \end

I have been trying to plot the figure: by using TikZ. However, the code does not compile and I get many errors on line 48, which is \end{axis}, as follows: Dimension too large Missing number, ...
3
votes
0answers
252 views

Bode plot : any good alternative to bodegraph

I'm wondering if there is any alternative to "bodegraph" for plotting bode graph with latex. Especially I would ideally be looking for something easy to run (avoid external computation like with ...
3
votes
0answers
80 views

How can I adjust the width of legend images in PGFPlots?

I am using pgfplots to create charts. How can I adjust the width of images of legend entries? I have adjusted plot coordinates in legend image code in the line legend style, but this not worked ...
3
votes
0answers
126 views

I need to provide a duotone pdf, what do I need to do with my figures?

I need to provide a duotone pdf (say black and cyan). My figures are made with tikz, pgfplots and asymptote (3D but no prc), some with opacity effects. I compile with pdftex and luatex. What do I ...
3
votes
0answers
226 views

How to add axes in a magnified part of a graph using spy?

My problem is the following. I would like to draw the (magnified) axes on the magnified area of spy. For instance, take the following example (from pgfplots.pdf, p.121): % Preamble: ...
2
votes
0answers
40 views

Compile time optimized “area under analytical curve” plotting with pgfplots?

There are some question regarding how to plot an area under a curve with pgfplots. But as far as I can see, all the answers have in common that a function has to be plotted twice with different style ...
2
votes
0answers
61 views

Using pgfplots and gnuplot and compiling with output-directory

I would like to use the pgfplots package along with gnuplot. However, I cannot get this to work if I compile using the -output-directory option. For example, if I have the following MWE: ...
2
votes
0answers
79 views

Pgfplots: How to make the plot exceed the axes

I am plotting a spike using pgfplots. I want to make the y-axis until (4) only. However I want the plot of the spike itself to continue beyond the y-axis (say until 10). Is there a possible way to do ...
2
votes
0answers
92 views

Stacked bargraph nodes near coords too bunched up vertically tikz

How do I center the coordinates in their bars vertically? This shows horizontally in ybar \documentclass[tikz,border=12pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} ...
2
votes
0answers
132 views

How do I replace an XYZ coordinate system on an already available plot?

I have an eps file looking like this: I have no access to the original dataset, so replotting it is not an option. I would like to replace the ugly 80s style coordinate system (Both the captions ...
2
votes
0answers
159 views

How legend-entry can be possible in Tikz

I want to use legend-entry for straight line & dotted line. \begin{figure}[htp] {\small \centering \begin{tikzpicture} \draw [color=black, fill=gray!50] ( 0.2 , 1.975 )-- ( 0.3 , 2.05 )-- ( 0.4 ...
2
votes
0answers
112 views

Contour plot: ignored columns, wrong color-assignment, 1D-interpolation

This forum has often been of a great help for me, but i never posted myself. So please excuse me, if i won't stick to every formality here perfectly. I will do my best. I hope it's ok that i have 3 ...
2
votes
0answers
141 views

elementwise division of two columns loaded from different files

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) ...
2
votes
0answers
286 views

axis discontinuity in bar chart

pgfplot provides the possibility to insert a discontinuity on the axes (see MWE 1 & first srceenshot). However, it seems as this discontinuity is only applicable from the value 0 to ymin/xmin. I ...
2
votes
0answers
130 views

Relative coordinates in pgfplots across multiple table plots

This is a follow up question to this one: Use pgfplots \addplot plot coordinates with relative coordinates Is it also possible to have the relative coordinates across multiple plots? For example if ...
1
vote
0answers
71 views

Plotting a histogram from a dat file using pgfplot

I want to create a histogram from a dat file with two columns, error and frequency. It also has a large amount of bins, 501. I have followed instructions provided elsewhere on this site but the data ...
1
vote
0answers
32 views

A workaround for visualization depends on and ybar stacked

Are there any workarounds for the bug? The "visualization depends on" function causes an error with stacked plots. With "ybar stacked", the minimal example generates the error message ...
1
vote
0answers
53 views

local extrema pgfplots - smooth

Is it possible to change this code for a "smooth" plot? How can I automatically mark local extrema with pgfplots and scatter? MWE \documentclass{scrartcl} \usepackage[utf8]{inputenc} ...
1
vote
0answers
63 views

Issue with PGFPlots text

I'm trying to generate some plots using TikZ, with the following code: It's not about babel, fontenc, or inputenc; I've tried removing them to no avail. \documentclass[a4paper]{article} ...
1
vote
0answers
97 views

Pgfplot figure off-center because of axis label

My figures are always off-center because the right axis is trimmed closer to the figure than the left. Do I have to manually extend the right axis by an adhoc amount every time? ...
1
vote
0answers
19 views

How can I prevent a node from being cropped in an axis environment?

I would like to put labels on the left side of a y-axis, but the text gets cropped. How can I prevent this? (Also, the entries are looking awful, so any ideas how to make it looking better are ...
1
vote
0answers
39 views

Node only partially rendered near edge of plot

I'm trying to draw a relatively simple chart of a number line, and when one of the nodes is too close to the edge of the plot, it gets cut off. The code: \documentclass{article} \usepackage{natbib} ...
1
vote
0answers
97 views

How to remove the frame of a plot in tikz but keep the axes?

I want to have a plot in tikz, with the horizantal an vertical directed axes, without numbering and without frame. Right now my code is as follows: \documentclass{article} ...
1
vote
0answers
49 views

Import external eps into pgfplot

I have some flow image files in .eps format which I would like to import in pgfplots. What is the practical way to do so?
1
vote
0answers
68 views

standalone pgfplot with extra include in subdirectory -> no output

I am trying to generate a pgfplot with data in a textfile as a standalone document. I am using the 1.2 version of standalone from https://bitbucket.org/martin_scharrer/standalone/downloads because it ...
1
vote
0answers
164 views

pgfplots: fill the volume under a 3d surface

I have a very simple 3d graph. \begin{tikzpicture} \begin{axis}[view={60}{20}, %axis equal image=true, xlabel=$X(T)$, ylabel={$D(T)$}, zlabel={$V(T)$}, zmin=0 ] \addplot3[surf,shader=flat,z ...
1
vote
0answers
89 views

pgfplots: work on single points in different files

I have a file containing a lots of data: time, position (3 coordinates), velocity (3 coordinates) and energy. I want to pick only the coordinates at t=50 (50th column of the table) and calculate the ...
1
vote
0answers
232 views

How can I display negative error bars in a logarithmic plot using pgfplots?

I have error bars representing 95% confidence intervals in a logarithmic plot. Some of the error bars extend to negative numbers for which the logarithm is undefined, so pgfplots simply drops the bar ...
1
vote
0answers
207 views

Nested axis: several concatenated axis with different ticks

I'm trying to convert a so called "dotplot" into latex. This plots are used in biology to compare sequences. Each axis represents a sequence and the coordinates of a dot are the actual X and Y ...
0
votes
0answers
34 views

Trouble with each nth point {integer}

I am trying to plot a big size vectors using pgfplots but I always I get the following: Package pgfkeys Error: I do not know the key '/tikz/each nth point' and I am going to ignore it.... Is ...
0
votes
0answers
32 views

Group labels in pgfplots or finding cm fonts for windows

I'd like to put a second xlabel on a grouped bar graph using TiKz but can't seem to work it out. So I have found this cm superfonts package: http://ctan.org/pkg/cm-super. Or I can download cm fonts ...

1 2