From 8befb9ba379f0428060c9b1afe8cc591ab96b0da Mon Sep 17 00:00:00 2001 From: Noe Brucy Date: Sun, 31 Jan 2021 11:12:21 +0100 Subject: [PATCH] [plotter] add ytransform option in plot function --- plotter.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plotter.py b/plotter.py index 4c7dce3..403c539 100644 --- a/plotter.py +++ b/plotter.py @@ -945,6 +945,7 @@ class Plotter(Aggregator, BaseProcessor): yunit=None, xunit_coeff=1.0, yunit_coeff=1.0, + ytransform=None, xscale="linear", yscale="linear", fit=None, @@ -1049,6 +1050,9 @@ class Plotter(Aggregator, BaseProcessor): if isinstance(yerr, str): yerr = self.save.get_node(yerr).read() + # Apply transformations on y + if ytransform is not None: + y = ytransform(y) if smooth > 0: y = gaussian_filter1d(y, sigma=smooth) if run is not None: