def _new_plot(self): # Private method to set up a new plot. # Returns the figure and axes. opt = self.plot_options fig = plt.figure() ax = fig.add_subplot(1, 1, 1) pm.plot_ticks(opt.xticks, opt.yticks, ax) pm.plot_labels(opt.xlabel, opt.ylabel, opt.plot_title, opt.title_position) pm.plot_limits(ax, opt.plot_limits) pm.appearance(self.__class__.__name__) return fig, ax
def _new_plot(self): # Private method to set up a new plot. # Returns the figure and axes. opt = self.plot_options fig = plt.figure() ax = fig.add_subplot(1, 1, 1) pm.plot_ticks(opt.xticks, opt.yticks, ax) pm.plot_labels(opt.xlabel, opt.ylabel, opt.plot_title) pm.plot_limits(ax, opt.plot_limits) style_sheet = "./styles/{}.mplstyle".format(self.__class__.__name__) pm.appearance(style_sheet) return fig, ax