[pstricks] [Help]How to draw a piecewise function with pst-plot

jungleman ustcrevolutionary at gmail.com
Sun Jul 11 06:36:14 CEST 2010


Hi all,

I'm trying to use pstricks to plot some functions with pstricks in LaTex.
And now some problems have occurred to me.

Here's a piecewise function or subfunction f(x):
        f(x) = 1   while x <= 0
        f(x) = 0   while x >  0
and I tried to use pst-plot : \psline[linecolor=red](-3,1)(0,1)
                                     \psline[linecolor=red](0,0)(4,0)
but I donnot know how to make the coordinate (0,0) to be a hollow dot, while
(0,1) is a solid dot.

And another problem is that I also tried the IfTE : \psplot{-3}{4}{
ifTE(x>0,0,1) }, but pstricks tried to connect the line y=0 and the line y=1
to be a continuous line.

Can anyone tell me how to fix the problem, thanks very much.

A newfish to LaTex and PSTricks.

-- 
Stay hungry,  stay foolish !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/pstricks/attachments/20100711/63f058fc/attachment.html>


More information about the PSTricks mailing list