2

Aiming to change x- and y-axis, I read some threads here and realize, that I could do the trick
({t},{t^2-5},{t+1}) ---> ({t^2-5},{t},{t+1});
then I have to 'rename' every setting for x and y.

But I ask myself: Is there a possibility to do that change, overwriting the default?

enter image description here

\documentclass[tikz, margin=5pt]{standalone}
\usepackage{amsmath, amssymb}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}

\begin{document}
\begin{tikzpicture}[]
\begin{axis}[
scale=1.5, 
ymin=-3,  ymax=7,
xmin=-30,  xmax=100,
axis lines=middle,    
y dir=reverse, 
y label style={at={(ticklabel* cs:-0.00)}, inner sep=5pt, anchor=south},
xlabel={$x$},
ylabel={$y$},
zlabel={$z$},
]
\addplot3[red, thick, 
domain=-3:5,
samples=111, smooth, 
samples y=0,
variable=\t, 
]({t},{t^2-5},{t+1}); 
\end{axis}
\end{tikzpicture}

\end{document}
5

You can use the view key to rotate the coordinate system (the following rotates by 90 degrees around the z-axis from the default orientation, effectively swapping the x- and y-axis):

\documentclass[tikz, margin=5pt]{standalone}
\usepackage{amsmath, amssymb}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}

\begin{document}
\begin{tikzpicture}[]
\begin{axis}[
scale=1.5, 
ymin=-3,  ymax=7,
xmin=-30,  xmax=100,
axis lines=middle,    
y dir=reverse, 
y label style={at={(ticklabel* cs:-0.00)}, inner sep=5pt, anchor=south},
xlabel={$x$},
ylabel={$y$},
zlabel={$z$},
view={-65}{30},
]
\addplot3[red, thick, 
domain=-3:5,
samples=111, smooth, 
samples y=0,
variable=\t, 
]({t},{t^2-5},{t+1}); 
\end{axis}
\end{tikzpicture}

\end{document}

enter image description here

  • 2
    Are you working with speed of light? :() OK, I have to check.... – cis Nov 17 at 12:33
  • @cis it was just coincidence that I took a look at the main site in the right time :) – Skillmon Nov 17 at 12:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.