From 2ead894fa491bf7e8d6c006eadc561f219469937 Mon Sep 17 00:00:00 2001 From: Emma Dann Date: Thu, 24 Nov 2022 17:21:04 +0000 Subject: [PATCH] small fixes to plotting funcs, for notebook reproducibility --- source/Main.py | 12 ++++++------ source/TimeSeriesPreprocessor.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/Main.py b/source/Main.py index 3fd62a2..2289462 100644 --- a/source/Main.py +++ b/source/Main.py @@ -65,12 +65,12 @@ def print(self): self.landscape_obj.plot_alignment_landscape() def plotTimeSeries(self, refQueryAlignerObj, plot_cells = False, plot_mean_trend= False): - sb.scatterplot(self.S.X, self.S.Y, color = 'forestgreen' ,alpha=0.05)#, label='Ref') - sb.scatterplot(self.T.X, self.T.Y, color = 'midnightblue' ,alpha=0.05)#, label ='Query') + sb.scatterplot(x=self.S.X, y=self.S.Y, color = 'forestgreen' ,alpha=0.05)#, label='Ref') + sb.scatterplot(x=self.T.X, y=self.T.Y, color = 'midnightblue' ,alpha=0.05)#, label ='Query') # plt.legend(loc='upper left') if(plot_cells): - sb.scatterplot(refQueryAlignerObj.ref_time, np.asarray(refQueryAlignerObj.ref_mat[self.gene]), color = 'forestgreen' ) - sb.scatterplot(refQueryAlignerObj.query_time, np.asarray(refQueryAlignerObj.query_mat[self.gene]), color = 'midnightblue' ) + sb.scatterplot(x=refQueryAlignerObj.ref_time, y=np.asarray(refQueryAlignerObj.ref_mat[self.gene]), color = 'forestgreen' ) + sb.scatterplot(x=refQueryAlignerObj.query_time, y=np.asarray(refQueryAlignerObj.query_mat[self.gene]), color = 'midnightblue' ) plt.title(self.gene) plt.xlabel('pseudotime') plt.ylabel('log1p expression') @@ -79,8 +79,8 @@ def plotTimeSeries(self, refQueryAlignerObj, plot_cells = False, plot_mean_trend self.plot_mean_trends() def plotTimeSeriesAlignment(self): - sb.scatterplot(self.S.X, self.S.Y, color = 'forestgreen' ,alpha=0.05)#, label='Ref') - sb.scatterplot(self.T.X, self.T.Y, color = 'midnightblue' ,alpha=0.05)#, label ='Query') + sb.scatterplot(x=self.S.X, y=self.S.Y, color = 'forestgreen' ,alpha=0.05)#, label='Ref') + sb.scatterplot(x=self.T.X, y=self.T.Y, color = 'midnightblue' ,alpha=0.05)#, label ='Query') # plt.legend(loc='upper left') self.plot_mean_trends() plt.title(self.gene) diff --git a/source/TimeSeriesPreprocessor.py b/source/TimeSeriesPreprocessor.py index cf56925..580d407 100644 --- a/source/TimeSeriesPreprocessor.py +++ b/source/TimeSeriesPreprocessor.py @@ -19,7 +19,7 @@ def __init__(self, time_points, mean_trend, std_trend, data_bins, X,Y, cell_dens self.intpl_stds = None def plot_mean_trend(self, color='blue'): - sb.lineplot(self.time_points, self.mean_trend, linewidth=3, color=color) + sb.lineplot(x=self.time_points, y=self.mean_trend, linewidth=3, color=color) def reverse_time_series(self):