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

Combine multiple pgfplots from tex files

I have been using Sharelatex to write my thesis and I have accumulated many pgfplots. I can't include more than ~6 pgfplots produced by csv files before I get compile time out. I have been dividing my ...
3
votes
0answers
25 views

getting confused with pgf

\begin{tikzpicture} \begin{axis}[ axis lines=middle, samples=100, ymax=5,legend pos=north east, legend style={draw=none} ] \addplot[forget plot,cyan,domain=0.001:8] {abs(log10(x))}; ...
2
votes
1answer
26 views

plot and fit from pgfplottable

I would like to plot a graph from data created inside pgfplottable. I have one file of data data.dat: x,y 1,2 2,3 3,4 4,5 5,8 6,9 7,34 And this code : \documentclass{beamer} \usepackage{etex} ...
1
vote
1answer
55 views

Linear regression on modified datas

I would like to create a linear regression on modified data. My raw data is on a file called data.dat like that : x,y 1,2 2,3 3,4 4,5 5,8 6,9 7,34 If I do something like the code below, I get the ...
1
vote
1answer
25 views

clear me the doubt in positioning legend option

\begin{tikzpicture} \begin{axis}[ axis lines=middle, samples=100, ymax=5,legend pos=north east ] \addplot[cyan,domain=0.001:8] {abs(log10(x))}; \addplot[red!70!black,domain=-2:4] ...
3
votes
1answer
19 views

Using named nodes as pgfplots coordinates

