I have a group of shapes I'm plotting in 3D via \addplot3 (such as a cone) and need to have them pointed in a direction specified by the macro arguments. I do not want to just change the view angle or rotate the whole plot/axes as I'll be plotting other stuff that I want to just plot normally. Is there an easy way to do this (rotate my cone and other shapes) via some argument to \addplot3 or something else? Or do I have to manually do this in the equations? (I'm doubting there's anything, but I figured I'd give it a shot before doing it via the equations. =P)
For my MWE, here is my cone that I'd like to rotate:
\documentclass[12pt]{article}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{3d}
\pgfplotsset{compat=1.12}
\begin{document}
\begin{tikzpicture}[scale=2]
\begin{axis}[axis lines=center, axis on top, samples=30,
xmin=-1.5, xmax=1.5, ymin=-1.5, ymax=1.5, zmin=0.0]
\addplot3 [surf, shader=interp, domain=0:1, y domain=0:2*pi] ({x*cos(deg(y))},{x*sin(deg(y))},{x});
\end{axis}
\end{tikzpicture}
\end{document}
x,yandz. I am not sure it can be done with\addplot3but might be worth looking into. – Peter Grill Feb 20 '15 at 07:42filter pointmacro which takes\pgfkeysvalueof{/data point/x}and../y,../z, respectively and reads the result from these values. Also see the related (yet not the same approach) idea in http://tex.stackexchange.com/questions/173602/pgfplots-3d-creating-a-filled-solid-of-revolution/174077#174077 . But the equations as such are not inpgfplots. – Christian Feuersänger Feb 20 '15 at 19:47