[pstricks] sqrt function

Herbert Voss Herbert.Voss at alumni.TU-Berlin.DE
Sun Mar 14 20:05:26 CET 2004


Richard J. Cattien wrote:

> How do i plot the following function.
> 
> 	y = sqrt(x-2)
> 
> I always get an error:
> Error: /rangechek in --sqrt--
> Operand stack:
> 0.0    -2
> 
> I use:
> \psplot[plotpoints=200]{0}{6}{x 2 sub sqrt}
> 
> with add instead of sub everything works fine.

sure, there is no root of a negative value!

\psplot[plotpoints=200]{2}{6}{x 2 sub sqrt}

Herbert


-- 
http://www.pstricks.de/




More information about the PSTricks mailing list