psplot and this function

Denis Girou Denis.Girou at
Mon Sep 11 23:19:46 CEST 2000

This is the PSTricks mailing list, devoted to discussions about computational
graphics in (La)TeX using the PSTricks package from Timothy van Zandt.
For help using this mailing list, see instructions at the end of message.

>>>>> "Bastian.Kruse" == KRUSE BASTIAN <W3KRUS01 at> writes:

    Bastian.Kruse> i wanted to plot this function
    Bastian.Kruse> \frac{0.08*e^{-x}-(1-0.08)^16*0.08*e^{-x*17)}{1-(1-0.08)*e{-x}}
    Bastian.Kruse> Guess I have to use 2.71828 instead of e, cause postscript doesn at t 
    Bastian.Kruse> know fhis.
    Bastian.Kruse> I have trouble with the e^{-x}. The minus makes me sick ? What at s the 
    Bastian.Kruse> correct input?

  PSTricks just use here the PostScript programming language. So, you must refer
here to a PostScript book. The reference one is: "PostScript Reference
Manual", Addison-Wesley. You can found some summaries and syntax descriptions
online. For instance, for the arithmetic operators you need here ("neg" and
"exp"), you can look at:


base exponent exp value 
This operator returns the value of base raised to the exponent power. 
value1 neg - value1 
This operator returns -value1.

    Bastian.Kruse> How does postscipt know when the counter ends and the denominator 
    Bastian.Kruse> starts?

  This is a postfix language using the so-called Polish notation (not
"natural" for humans, but easy to handle by an automatic process like
a computer program). Denominator end when the heap is empty.

  So what you are looking for is something like that (you must check it...):






    \psplot{-0.2}{5}{0.08 2.71828 x neg exp mul             % 0.08*e^{-x}
                     1 0.08 sub 16 exp 0.08 mul             % (1-0.08)^{16}*0.08
                     2.71828 x neg 17 mul exp               % e^{-x*17)
                     mul sub
                     1 1 0.08 sub 2.71828 x neg exp mul sub % 1-(1-0.08)*e^{-x}



The list interface (subscription, information, access to the archives) is on:
Otherway to unsubscribe, send mail to pstricks-request at
with a blank subject and in body the line unsubscribe <email-address>

More information about the PSTricks mailing list