In [1]:
%matplotlib inline

In [2]:
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np

In [3]:
x = np.arange(0, 2 * np.pi, 0.1)
y = np.sin(x)

In [4]:
plt.plot(x, y)
plt.savefig('data/dst/matplotlib_style_default.png')
plt.show()



In [5]:
with plt.style.context('classic'):
    plt.plot(x, y)
    plt.savefig('data/dst/matplotlib_style_classic.png')
    plt.show()



In [6]:
# mpl.rcParams['axes.autolimit_mode'] = 'round_numbers'
mpl.rcParams['axes.xmargin'] = 0
mpl.rcParams['axes.ymargin'] = 0

plt.plot(x, y)
plt.savefig('data/dst/matplotlib_style_change_axes_margin.png')
plt.show()