Reset the margins in the layoutboxes of *fig*. Margins are usually set as a minimum, so if the figure gets smaller the minimum needs to be zero in order for it to grow again.
(layoutgrids, fig)
| 793 | |
| 794 | |
| 795 | def reset_margins(layoutgrids, fig): |
| 796 | """ |
| 797 | Reset the margins in the layoutboxes of *fig*. |
| 798 | |
| 799 | Margins are usually set as a minimum, so if the figure gets smaller |
| 800 | the minimum needs to be zero in order for it to grow again. |
| 801 | """ |
| 802 | for sfig in fig.subfigs: |
| 803 | reset_margins(layoutgrids, sfig) |
| 804 | for ax in fig.axes: |
| 805 | if ax.get_in_layout(): |
| 806 | gs = ax.get_gridspec() |
| 807 | if gs in layoutgrids: # also implies gs is not None. |
| 808 | layoutgrids[gs].reset_margins() |
| 809 | layoutgrids[fig].reset_margins() |
| 810 | |
| 811 | |
| 812 | def colorbar_get_pad(layoutgrids, cax): |
no test coverage detected
searching dependent graphs…