def __createPlotContext(cls, shell_context, data_gatherer, key): """ :type shell_context: ShellContext :param data_gatherer: PlotDataGatherer :param key: str """ figure = plt.figure() figure.set_tight_layout(True) cases = shell_context["plot_settings"].getCurrentPlotCases() plot_config = PlotConfig(key) plot_config.copyConfigFrom(shell_context["plot_settings"].plotConfig()) if plot_config.isUnnamed(): plot_config.setTitle(key) plot_context = PlotContext(shell_context.ert(), figure, plot_config, cases, key, data_gatherer) return plot_context
def _createPlotContext(cls, shell_context, data_gatherer, key): """ :type shell_context: ShellContext :param data_gatherer: PlotDataGatherer :param key: str """ figure = plt.figure() figure.set_tight_layout(True) cases = shell_context["plot_settings"].getCurrentPlotCases() plot_config = PlotConfig(key) #plot settings should keep of track of single attributes and only apply the changed ones... plot_config.copyConfigFrom(shell_context["plot_settings"].plotConfig()) if plot_config.isUnnamed(): plot_config.setTitle(key) #Apply data type specific changes for statistics... PlotConfigFactory.updatePlotConfigForKey(shell_context.ert(), key, plot_config) plot_context = PlotContext(shell_context.ert(), figure, plot_config, cases, key, data_gatherer) return plot_context