[pstricks] Trouble with \psSurface and direction of the hue
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Sat Oct 30 13:57:36 CEST 2010
Am 30.10.2010 10:20, schrieb David Tarazona:
> Hello, my problem is this
> I'm sure you've seen the graphs generated by matlab using the surf command
> that works like \ psSurface. My problem is that I couldnt change the hue
> will not appear on the X axis, ie if i see a XY view is that the gradient is
> about the X but I could not find a way to make the be degraded on the Y axis
> or Z axis (which is how it shows matlab).
> thanks to solve my doubt.
> Another issue than I have is that i want the same hue/gradient/degraded for
> 2 faces of the surface... The code of my function is:
please provide full working examples, not only fragments.
> \psSurface
> [ngrid=72 72,linewidth=0.01pt,algebraic,hue=0
> 1](-3.1416,-3.1416)(3.1416,3.1416)
> {(3-2*cos(x+y)-2*cos(x)+2*cos(y))^(1/2)}
>
> if you see on the surface there are two "sub-peaks".If you graph this on
> matlab you'll see that the "sub-peaks" can be easily differentiated of the
> other parts of the surface like the maximum values thanks to the "color
> gradient" through the Z axis, not through the X or Y axis, i mean, on matlab
> you'll see by default the 2 sub-peaks on blue and the maximum values on
> red...
>
> I hope you understand what I mean...
no, I have no matlab ...
Maybe, that your are looking for something like this:
\documentclass{minimal}
\usepackage{pst-eucl,pst-solides3d}
\begin {document}
\psset{Decran=20}
\begin{pspicture}(-5,-3)(5,5)
\psSurface[ngrid=72 72,linewidth=0.01pt,algebraic,
tablez=0.5 .1 3.5 {} for,
zcolor=(Red) (Blue)](-3.1416,-3.1416)(3.1416,3.1416)%
{(3-2*cos(x+y)-2*cos(x)+2*cos(y))^(1/2)}
\end{pspicture}
\end{document}
Herbert
More information about the PSTricks
mailing list