[pstricks] sqrt function

Vince McGarry vmcgarry at austin.rr.com
Sun Mar 14 19:35:12 CET 2004


Hi richard,

Your function is undefined (as a real number) when x<2.

Using \psplot[plotpoints=200]{2}{6}{x 2 sub sqrt} will work.

 
Vince McGarry
Austin Community College
Rio Grande Campus
1212 Rio Grande Street
Austin, TX  78701

Phone: (512)-223-3358
email: vince at austincc.edu
       vmcgarry at austin.rr.com


On 3/14/04 12:13 PM, "Richard J. Cattien" <rc.foreign at gmx.net> wrote:

> Hi,
> 
> 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.
> 
> thanks for every answer!
> 
> bye,
> richard




More information about the PSTricks mailing list