"""
Basic usage
===========

This example presents the basic usage of brokenaxes

"""


import matplotlib.pyplot as plt
from brokenaxes import brokenaxes
import numpy as np

fig = plt.figure(figsize=(5,2))
bax = brokenaxes(xlims=((0, .1), (.4, .7)), ylims=((-1, .7), (.79, 1)), hspace=.05)
x = np.linspace(0, 1, 100)
bax.plot(x, np.sin(10 * x), label='sin')
bax.plot(x, np.cos(10 * x), label='cos')
bax.legend(loc=3)
bax.set_xlabel('time')
bax.set_ylabel('value')

[((14, 6, 14, 31), 'matplotlib.pyplot.figure', 'plt.figure', (), '', True, 'import matplotlib.pyplot as plt\n'), ((15, 6, 15, 83), 'brokenaxes.brokenaxes', 'brokenaxes', (), '', False, 'from brokenaxes import brokenaxes\n'), ((16, 4, 16, 26), 'numpy.linspace', 'np.linspace', ({(16, 16, 16, 17): '0', (16, 19, 16, 20): '1', (16, 22, 16, 25): '100'}, {}), '(0, 1, 100)', True, 'import numpy as np\n'), ((17, 12, 17, 26), 'numpy.sin', 'np.sin', ({(17, 19, 17, 25): '(10 * x)'}, {}), '(10 * x)', True, 'import numpy as np\n'), ((18, 12, 18, 26), 'numpy.cos', 'np.cos', ({(18, 19, 18, 25): '(10 * x)'}, {}), '(10 * x)', True, 'import numpy as np\n')]