From dfeff57244b2d25c135a75e326140794dc4417b4 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 29 Nov 2023 09:41:37 +0100 Subject: modernize plotting a bit Use the "object-oriented" interface, fix image size, etc. --- algorithms/params.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'algorithms/params.py') diff --git a/algorithms/params.py b/algorithms/params.py index 787cfd1..486cb0e 100644 --- a/algorithms/params.py +++ b/algorithms/params.py @@ -132,12 +132,10 @@ class AlgorithmParameters: ys = [y * units.get_factor() for y in ys] plot_builder = PlotBuilder() - plot_builder.show_grid() - plot_builder.set_xlabel(self._format_plot_xlabel()) - plot_builder.set_ylabel(self._format_plot_ylabel(units)) - #plot_builder.set_yticklabels_scientific() - plot_builder.set_title(self._format_plot_title()) - plot_builder.plot(xs, ys) + title = self._format_plot_title() + xlabel = self._format_plot_xlabel() + ylabel = self._format_plot_ylabel(units) + plot_builder.plot(title, xlabel, ylabel, xs, ys) if output_path is None: plot_builder.show() else: -- cgit v1.2.3