make_fig_ax_square

mastml.plot_helper.make_fig_ax_square(aspect='equal', aspect_ratio=1)[source]

Method to make square shaped matplotlib figure and axes objects. Using Object Oriented interface from

https://matplotlib.org/gallery/api/agg_oo_sgskip.html

Args:

aspect: (str), ‘equal’ denotes x and y aspect will be equal (i.e. square)

aspect_ratio: (float), aspect ratio for figure and axes creation

Returns:

fig: (matplotlib fig object), a matplotlib figure object with the specified aspect ratio

ax: (matplotlib ax object), a matplotlib axes object with the specified aspect ratio