In [1]:
%pylab inline
%config InlineBackend.figure_format = 'svg'


Populating the interactive namespace from numpy and matplotlib

In [2]:
import os

def foo():
    if os.getenv('FOO_HAS_CHANGED') is None:
        return [1,2,3,4,5]
    else:
        return [1,2,3,4,6]

x = foo()
print x


[1, 2, 3, 4, 5]

In [3]:
plot(range(5), x)
axis('scaled')
xlim(0,8)
ylim(0,8)


Out[3]:
(0, 8)

In [ ]: