# Python 3.11 --  demo matplotlib three Axes in mosaic
# Provided by Anthony Vogelaar, Perth Scotland
# rev 0.10  2024-04-30  initial release

import  os;                     os.system('clear')
import  matplotlib.pyplot   as  plt

class Img1:

    def __init__(self):
        fig, axs = plt.subplot_mosaic([['A', 'C'], ['B', 'C']], figsize=(8, 4), facecolor='lightskyblue', layout='constrained')
        fig.suptitle('A nice Matplotlib Figure')
        print(axs)
        plt.show()


class Img2:

    def __init__(self):
        fig, axs = plt.subplot_mosaic([['A', 'C'], ['B', 'C']], figsize=(8, 4), facecolor='lightskyblue', layout='constrained')
        fig.suptitle('A nice Matplotlib Figure')
        for axes_nm, ax in axs.items():
            ax.set_title(f'Axes {axes_nm}', loc='left', fontstyle='oblique', fontsize='medium')
            ax.text(0.5, 0.5, axes_nm, ha='center', va='center')
        plt.show()


Img2()
