From 05b23028f38d1112cb93d2b514a8ae6a13431ed3 Mon Sep 17 00:00:00 2001 From: "ashiqguntupalli@gmail.com" Date: Fri, 21 Feb 2025 22:13:49 +0100 Subject: [PATCH] feat: path added for show method in single object --- src/spectramap/spectramap.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/spectramap/spectramap.py b/src/spectramap/spectramap.py index a2136dc..baa7df1 100644 --- a/src/spectramap/spectramap.py +++ b/src/spectramap/spectramap.py @@ -580,12 +580,17 @@ def spikes_filter(self, limit=7, size=5): self.data = result print('Done') - def show(self, tittle= 'single', method=True): + def show(self, tittle= 'single', method=True, path=None, show=True): plt.figure() plt.plot(self.wavenumber, self.data) plt.xlabel('Wavenumber (cm-1)') plt.ylabel('Intensity (a.u.)') plt.title(self.name) + if show: + plt.show() + if path is not None: + plt.savefig(path) + def get_intensity(self, wavenumber): """