[Matplotlib-devel] mpl2.0b title of subplot overprinting
Neal Becker
ndbecker2 at gmail.com
Thu Jun 2 11:13:44 EDT 2016
Neal Becker wrote:
> This was produced with all default settings
>
> ,----[ /home/nbecker/anaconda3/envs/py35/interference/test_mpl.py ]
> | #!/usr/bin/python3
> | import numpy as np
> | import matplotlib.pyplot as plt
> | #import seaborn
> | fig, axs = plt.subplots (2, 1)
> |
> | x = np.arange (-1, 1, 0.1)
> | axs[0].plot (x, x**2)
> | axs[0].set_title ('y1')
> |
> | axs[1].plot (x, -x**2)
> | axs[1].set_title ('spectrum of product')
> |
> | plt.suptitle (r'${E_s/N_0}_1=%g, {E_s/N_0}_2=%g$'%(100,100))
> | # axs[0].grid()
> | # axs[1].grid()
> | #plt.tight_layout()
> | plt.show()
> `----
Adding plt.tight_layout() makes the axs[0] title overprint the suptitle
More information about the Matplotlib-devel
mailing list