{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

3
votes
2answers
179 views

fontawesome scaling, deedy-resume pgfplots axis, XeTeX, LuaTeX issues

I am currently working on a document using the deedy-resume template http://www.latextemplates.com/template/deedy-resume-cv in LaTeX and I have two issues which result in a dilemma and I can't ...
3
votes
1answer
77 views

How does PGFplots calculate trig functions?

In plotting the graph from my last question I have discovered that the plots I'm getting from PGFplots are not entirely correct. I was attempting to plot (4.9/(w^2))*(cosh(w*x)-cos(w*x)) for multiple ...
3
votes
1answer
53 views

Write a value near a coordinate in a plot

I want to do it from a file, rather from inside the document like I do it now: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \begin{document} \begin{tikzpicture} ...
3
votes
1answer
57 views

PGFPlot's 'domain' argument ignored for 'table' or 'coordinates' input

Minimal example: \documentclass{minimal} \usepackage{tikz} \usepackage{pgfplots} %\pgfplotsset{compat=newest} % has no effect here \begin{document} \begin{tikzpicture} \begin{axis}[] % Does not ...
3
votes
1answer
103 views

How to have an ybar plot without frame?

I want to remove the frame around a plot, which usually works well with axis lines = left. However, something strange happens when trying this with ybar. Without axis lines=left With axis ...
3
votes
1answer
118 views

Calculate xtick positions by formula to mimic plotxx (or plotyy)

Please consider this MWE: \begin{document} \begin{tikzpicture} \begin{axis}[% /pgf/number format/1000 sep={}, % do not delimit per thousand xmin=19, xmax=22.5, xlabel={angle in ...
3
votes
1answer
62 views

Align legend label to text

I have this MWE. \documentclass{article} \usepackage{pgfplots} \usetikzlibrary{patterns} \definecolor{nrgray}{HTML}{F0F0F0} \newcommand{\graphTripleData}[4]{ \begin{tikzpicture} \begin{axis}[ ...
3
votes
1answer
42 views

Changing the properties of only one plot in a ybar

Sorry I am sure there is a simple answer to this but I just can't find it! All I am trying to do is turn off the labels (I think they are called nodes near coords) on the second set of data, ie. the ...
3
votes
1answer
222 views

Node below axis annotation in tikzpicture/pgfplots

I want below the axis annotation a node (with some text) and from this node a arrow should point to a specific point on the x-axis MWE \documentclass[paper=a4, fontsize=12pt]{scrreprt} ...
3
votes
1answer
119 views

“skip coords” and “xticklabels from file” cause wrong labels

When filtering data from a file (with skip coords between index for example) and loading the x tick labels from the same file, the x tick labels are not skipped, leading to wrong labels. As an ...
3
votes
1answer
100 views

Set PGFplots coordinate label using ifnum

I can't overcome this little nasty issue. Using \ifnum I set labels position around the coordinates in my pgfplot. This works fine but : I am only able to test if variable \coordindex is greater or ...
3
votes
2answers
187 views

Effective potential with tikz

How I can draw a perfect picture of an effective Newtonian potential? I tryed, but it is not so good as I want. \begin{tikzpicture} \begin{axis}[ xmin=0, ] \addplot[ red, smooth, domain=-5:1, ...
3
votes
1answer
161 views

Problem with plotting 3d plot in Latex, I have a sample Matlab plot

I have a Matlab plot shown below which I want to replicate in Latex. The data for Matlab is: i_whole=[ 0 0 0 0 0 3.7000 3.8000 3.8000 4.2000 3.7000 ...
3
votes
1answer
40 views

PGFplots: Tweak two plots to achieve equal heights

The heights of the plots in the following example are slightly differ. Can one get them to equal heights without \resizebox (would mess with fontsize) or setting the height in absolute quantities. ...
3
votes
1answer
141 views

Error message: Dimension too large

I am graphing the restriction of a cubic function on the domain [0, 20]. The function has a maximum value of about 3,079 at about 11.5. To get some view of it, I use the specification unit vector ...
3
votes
1answer
131 views

Custom labels for ybar plot?

I'd like to make a plot where data is arranged in bars, but each bar has a custom label if it is greater than a thousand. For instance, instead of 18,000 the label would read "18k" and for 50 million ...
3
votes
1answer
154 views

Tikz: Position dodge on the x axis?

For my 2x2 factorial data, I want to create a line plot with confidence intervals in Tikz. The x-axis ticks are supposed to have a small offset so that the confidence intervals of the two plots do not ...
3
votes
1answer
68 views

plot data with pgfplots if meta column meets criteria

I have a data file with many columns, and I want to plot bwgstar vs servers for n=2. So n is the meta column, servers is on the x-axis, and bwgstar is on the y-axis. I want to do this within the ...
3
votes
1answer
153 views

Missing something obvious with tick label styles in pgfplots [duplicate]

Why does this not produce y tick labels in fixed number format? (pgfplots version 1.9 produces y tick labels in scientific format) \documentclass[12pt]{article} \usepackage{pgfplots} ...
3
votes
1answer
267 views

Axis rotation and alignment

I have a problem to rotate an axis. Here is the code I use where the problem occurs : the two axis origins are not aligned. \documentclass[a4paper,11pt,twoside]{article} \usepackage[pdftex, active, ...
3
votes
1answer
108 views

Setting zmin/zmax in groupplot confuses colorbar creation (colorbar is 3d)

When using groupplots and setting zmin and/or zmax in the groupplot environment manually, pgfplots generates a (broken) 3d legend: I assume the issue is that groupplot passes the zmin/zmax settings ...
3
votes
1answer
241 views

two variables foreach loop problem

I want to draw a pulse train on which I write some information like the corresponding angle, etc... But I think I've got a problem with the two variables foreach loop because I can't even compile ...
3
votes
1answer
222 views

Graphing each trigonometric function and its inverse

May I have the code for graphing each trigonometric function and its inverse on the same Cartesian plane? I have the following code for only graphing the sine function, and I got the following error: ...
3
votes
1answer
127 views

Polar pgfplots diagram adds additional whitespace with units library loaded

When doing polar plots in pgfplots (v1.10) I get additional whitespace when loading the units library. How can I get rid of that? I did not observe this before since it is related to the direction of ...
3
votes
1answer
108 views

Pgfplot won't compile more than 6 curves on the same plot

I want to plot with pgfplots 12 curves on the same plot. The curves are given by 12 csv tables named "curve_01","curve_02" etc., about 3000 points each. To reduce computational time I reduce the ...
3
votes
1answer
142 views

changing the 3D tick style of pgfplots

Consider this 3D plot: \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot3[surf,domain=-4.5:4.5]{(x^2)-(y^2)}; \end{axis} ...
3
votes
1answer
128 views

Align bar charts from different sources with one xlabel each

I have a pgfplot that reads from two files. I want a bar chart where the values (bars) of one file appear over one xlabel and the values from another file over another (A and B in this example). My ...
3
votes
1answer
88 views

Problematic rendering of mark=+ in pgfplots

Consider the following MWE: \documentclass{article} \usepackage{pgfplots} \usepackage{tikz} \pgfplotsset{compat=1.5.1} \xdef\doPlotCoords{} \foreach \r in {0,1,...,10}{% \xdef\tempCoords{} % ...
3
votes
1answer
193 views

Problem when using pgfplots and pgfornament

I am trying to solve a peculiar problem, but until now no success. Here is the issue: I am writing a long document (a thesis) which consists of plots, decorations, and tables. When I plot the graph ...
3
votes
1answer
113 views

PGFplots: no mark is showing up

I have standard deviation bars but there is no symbol mark. How can I get one to appear? I took the statistical code from TikZ: How to pass a specific table to \pgfplotstableset if used for ...
3
votes
1answer
153 views

Extracted coordinates have wrong value

I am unable to get the right coordinate values for (A) and (B) in the following axis. Did I misunderstand some conversion step or is it because of the data? Picture MWE \documentclass[ a4paper ...
3
votes
1answer
843 views

Using MATLAB area() to shade graph error in matlab2tikz

I generate a graph in MATLAB and want to shade regions. So I use the area() command and set it to display in the right order. MATLAB code for the graph: hold on x = 0:1:5; y = sin(x); plot(x,y); ...
3
votes
1answer
230 views

Automatic pin position on pgfplot when using custom axis

I'm trying to put automatically label several plots. For this purpose, I just discover the pin option to add it to the plots. This solution works rather well, and semi-automatically. However, when ...
3
votes
1answer
398 views

Peculiar tikz-external, pgfplots, tikzscale combination problem

I want to use \tikzexternalize and tikzscale with pgfplots' \addplot graphics command and \clip=false option. I am using three files: A.png, A.tikz and A.tex. A.png can be any graphics file. A.tikz ...
3
votes
1answer
207 views

Draw a surface from scattered curves

I have a few curves determined by some points. I need to plot the surface that they determine. That is, I have this \begin{tikzpicture}[scale=0.8] \begin{axis}[% width=12cm,height=12cm, xmin=0, ...
3
votes
1answer
202 views

Convert PGFplot to html?

I'd like to convert a simple piece of LaTeX code which is basically some text with some centered graphs in between. This is a dummy version of the code I'd like to convert to HTML: ...
3
votes
1answer
342 views

Unable to read in text labels for pgfplots bar chart

I've started using pgfplots and can plot scatter plots where all data is numeric, but I'm having no luck at all with bar charts where the xlabel is text. I've tried to find a solution in the manual ...
3
votes
1answer
461 views

Pgfplots not plotting bar graph with all symbolic coordinates?

I am trying to create a bar graph using pgfplots. Specifically, I have 8 different bins of varying signal length against some computational time. I have set the x axis signal lengths to symbolic ...
3
votes
1answer
151 views

Place several plots on one page

I have 4 plots that should be placed on the same page. Does anyone know how to do it? I need to have a caption/title under each plot (and I cannot place it above the plot as there are numbers), a ...
3
votes
1answer
300 views

\newcommand Tikz argument problem

I have this two commands to read x from y or y from x on a plot. The problem is that the label is 180:#3 with above position instread of #3 east position. The wish (less important) : how to merge ...
3
votes
1answer
684 views

pgfplots: how to load distinct symbolic ticks/labels from file?

I want to plot a matrix of color-values from a csv file. Inspired by this website, I set out to write my MWE below, to which I added this way of dynamically loading symbolic ticks/labels from my data ...
3
votes
1answer
208 views

pgfplots: `nan` in `meta expr` causes “Missing number” error

I want to draw a table/matrix of color-values, where some of the values are missing. Despite having tried using unbounded coords=jump (see this answer), I get the following error: ! Missing number, ...
3
votes
1answer
171 views

Markers (xtick) in PGFplots with higher precision

Graphic The following MWE shows a figure with all identical axis markers (because the scale is too narrow). The option xtick has not "high enough precision". MWE Code I did not find a suiting ...
3
votes
1answer
151 views

Groupplots become misaligned with axis equal image

I have several images I want to align in a groupplot environment. All of the images have the same width, whereas the images fall into two categories when it comes to height, one with "small height" ...
3
votes
1answer
251 views

Marking (multiple) intersection points sinus function and constant function

The intersection of a sinus and a constant function, has multiple results. So my question is how to mark these points. My code \documentclass[11pt,a4paper]{article} \usepackage{geometry} ...
3
votes
1answer
206 views

Pgfplots label not appearing

\documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepackage{tkz-euclide} \begin{document} \begin{tikzpicture} \begin{axis}[ticks=none, xtick={-10,-9,...,10}, ...
3
votes
1answer
557 views

Specify directories to check by the PGFplots addplot command

When I produce a graph with PGFplots, I first test it, before importing it in my main document tex file. I have the file tikzpicture.tikz in which the tikzpicture environment data is included, and I ...
3
votes
1answer
283 views

addplot data frame

Square one: I have about 8 hours of experience. I want to make a barplot in pgfplots and see many great, creative solutions on this blog. All I want at this stage is not to specify coordinates and not ...
3
votes
1answer
349 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
1answer
182 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 ...