Am Dienstag 10 Juni 2008 21:15 schrieb Dan Reinholz:
> My question this time is what is the preferred method
> to plot a piecewise function?
As Alan said you can plot the pieces separately. Another possibility is to
define your function as in python and then plot this function as below.
# 
def f(x):
if x<0: return 1
else: return 1+x
g = graph.graphxy(width=8, x=graph.axis.linear(min=2, max=2),
y=graph.axis.linear(min=0, max=3))
g.plot(graph.data.function("y(x)=f(x)", context=locals()))
# 
Ciao,
Stefan
