{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

2
votes
1answer
12 views

pgfplots' fill between with wrong segment split

I want the last segment to be white, but it seems that the last segment is combined with the previous segment. \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} ...
0
votes
0answers
3 views

Missing Legend Entries in GroupPlot

I am constructing a groupplot with a common legend placed in a node under the plot. The code (not an MWE) is \begin{figure}[h!] \centering \begin{extikzpicture}[runs=2]{fig3} ...
1
vote
0answers
19 views

How to correct a PGFPLOT plot with minimal data that does not follow global options?

I have incomplete test data, as shown in the MWE. I would like to use all (few) available data points in the plot, ie (55.16, 0.08) for copper, but the plot does not take it into account. Also the ...
2
votes
1answer
16 views

pgfplots: Pointwise Positioning of Explicit Point Meta

I am drawing several diagrams like the following one: I would like to label the important points with $P_1$, $P_2$ and so on. The problem is that there is no global position for the nodes that fits ...
3
votes
0answers
31 views

trying to load images with foreach

Im trying to load images from a directory but I cant because I dont know why \i does not indicates the number, code searches the directory and the files were not found.. \documentclass{beamer} ...
2
votes
2answers
36 views

Tikzpicture: How to caption with multiple axis

Is there a way to caption multiple axes with tikzpicture? I don't want to use subfigures since each axis (and its corresponding figure) is connected via an arrow to another axis. I have something ...
1
vote
1answer
45 views

Vertical colorbar (in tikz) + subfigures (png)

I have an issue with the placement of a colorbar. The colorbar is defined separately in a tikz-environment, as suggested in this topic. My goal is to place one colorbar together with 4 png pictures ...
5
votes
0answers
70 views

Watercolor in tikz

Is it possible to fill a shape with a coloring that looks like watercolor like in this image using tikz or pgfplots? Src: http://bartoszmilewski.com/2015/07/29/representable-functors/
0
votes
0answers
11 views

Pgfplots: pass to raw gnuplot string axis width and height of current \nextgroupplot

MWE: \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{groupplots} \begin{document} \begin{tikzpicture} \begin{groupplot}[ group style={ group size=1 by 4, vertical ...
3
votes
2answers
40 views

Draw a special element (line with a cross in the middle) in circuitikz

I need to draw a wire that looks like That is the symbol my lecturer uses for the Josephson junction. I googled a bit and it seems to be the commonly used symbol for such an element, so it would ...
6
votes
2answers
112 views

Gradually changing opacity in a disk (pgfplots)

I want to make disk with a gradually changing opacity. I want opacity=1 on the black line for the red disk, and have this opacity gradually go down to zero going in both directions along the circle ...
2
votes
1answer
25 views

Use multiple columns as y-axis for a plot pgfplots

I am plotting a set of graphs using pgfplots and I am loading the data from a csv file. The csv file contains the results of a test which has been executed 10 times, and a column showing the average. ...
2
votes
1answer
58 views

Resize font in legend below \tiny

I have small graph in my presentation (I have to). To adjust the size of the legend, I have to use very small legend. But \tiny is not enought. Here is a MWE : \documentclass{beamer} ...
7
votes
2answers
187 views

How to draw this image using tikz?

Beyond the solution to this particular diagram, can you explain if there is a general set of steps that you would follow to obtain this code? My guesses: Would conversion to vector graphics give ...
1
vote
1answer
33 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
37 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
30 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
69 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
34 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
24 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
28 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 ...
5
votes
1answer
58 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
1answer
36 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
40 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
26 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
18 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
72 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
23 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
49 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
29 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
52 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
25 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
26 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
217 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
147 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
26 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
56 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
42 views

Little problem with \tkzMarkRightAngle

I have this code: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{tikz} \usetikzlibrary{matrix,decorations.pathreplacing} ...
1
vote
1answer
71 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
86 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
93 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 ...