Questions tagged [pgfplots]
{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.
10,132 questions
3
votes
2
answers
88
views
Single point in a figure on beamer
I'm trying to build a figure on beamer that has a single point on it. I've tried what I'd usually have done in other settings (article, book), but I'm still getting an error. In particular, I get
! ...
3
votes
3
answers
142
views
Thicker axis in PGFplot
Is there a better method to have the x=0 and y=0 axes thicker? I made a basic approach by adding lines, but is there a better method?
\documentclass{book}
\usepackage{pgfplots}
\pgfplotsset{compat=1....
6
votes
1
answer
164
views
Inaccurate TikZ/PGF plot
I'm using the following code to produce a plot:
\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
width = 15cm,
...
7
votes
3
answers
253
views
help with 3D Surface plot TikZ
Can someone please help with coding the surface plot for
$\sqrt{(x - 1)^2 + y^2} + \sqrt{(x + 1)^2 + y^2} - 4 = -|z|$
in TikZ for my article in LateX? I have been trying, but can't seem to manage it. ...
6
votes
1
answer
114
views
Error linked to active characters?
This MWE gives an error that disappears if line #3 or line #4 are commented. I would say that this has probably something to do with active characters, but I am not able to understand what goes wrong ...
6
votes
3
answers
131
views
\tikzmath defined functions sometimes won't parse in \addplot, producing spurious errors
This is my first post so the graph may not appear and/or the format may look weird. Apologies if that is so.
The graph is produced when the line \addplot[red, thick] {myexp(x,4)}; is commented out
...
3
votes
1
answer
73
views
Why does PGFPlots separate the axes of my log-log graph?
I'm trying to make a log-log graph. Semi-log graphs and linear graphs work just fine, but for some reason when I try to make a log-log graph PGFPlots doesn't draw the horiziontal axis or the curve.
...
3
votes
1
answer
91
views
Aligning arrows along a path at fixed steps on a rectangular grid
The objective is to have arrows along a path for every 1-unit step we take horizontally or vertically. The arrows would be aligned midway between major grid tick marks, e.g. midway along (0,0)--(0,1). ...
3
votes
0
answers
45
views
Plotting quasi-3D figure with axial filled planes
I want to make a quasi-3D figure from three variables. They pair-wise form a two-dimensional figure. I want to emphasize that the green plot is in the green plane, etc.
I have two issues
1./ The red ...
5
votes
3
answers
206
views
Plot any real sequence of real variables as in Geogebra and Desmos
Several years ago, I created a GeoGebra script to plot any real sequence of real variables. As you can see from the screenshot, there is a command on the left:
Sequence({(n, 1/n)}, n, 1, M)
which ...
13
votes
5
answers
340
views
Iterated plot with TikZ, PGFPlots and foreach loop
I'm trying to plot an illustration of the fixed point method in which a function is evaluated repeatedly in a loop. The result should be a staircase or spiral plot on top of the plot of the function ...
3
votes
2
answers
110
views
Problem trying to set color in dynamic in pgfplot [duplicate]
I'm trying to draw 10 functions of ten different colors (actually starting from red and ending with yellow) inside a tikzpicture environment. Problem is that the code reads only the first color (red) ...
4
votes
2
answers
155
views
pgfplots: declare function and parameters globally
As I was intent on moving function declarations further up, so as to use them in multiple files, I noticed something unexpected. The first code plots a thin black line. The second code plots thick ...
3
votes
1
answer
96
views
Arrows along path are misaligned after unrelated calculations
The objective is to draw arrows that show convergence to a particular coordinate. The code below has served me well in simple cases. But attempting to use coordinates calculated with the intersections ...
5
votes
1
answer
137
views
PGFPlots Line Patch Plot with Decoration
Using tikz and PGFPlots, I am creating a patch plot from data table with the line patch type. I would like to decorate the end of each line with an arrow. What is the best way to do this?
Below is a ...