Is it possible to use named nodes as coordinates in an \addplot command? I am trying to plot a line through the averages of a number of boxplots calculated by pgfplots (rather than using boxplot ...
1
vote
1answer
23 views

Pgfplots not working with Pgfplotstable

I am writing a document using LaTeX which must contain both graphs and tables. For the graphs I have been using pgfplots and this has worked brilliantly. Now I needed to insert a few tables and was ...
2
votes
0answers
18 views

PGFPlots polaraxis axis labels are swapped (or in the wrong place)

I have some problems with axis labels when using the polar axis, if I set the X and Y label they appear in the wrong place. When using the polar axis; x coordinate is the angle (azimuth, phi) y ...
0
votes
0answers
21 views

Pgfplots and Adobe Reader DC

I am trying to build interactive plots using package pgfplots. I have downloaded from the package page some of the examples with the clickable option, I have compiled them with pdflatex but I have ...
4
votes
1answer
36 views

Scaling problem with fillbetween in pgfplots

I recently ran into scaling problems with the very nice pgfplots library fillbetween. See the following example, which is perfectly fine: \documentclass{standalone} \usepackage{pgfplots} ...
2
votes
1answer
22 views

Plot data in a tabular environment using plgfplot

I have a tabular environment which has two columns representing x and y data. Is there a way for pgfplots to reference the data in that tabular and plot it? Example table: \begin{tabular}{ll} 1 ...
1
vote
0answers
16 views

reduce ytick density for two pgfplots in groupplot

please help me adjust the ytick density of my second plot in the groupplot I have shown. I have tried to increase the max space as suggested from another thread but it only works for the first plot ...
3
votes
1answer
66 views

Center plot created with pgfplot from matlab

If I have a nice plot in matlab, then I save it as a tikz standalone file matlab2tikz('myimage.tikz','standalone',true) and I create a pdf in my terminal with pdflatex myimage.tikz to include ...
2
votes
1answer
20 views

vertically align pgfplots using subfigure

I need to align my two plots. They seem to be anchored by something other than the text. Because one pgfplot has more text in the caption then the other, it offsets it. Please see image. I tried ...
1
vote
1answer
46 views

Drawing spherical 3D plot with PGFPlots

I want to draw some plots which looks like that ; I did not find anything related to this in the doc, and browse the Internet without success. I found ways to plot spherical values with a changing ...
2
votes
0answers
27 views

Change ONLY the color of the plot for z = 0 with surf, possible?

Is it possible to change the classical blue color for the surface on the plane at z = 0? I would like to change ONLY the blue with a transparent colour or white. Thanks.
4
votes
1answer
45 views

Why can't I move the legend position with PGFPlots?

I am trying to use PGFPlots to draw some graphics into my document, but I didn't manage to move the legend to the desired position. Here is the minimal code that I made: \documentclass{article} ...
1
vote
1answer
24 views

How to use Pgfplot to draw vertical lines with use of data taken from file

I have one-column example.csv file with time samples (with different intervals). My question is how to use Pgfplot to generate plot with several vertical lines in time samples taken from .csv file ...
0
votes
1answer
46 views

Drawing and labeling the axes for the Cartesian plane

Nothing exciting here. I only have code to display the coordinate axes. I have a file in which displays of various functions are plotted on the Cartesian plane and displays of a pair of intersecting ...
2
votes
1answer
24 views

Overshooting axis arrows strange behaviour with tikzexternalize

I would like to use the following code to create a plot with a horizontal gridline and axis arrows which overshoots this gridline (like here). However due to the line \tikzexternalize[shell ...
3
votes
1answer
66 views

Drawing and labeling angles in an axis environment

I am curious about the misinterpretation of TikZ commands to draw and label an angle in an axis environment. If, in the following code, I have $\theta$ drawn using the commands, \draw[draw=blue] (A) ...
4
votes
5answers
202 views

Drawing and Labeling a Triangle for a Demonstration of the Double-Angle Formula of Cosines

I have a display of two triangles, but the triangle drawn in red is unintentional. TikZ is misinterpreting the coordinates for point C. The polar coordinates for C is given as \coordinate (C) at ...
0
votes
0answers
22 views

How to remove the black stroke of legend bars when [draw=none] was used for plotting the bars

I made the bars with [draw=none] but inside legend the bars have a black stroke around them. Why isn't the style preserved? How could I remove the black stroke of the legend bars? \addplot[draw=none, ...
1
vote
2answers
146 views

How to draw these (indifference) curves in TikZ

I would like to reproduce the following plots but I have no idea how to do this. Does anyone of you know how to draw these curves in PGF/TikZ (or in any other suited way)?
3
votes
1answer
49 views

Can you use `pgfplotstable` to do a linear regression to an expression?

I have a lot of data in a table, but it is not linearly related. I can linearize the relationship by computing functions (x expr and y expr expressions). I would like to use pgfplots to show the ...
3
votes
1answer
47 views

Showing legend for boxplot in pgfplots

I am trying to display a legend for a boxplot created in pgfplots. However the size of the legend is almost as large as the plot and covers up all of my plot, how do I fix this? ...
3
votes
0answers
25 views

Specify marker color to come from colormap in @pre marker code

I'm making a 3D scatter plot of point data (markers only). I want the marker size dependent on one metadata column in my table, and the marker color dependent on another metadata column - I've managed ...
2
votes
1answer
30 views

Regression with .csv tables

I am having trouble getting regression to work. If you wouldn't mind just looking over the code and point me in the right direction I'd really appreciate it. I have loaded pgfplots and pgfplotstable ...
4
votes
1answer
52 views

Minor grid in pgfplot not showing when specifying ticks manualy

Firstly I would like a minor tick between every major tick in my pgfplots graph (and minor grids). I wrote minor tick num=1 but it doesn't work. I am not using a logarithmic axis so it is unrelated to ...
2
votes
1answer
62 views

Boxed equation in pgfplots

I'd like to put an equation within a box. This equation is a label for a picture I'm making by means of pgfplots, tikzpicture environment. Here is the code \documentclass{standalone} ...
4
votes
1answer
41 views

Little problem with \tkzMarkRightAngle

I have this code: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{tikz} \usetikzlibrary{matrix,decorations.pathreplacing} ...
0
votes
1answer
40 views

Tikz Externalize, Lualatex through pdflatex and big data

I am plotting data from an infrared camera with pgfplots in an image as discribed and solved under this topic. A 194x194 data matrix is the input. I am compiling the document with lualatex through ...
4
votes
1answer
47 views

align pgflots with axis as baseline

Consider the following snippet: \documentclass{article} \pagestyle{empty} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[scale=0.35,baseline=(current axis.south)] \begin{axis}[axis ...
4
votes
1answer
84 views

pgfplot legend on top of grid but below graphs in axis as well as groupplot

Is there a way to specify the order of layers of elements in a pgfplots-axis? In my certain case I'd like to have the legend on top of the grid, but below the actual graphs: I know for this ...
4
votes
1answer
89 views

imagesc in tikz with non-symmetric matrices and squared axis

In principle the problem is the same like in matlab2tikz imagesc TikZ/pgfplots equivalent Can somebody tell me how to adopt this snippet to plot non-symmetric matrices but with squared axis (without ...
3
votes
1answer
40 views

Horizontal alignment of ytick labels

I am working on a population pyramid. With some sort of hard-code I managed to overlap the ytick-labels of the age in the middle of the graph (but not properly). My question is, how to 1.) suppress ...
4
votes
1answer
32 views

lower and upper case in axis-labels

pgfplots output for labels is only capital letters, I would like to make the axis labels case sensitive but can't seems to find a way todo this. \documentclass[12pt, %Schriftgröße a4paper, ...
4
votes
2answers
128 views

Plotting matrix image data

I have data from infrared measurements in a file with 194 rows and 194 columns, each value representing the temperature at a certain pixel. As the image from the camera does not look nice, I would ...
3
votes
1answer
45 views

How do I change the font size of the labels along the axes in pgfplots [using scaling]?

This is a continuation of a question that was asked and 'answered' here: How do I change the font size of the labels along the axes in pgfplots?. The suggested answers all involved using LaTeX's ...
2
votes
1answer
43 views

Two ordinates - gray tick lines overlay black axis line

I want to plot two data series with different y-coordinates over the same x. Therefore a second ordinate is drawn with a second axis environment. When I now limit the range to be drawn, the gray tick ...
3
votes
0answers
38 views

Pgfplots: Draw time-series without missing data

I have time-series data which I want to draw with pgfplots. The data only covers weekdays, thus no weekends. Still pgfplots inserts new ticks for datapoints having essentially no data, this results in ...
3
votes
1answer
68 views

Why doesn't this example from the pgfplots manual compile?

I copied this example from page 134 of the pgfplots manual (version 1.12.1): \documentclass{article} \usepackage{pgfplots} \pgfplotsset{width=7cm,compat=1.12} \usepgfplotslibrary{patchplots} ...
2
votes
1answer
78 views

Adding a 2D plot to a 3D plot without closing the ends

I want to add 2 parabolas to a plot of a hyperbolic paraboloid, but I can't figure out (and couldn't find any information on the internet) how to keep pgfplots from closing the ends of the graphs. My ...
3
votes
1answer
87 views

Colored circles from data

I have a data file which gives x-position (xpos), radius, and color. I wish to draw a circle at ever (xpos,0) with appropriate radius and color. How do I achieve that? I have used two approaches. ...
5
votes
0answers
100 views

Radar Chart - problem with axis

I have some problems drawing a radar chart. I would like to draw the following chart. I tried to paste pieces of code found here and there (I know that is not a good way) and I obtained the ...
1
vote
0answers
57 views

pgfplot SLERP, LERP or SQUAD existant

Are there any already existent drawings of LERP, SLERP, or SQUAD (similar to the drawing done here) done using tikz?
3
votes
1answer
33 views

pgfplots: replace scatter markers with custom text

I'm wondering if it's possible using pgfplot to plot a 3D scatter plot with lines between each point where the point is replaced with a value. Image is shown below. Currently I am populating the ...
2
votes
1answer
28 views

Placing pgfplot graphs side-by-side in two column format

I am trying to put three graphs side by side in two column format. The figures is shown below. My LaTeX code is as following: \begin{figure*} \centering ...
3
votes
1answer
41 views

How to refer to pgfplot legend labels with hyperref?

I would like to \refer to a pgf legend label in the caption of a figure (to explain symbols). I create my figures with externalization. Without the hyperref package, everything works fine. But as soon ...
5
votes
1answer
159 views

How to plot a system model like in Microsoft Visio with tikz and pgfplots?

The diagram that I would like to reproduce using tikz/pgfplots is given below: I tried to do it but I did not succeed (I am new to pgfplots and tikz). Here is my code and my output file. For ...