[plotter] add ytransform option in plot function

This commit is contained in:
Noe Brucy
2021-01-31 11:12:21 +01:00
parent 3070ab8caa
commit 8befb9ba37
+4
View File
@@ -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: