|
8 | 8 | Please see also the :ref:`axes_grid_examples` section, and the following three |
9 | 9 | examples: |
10 | 10 |
|
11 | | - - :doc:`/gallery/subplots_axes_and_figures/zoom_inset_axes` |
12 | | - - :doc:`/gallery/axes_grid1/inset_locator_demo` |
13 | | - - :doc:`/gallery/axes_grid1/inset_locator_demo2` |
| 11 | +- :doc:`/gallery/subplots_axes_and_figures/zoom_inset_axes` |
| 12 | +- :doc:`/gallery/axes_grid1/inset_locator_demo` |
| 13 | +- :doc:`/gallery/axes_grid1/inset_locator_demo2` |
14 | 14 | """ |
15 | 15 | import matplotlib.pyplot as plt |
16 | 16 | import numpy as np |
17 | 17 |
|
18 | | -# Fixing random state for reproducibility |
19 | | -np.random.seed(19680801) |
20 | | - |
| 18 | +np.random.seed(19680801) # Fixing random state for reproducibility. |
21 | 19 |
|
22 | 20 | # create some data to use for the plot |
23 | 21 | dt = 0.001 |
|
37 | 35 | # this is an inset axes over the main axes |
38 | 36 | right_inset_ax = fig.add_axes([.65, .6, .2, .2], facecolor='k') |
39 | 37 | right_inset_ax.hist(s, 400, density=True) |
40 | | -right_inset_ax.set_title('Probability') |
41 | | -right_inset_ax.set_xticks([]) |
42 | | -right_inset_ax.set_yticks([]) |
| 38 | +right_inset_ax.set(title='Probability', xticks=[], yticks=[]) |
43 | 39 |
|
44 | 40 | # this is another inset axes over the main axes |
45 | 41 | left_inset_ax = fig.add_axes([.2, .6, .2, .2], facecolor='k') |
46 | 42 | left_inset_ax.plot(t[:len(r)], r) |
47 | | -left_inset_ax.set_title('Impulse response') |
48 | | -left_inset_ax.set_xlim(0, 0.2) |
49 | | -left_inset_ax.set_xticks([]) |
50 | | -left_inset_ax.set_yticks([]) |
| 43 | +left_inset_ax.set(title='Impulse response', xlim=(0, .2), xticks=[], yticks=[]) |
51 | 44 |
|
52 | 45 | plt.show() |
0 commit comments