On Mon, Jan 21, 2013 at 4:28 AM, Kelson Zawack <kb...@co...> wrote:
> a heat map and want to label each row. I thus need the font
> size of the text to scale with the number of rows in the heat map. Is
>
Assuming you start out with this:
import matplotlib.pyplot as plt
fig, ax1 = plt.subplots()
You can then do this:
figsize = fig.get_size_inches()
ax_pos = ax1.get_position().get_points()
The variable figsize is now a array of the figure's width and height. And
ax_pos is an array with the first row being the x-y location of the lower
left corner of the axes on the figure in figure fraction coordinates. The
second row is the width and height of the axes, again expressed as a
fraction of the total figure dimensions.
Hope that helps,
-paul
|