In [2]:
%matplotlib notebook
import matplotlib.pyplot as plt

In [3]:
import numpy as np

In [4]:
def rectify(x): return np.maximum(0, x)

In [5]:
r = np.linspace(0,1,1000)
g = np.linspace(0,1,1000)

In [10]:
plt.plot(r, rectify(r-.3) + rectify())


Out[10]:
[<matplotlib.lines.Line2D at 0x109009128>]

In [ ]: