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

Same y-axis and x-axis label for multiplots in pgfplots [duplicate]

I am trying to get one y-axis label, "Absolute Parameter Error ABS (Estimated - Actual)" spanning the three rows of the plots. Also, the same x-axis label each of the two plots with the label "Number ...
0
votes
1answer
30 views

Common Legend in pgfplot - having problems compiling

I am trying to get a common legend for the six plots that I have. I tried to implement the code found here, but could not get my program to compile. I tried to get the legend at the bottom of the ...
2
votes
3answers
82 views

Reading an unusual coordinates file in PGFPlots

I have a pgfplot (which works fine), but I want to automatically load the data from a file: data.dat: ( 0 , 0.295027 ) ( 1 , 0.295027 ) ( 2 , 0.25965 ) ( 3 , 0.219873 ) ( 4 , 0.197843 ) (...
2
votes
1answer
192 views

pgfplots: Bar graph with confidence intervals (error)

I would like to put a confidence interval (error bars) in my bar graph, but I tried the += and -= and it did not work. Here is the code: \begin{tikzpicture} \begin{axis}[ width = 0.50*\...
1
vote
1answer
59 views

Change font properties of math expression in axis label pgfplots

I thought it was simple just to change the font of the axis label by using: ylabel={$\frac{Su}{\sigma_{pc}^{'}}$ x}, ylabel style={font=\Huge}, However it does NOT work, I really don't understand ...
3
votes
1answer
213 views

How to draw a 3D path from points generated within tikz

Let me be specific by posting an example: The following small code draw a piece of helix (an ugly one) \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{tikz} \begin{document} ...
4
votes
2answers
124 views

Problem with vertical alignment and centering of caption for pgfplot

I am having a problem keeping the vertical alignment of the plots. Also, my caption text is not centered. This is what I get in my document: Can you assist me in getting the graphs to align ...
2
votes
1answer
54 views

Change pgfplots markers colors and shape

In my MWE below, I am not getting the markers of the plots to colors that I wanted. Also, I would like to change the red squares in the last plot to cyan circles. Thanks. Here is my code: \...
2
votes
2answers
193 views

Combine pgfplots and other shapes in the same Tikz picture

I would like to put both a pgf plot other tikz elements in the same figure, but I cannot figure out what is the height and the width of the plot, so that I can scale other elements to it. Here is an ...
3
votes
1answer
188 views

Draw a surface on a ternary diagram with pgfplots

I'd like to draw a surface on a ternary diagram. Until now, I can plot density maps on a ternary diagram (cf. density map). But I would like to replace the density map by a surface, like on figs a ...
3
votes
2answers
108 views

fairly specific cartesian graph help

I have been trying for an hour or two to draw a TikZ plot with varied results. I am trying to draw a plot whose x axis has ticks for each x unit n*(1) and each y unit n*($\sqrt{-5}$). I then need to ...
9
votes
4answers
625 views

How to use colors from a pgfplots colormap in own draw

Let's consider a set of ellipses (or say a signal), here 3, but in general that might be a huge array of 64x64 \documentclass{standalone} \usepackage{tikz,pgfplots} \usetikzlibrary{calc} \begin{...
3
votes
2answers
220 views

pgfplots log axis with only minor ticks/labels

I'd like generate sheet of blank semilog paper. Every decade shoud have labels from 1 to 9. I only managed to have an unlabelled axis, but had no success to set the x axis labelling according to my ...
2
votes
1answer
28 views

pgfplots: Accessing the Width of a Diagram and Using it as a Variable for other Widths

I define the width of a plot/diagram using the width key, for example: width = 0.8\textwidth, I also define the width of the title text similar: title style = {text width = 0.7\textwidth}, I am ...
1
vote
1answer
108 views

PgfPlots Histogram: wrong density on y-Axis

I want to make a pgfplots histogram to visualize the jitter of a 260 MHz clock signal. I want to use the probability density on the y-Axis. Yet, when I try this, the y-Axis does not display the ...
2
votes
1answer
49 views

Anchors on the outer bounding box of a color bar

I have a tikzpicture with two axis environments in the horizontal direction: \documentclass[margin=1cm]{standalone} \usepackage{pgfplots} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture}...
9
votes
1answer
343 views

What does addplot+ do exactly?

So using \addplot+ gives specific points on my curve vs \addplot which just gives me a curve? How does \addplot+ select the points it graphs etc?
2
votes
1answer
95 views

Subtract area from plot

The color of the 2 areas are added. Instead, I would like each new area to cover the previous ones with the color defined in the description. \begin{tikzpicture}[domain=0.001:160, samples=100] \...
1
vote
0answers
45 views

tikz \addlegendentry leading to error for certain plots [closed]

Using Emacs/Auctex under Ubuntu 14.04 (TexLive 2012) I get the following error ERROR: Undefined control sequence. --- TeX said --- <argument> \pgfplots@current@point@x,\pgfplots@current@point@y,...
2
votes
1answer
191 views

Symbolic Labels in pgfplots Bar Chart

In the following code, why do I have to type the x-axis labels explicitly in the axis options and not just use the labels from the coordinates data? Is there a way to just use the data from the ...
1
vote
1answer
83 views

Use path replacement command inside tikzpicture/pgfplots table

After using the answer of Using \nameref within \path I tried to use that command inside a 'pgfplots' table as file name. Here's the (shortened) code: \newcommand*{\expath}[1]{/Users/jo/{#1}} \...
2
votes
1answer
62 views

Force scaled ticks for color bar

I have a plot with a colorbar, generated by means of the code \documentclass[margin=1cm]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[colorbar,view={...
3
votes
1answer
224 views

Horizontal space between xticks in pgfplots

I want to create a bar graph for my master thesis. I have huge numbers on the x-axis. The problem is, that the space between the xticks corresponds to the numbers, what is of course correct. But it ...
1
vote
1answer
59 views

pgfplots plotting inverse exponential not working?

I am trying to plot a graph of 100*e^(-x/5) in LaTeX but for some reason it will only plot up to x=5. \documentclass{article} \usepackage{pgfplots} \usepackage{tikz} \begin{document} \begin{figure}[h]...
6
votes
1answer
284 views

Place node at local maxima or minima of graph

Though there is an upvoted answer - the question is NOT answered. It turned out, that without smooth the resulting figure gets produced and looks alright, but the error remains. How to get rid of ...
2
votes
1answer
156 views

3D view of 2D scatterplot

I have a scatter plot but I want to make a 3D plot where the points will be still in the XY plane but there will be a line over every point which will have different values for different (x,y) point. ...
2
votes
2answers
176 views

Multi-colored translated curve

I'm trying to get multi-color translated curve, I wrote a code based on a solution given here but it seems that I missed something % arara: indent: {overwrite: yes} % arara: pdflatex: { shell : yes } ...
0
votes
1answer
109 views

Combine histogram bars and 2D dot plot [duplicate]

I'm trying to create a plot similar to this, where histogram bins are plotted along each axis of some randomly distributed data from a csv-file: Ideally, the histogram bars would be mirrored along ...
4
votes
0answers
127 views

Calculate x-coordinate for given y-value by interpolating data from pgfplotstable

I have a text file data.txt with the following content: -2 -2 +1 +0 +1 +3 +2 +4 +2 I read it with \pgfplotstableread{data.txt}\data and then plot the second column by the first column with \...
2
votes
0answers
63 views

\foreach in pgfplots [duplicate]

My final goal is to create a groupplot with 10*10 figures. I here have reduced the problem so that it will be easier to explain. First, I have created some dummy data which I store in test.txt and it ...
2
votes
0answers
39 views

Adding a Trend Line to a dateplot

How could I add a trend line to this plot? Many thanks! \begin{tikzpicture} \begin{axis}[ date coordinates in=x, xtick=data, xticklabel style= {rotate=90,anchor=near xticklabel},...
1
vote
1answer
159 views

PGFPlot : Relative positioning of legend according to axis

I am trying to move the legend of a PGFPlot above the top right corner, but using relative positioning like at={(current axis.above of north east)} in stead of manually giving a position like at={(1, ...
3
votes
1answer
133 views

Graphing an arcsin function using pgfplots

I am trying to graph this function using pgfplots: D(x)=180+2x-4(arcsin(sin(x)/1.33)) What is the how to I represent this in the the addplot function in pgfplots? I am also confused as to what to ...
0
votes
0answers
73 views

Pgfplots: Adding text to group plot [duplicate]

I have group plot which consists of 2 rows and 3 columns. I need to add text to left of the figure and below of of the figure, very similar to this : \documentclass{article} \usepackage{amssymb} \...
2
votes
0answers
42 views

Plot three dimensional surface plot using (x,y,z) coordinates [duplicate]

The following is the data I am trying to plot in latex. Rise_time_id,Overshoot_id,Settling_time_id,Rise_time_iq,Overshoot_iq,Settling_time_iq 0.0075165,1.4333,0.3615,0.0016402,20.752,0.37196 0....
1
vote
1answer
30 views

Forcing all axis labels to display in a plot

In below plot only some x axis labels are displayed (e.g. HH1, HH3, HH5 ..). But I would like to display all the x axis labels (e.g HH1, HH2, HH3, HH4.....) I initially assumed that this is happening ...
3
votes
1answer
107 views

Modify nodes near coords with \if

I would like to code something like this: if \thecitation is {This work} then nodes near coords={\thenumber{} [This work]} and plot color is Red else nodes near coords={\thenumber{} \cite{\...
1
vote
1answer
69 views

Positioning y axis and node near coords

What I obtained: What I need: Operations needed: Positioning y axis on Zero Anchoring node near coords on the right side of the blue line The code I used is: \begin{filecontents*}{RR.dat} y ...
6
votes
1answer
140 views

Why is the last pgfplots tick label not shown in one of my groupplots?

This drives me crazy. Why is the last tick label shown in one of the groupplots only, despite they are equally defined? It is also not shown if the single plot is plotted. Code: \documentclass[12pt]{...
3
votes
2answers
234 views

PGFPlots: point meta colormap index as fill value

I have the following simple PGFPlots sample \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[ xmin=0, xmax=1, ymin=0, ...
2
votes
1answer
143 views

Two sets of labels on pgfplot bar chart

I'd like another set of hard-coded labels that sit on top, near the bottom (0) of each bar. I.e., like the nodes near coords labels, but shifted down towards 0 and with my own custom text. So in the ...
5
votes
1answer
143 views

pgfplots: How to plot volume data on the surfaces of a cuboid?

in MATLAB I genrated the plot below. In my task I only have data from the 3 shown slices on the surfaces of a cuboid. I don't have the complete volume information as it seems from the MATLAB code ...
8
votes
2answers
530 views

How to make my ugly graph look nice?

I am 2 weeks into using LaTex so pardon my noob-ness :) I have some data in my physics lab that I need to graph, which I have in a tab-delimited text file called current-force.txt. I graphed the data ...
1
vote
0answers
219 views

Pgfplots' fillbetween library does not work

I'd like to use the command fillbetween in a tikzpicture figure but I keep getting an error message. Here is a minimum code where the problem presents itself: \documentclass{report} \usepackage{...
1
vote
1answer
166 views

Minor ticks not drawing with pgfplots

Why the lines are not drawn at x = -4.5 and y = -3.5 when they are drawn at x=10.5 and y=4.5 ? How to align the text "0" to the baseline of the labels of the x-axis ? \documentclass[tikz]{standalone}...
2
votes
2answers
74 views

PGFPlots: Math, commands and braces in text along path

Following my question here about how to plot a text along a path another question came up. How can I add math or commands with \command to the text along the path? This here works: postaction={...
1
vote
0answers
129 views

Two axis y discontinuity=parallel

I am trying to complete this bar graph with two y discontinuities since my third coordinates are too far from the remaining two coordinates. Below is a MWE can anyone provide me with an approach to ...
1
vote
0answers
118 views

How to draw a smooth line through points on a cartesian flammability plot

First attempt to create this plot The minimum working example: \RequirePackage{filecontents} \begin{filecontents}{CO2.dat} O2, CO 0, 72 40, 48 46, 39 52, 28 51.5, 22 49.5, 18 40.5, 16 33, 15 26, ...
3
votes
1answer
250 views

tikz legend in caption and colorbrewer

Related to the question tikz legend in caption I want to use the colorbrewer library (just unzip the archive in the working directory). However, it seems that they cannot be used together. \...
4
votes
2answers
119 views

pgfplots - How to get the y axis in sans serif

I made a coordinate system with pgfplots. Now I want the font to be in sans serif, so I tried the command \sffamily after document start (just like in the example). With this everything is in sans ...