From b7da79256fa691f8ea94114bdffad5f85e193e60 Mon Sep 17 00:00:00 2001 From: Lizzzka007 <gashchuk2011@mail.ru> Date: Mon, 19 Jun 2023 18:55:27 +0300 Subject: [PATCH] Version 0.2: Start diff function --- plotter/Plotter.py | 16 +++++++++++++++- setup.py | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/plotter/Plotter.py b/plotter/Plotter.py index aeff289..48bbe3e 100755 --- a/plotter/Plotter.py +++ b/plotter/Plotter.py @@ -284,6 +284,17 @@ class Plotter: print(variable_name, end=' ') print('\n') + def __plot_diff(self): + if self.data[0].data.shape != self.data[1].data.shape: + print("Data dimensions do not match") + sys.exit(-1) + + diff = {} + diff[self.var] = self.data[0][self.var] - self.data[1][self.var] + dim_variables = list(set(self.variable_names) - set(self.var)) + + + def dump(self): self.__dump() @@ -301,4 +312,7 @@ class Plotter: def ani_plot_contour(self): self.__get_min_max_bar() - self.__ani_plot_contour() \ No newline at end of file + self.__ani_plot_contour() + + def plot_diff(self): + self.__plot_diff() \ No newline at end of file diff --git a/setup.py b/setup.py index 3b5f560..1cdbf9a 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ import setuptools if __name__ == "__main__": setuptools.setup( name='plotter', - version="0.1", + version="0.2", # install_requires=[ # "numpy>=1.23.5", # "matplotlib >=3.6.2", -- GitLab