cylinder.tex 841 B

12345678910111213141516171819202122232425262728293031323334
  1. \pgfplotsset{
  2. colormap={whitered}{
  3. color(0cm)=(white);
  4. color(1cm)=(orange!75!red)
  5. }
  6. }
  7. \begin{tikzpicture}
  8. \begin{axis}[
  9. colormap name=whitered,
  10. width=15cm,
  11. view={340}{25},
  12. enlargelimits=false,
  13. grid=major,
  14. domain=0:5,
  15. y domain=0:2*pi,
  16. xmin=-1.5, xmax=1.5,
  17. ymin=-1.5, ymax=1.5, zmin=0.0,
  18. samples=30, %57 : TeX capacity exceeded, sorry [main memory size=3000000].
  19. % see also http://tex.stackexchange.com/a/7954/5645
  20. xlabel=$x$,
  21. ylabel=$y$,
  22. zlabel={$z$},
  23. %colorbar,
  24. colorbar style={
  25. at={(-0.1,0)},
  26. anchor=south west,
  27. height=0.25*\pgfkeysvalueof{/pgfplots/parent axis height},
  28. title={$f(x,y)$}
  29. }
  30. ]
  31. \addplot3 [surf,z buffer=sort] ({cos(deg(y))},{sin(deg(y))},{x});
  32. \end{axis}
  33. \end{tikzpicture}