I would like to graph the function x^(x-1) but I keep running into errors. Instead of a xy plane, it just graphs the x axis. Here is the general set up.
\documentclass{standalone}
\usepackage{pgfplots}
\usepackage{tikz}
\pgfplotsset{compat = newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xmin = 0, xmax = 15,
ymin = 0, ymax = 30000,
xtick distance = 3,
ytick distance = 6000,
width = \textwidth,
height = \textwidth,
xlabel = {$x$},
ylabel = {$y$},]
\addplot[
domain = 2:15,
samples = 50,
smooth,
thick,
brown,
] {x^(x-1)};
\end{axis}
\end{tikzpicture}
\end{document}
It keeps throwing the following errors:
- Missing number, treated as zero
- Missing number, treated as zero
- Illegal unit of measure (pt inserted)
- Package pgfplots Error: The argument(s) for ytick resulted in a tick distance which is too small. Please reconfigure the xtick argument(s)
- Package pgfplots Warning: Axis range for axis y is approximately empty; enlarging it (it is [0.0:0.0]) on input line 27.
- Package pgfplots Warning: the ticklabel anchor cannot be determined, the normal vector -(-1.0pt,0.0pt) and the unit x vector (1.0pt,0.0pt) are almost parallel (abs(cos(angle)) = 1.0pt)! on input line 27.
- Package pgfplots Warning: the ticklabel anchor cannot be determined, the normal vector -(1.0pt,0.0pt) and the unit y vector (1.0pt,0.0pt) are almost parallel (abs(cos(angle)) = 1.0pt)! on input line 27.
- Package pgfplots Warning: the ticklabel anchor cannot be determined, the normal vector -(-1.0pt,0.0pt) and the unit y vector (1.0pt,0.0pt) are almost parallel (abs(cos(angle)) = 1.0pt)! on input line 27.
- Package pgfplots Warning: the ticklabel anchor cannot be determined, the normal vector -(0.0pt,-1.0pt) and the unit y vector (0.0pt,-1.0pt) are almost parallel (abs(cos(angle)) = 1.0pt)! on input line 27.
Things that I have tried so far for the equation:
{pow(e,(x-1))}
{exp((x-1)*ln(x))}
{exp(multiply((x-1),ln(x)))}
ymax=30e15
ytick distance=6e15
\textwith
which is 345pt=~12,2cm with the standalone-class. || The function to plot is y=x^(x-1). ymax=30000 is reached for x=~6,50516. For x=15 you get y=29192926025390625. So seems either thedomain
is too large and thus in y-direction things are calculated for a few orders of magnitude more than you actually want to see on the plot. Orymax
andytick distance
are far too small. You can try domain =2:6.50517. Or instead try something like ymax=29192926025390625 and ytick distance=5000000000000000.