def budget_plot(self, times_list, wall_units=True, fig=None, ax=None, **kwargs): if not isinstance(times_list, (float, list)): times_list = [times_list] PhyTime = None fig, ax = super()._budget_plot(PhyTime, times_list, wall_units=wall_units, fig=fig, ax=ax, **kwargs) for a, t in zip(ax, times_list): a.set_title(r"$t^*=%s$" % t, loc='right') a.relim() a.autoscale_view() handles, labels = ax[0].get_legend_handles_labels() handles = cplt.flip_leg_col(handles, 4) labels = cplt.flip_leg_col(labels, 4) fig.clegend(handles, labels, loc='upper center', bbox_to_anchor=(0.5, 0.1), ncol=4) ax[0].get_gridspec().tight_layout(fig, rect=(0, 0.1, 1, 1)) return fig, ax
def plot_integrated_budget(self, times_list, budget_terms=None, PhyTime=None, fig=None, ax=None, **kwargs): fig, ax = super().plot_integrated_budget(times_list, budget_terms, PhyTime, fig, ax, **kwargs) x_list = indexing.true_coords_from_coords(self.avg_data.CoordDF, 'x', times_list) for a, t in zip(ax, times_list): a.set_title(r"$t^*=%s$" % t, loc='right') a.relim() a.autoscale_view() handles, labels = ax[0].get_legend_handles_labels() handles = cplt.flip_leg_col(handles, 4) labels = cplt.flip_leg_col(labels, 4) fig.clegend(handles, labels, loc='upper center', bbox_to_anchor=(0.5, 0.1), ncol=4) ax[0].get_gridspec().tight_layout(fig, rect=(0, 0.1, 1, 1)) return fig, ax
def budget_plot(self, x_list, budget_terms=None, PhyTime=None, wall_units=True, fig=None, ax=None, **kwargs): PhyTime = self.avg_data.check_PhyTime(PhyTime) fig, ax = super()._budget_plot(PhyTime, x_list, budget_terms, wall_units=wall_units, fig=fig, ax=ax, **kwargs) x_list = indexing.true_coords_from_coords(self.avg_data.CoordDF, 'x', x_list) for a, x in zip(ax, x_list): title = self.Domain.in_to_out(r"$x/\delta=%.2g$" % x) a.set_title(title, loc='right') a.relim() a.autoscale_view() handles, labels = ax[0].get_legend_handles_labels() handles = cplt.flip_leg_col(handles, 4) labels = cplt.flip_leg_col(labels, 4) fig.clegend(handles, labels, loc='upper center', bbox_to_anchor=(0.5, 0.1), ncol=4) ax[0].get_gridspec().tight_layout(fig, rect=(0, 0.1, 1, 1)) return fig, ax