Ask Your Question

Revision history [back]

plot operation error

def myfn2(x): if x<0: return 1 else: return -1 plot(myfn2(x),x,-3,3,figsize=3,color="red")

The graph is only displayed as -1. Why?

click to hide/show revision 2
None

plot operation error

def myfn2(x): if x<0: return 1 else: return -1 plot(myfn2(x),x,-3,3,figsize=3,color="red")

The graph is only displayed as -1. Why?

click to hide/show revision 3
None

plot operation error

def myfn2(x): if x<0: return 1 else: return -1 plot(myfn2(x),x,-3,3,figsize=3,color="red")

The graph is only displayed as -1. Why?

click to hide/show revision 4
None

plot operation error

I'm trying to plot the following.

def myfn2(x): if x<0: return 1 else: return -1 return -1 plot(myfn2(x),x,-3,3,figsize=3,color="red")

The graph is only displayed as -1. Why?