nesticot commited on
Commit
8d537d3
·
1 Parent(s): 92c1a9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -24
app.py CHANGED
@@ -573,34 +573,39 @@ def server(input, output, session):
573
  colour_df[[0],[1]] = 'white'
574
  colour_df[[1],[1]] = 'white'
575
 
576
- if df_combined_t.values[[10],[1]] < 0:
577
- if df_combined_t.values[[10],[0]] < 0:
578
- if df_combined_t.values[[10],[1]] < 0:
579
- cmap_flip = matplotlib.colors.LinearSegmentedColormap.from_list("", ["#FBBC04","white","#4285F4"])
580
- norm = Normalize(vmin=-1.2, vmax=-0.8)
581
- colour_df[[10],[0]] = tuple(cmap_flip(norm(df_combined_t.values[[10],[0]] / df_combined_t.values[[10],[1]])))
582
- else:
583
- norm = Normalize(vmin=0.8, vmax=1.2)
584
- colour_df[[10],[0]] = tuple(colormap(norm(-df_combined_t.values[[10],[0]] / df_combined_t.values[[10],[1]])))
585
- else:
586
- norm = Normalize(vmin=0.8, vmax=1.2)
587
- colour_df[[10],[0]] = tuple(colormap(norm(df_combined_t.values[[10],[0]] / df_combined_t.values[[10],[1]])))
588
 
 
 
 
 
589
 
 
 
 
 
 
 
 
 
 
590
 
591
- if df_combined_t.values[[10],[2]] < 0:
592
- if df_combined_t.values[[10],[1]] < 0:
593
- if df_combined_t.values[[10],[1]] < 0:
594
- cmap_flip = matplotlib.colors.LinearSegmentedColormap.from_list("", ["#FBBC04","white","#4285F4"])
595
- norm = Normalize(vmin=-1.2, vmax=-0.8)
596
- colour_df[[10],[1]] = tuple(cmap_flip(norm(df_combined_t.values[[10],[1]] / df_combined_t.values[[10],[2]])))
597
- else:
598
- norm = Normalize(vmin=0.8, vmax=1.2)
599
- colour_df[[10],[1]] = tuple(colormap(norm(-df_combined_t.values[[10],[1]] / df_combined_t.values[[10],[2]])))
600
- else:
601
- norm = Normalize(vmin=0.8, vmax=1.2)
602
- colour_df[[10],[1]] = tuple(colormap(norm(df_combined_t.values[[10],[1]] / df_combined_t.values[[10],[2]])))
603
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
604
  ax1 = plt.subplot(1,3,1)
605
  ax2 = plt.subplot(3,3,2)
606
  ax3 = plt.subplot(3,3,5)
 
573
  colour_df[[0],[1]] = 'white'
574
  colour_df[[1],[1]] = 'white'
575
 
 
 
 
 
 
 
 
 
 
 
 
 
576
 
577
+ if df_combined_t.values[[10],[0]] < 0 and df_combined_t.values[[10],[1]] < 0:
578
+ cmap_flip = matplotlib.colors.LinearSegmentedColormap.from_list("", ["#FBBC04","white","#4285F4"])
579
+ norm = Normalize(vmin=0.8, vmax=1.2)
580
+ colour_df[[10],[0]] = tuple(cmap_flip(norm(df_combined_t.values[[10],[0]] / df_combined_t.values[[10],[1]])))
581
 
582
+ elif df_combined_t.values[[10],[0]] < 0 and df_combined_t.values[[10],[1]] > 0:
583
+ #cmap_flip = matplotlib.colors.LinearSegmentedColormap.from_list("", ["#FBBC04","white","#4285F4"])
584
+ norm = Normalize(vmin=-1.2, vmax=-0.8)
585
+ colour_df[[10],[0]] = tuple(colormap(norm(df_combined_t.values[[10],[0]] / df_combined_t.values[[10],[1]])))
586
+
587
+ elif df_combined_t.values[[10],[0]] > 0 and df_combined_t.values[[10],[1]] < 0:
588
+ cmap_y = matplotlib.colors.LinearSegmentedColormap.from_list("", ["white","#FBBC04"])
589
+ norm = Normalize(vmin=0, vmax=1)
590
+ colour_df[[10],[0]] = tuple(cmap_y(norm(df_combined_t.values[[10],[0]] - df_combined_t.values[[10],[1]])))
591
 
 
 
 
 
 
 
 
 
 
 
 
 
592
 
593
+ if df_combined_t.values[[10],[1]] < 0 and df_combined_t.values[[10],[2]] < 0:
594
+ cmap_flip = matplotlib.colors.LinearSegmentedColormap.from_list("", ["#FBBC04","white","#4285F4"])
595
+ norm = Normalize(vmin=0.8, vmax=1.2)
596
+ colour_df[[10],[1]] = tuple(cmap_flip(norm(df_combined_t.values[[10],[1]] / df_combined_t.values[[10],[2]])))
597
+
598
+ elif df_combined_t.values[[10],[1]] < 0 and df_combined_t.values[[10],[2]] > 0:
599
+ #cmap_flip = matplotlib.colors.LinearSegmentedColormap.from_list("", ["#FBBC04","white","#4285F4"])
600
+ norm = Normalize(vmin=-1.2, vmax=-0.8)
601
+ colour_df[[10],[1]] = tuple(colormap(norm(df_combined_t.values[[10],[1]] / df_combined_t.values[[10],[2]])))
602
+
603
+ elif df_combined_t.values[[10],[1]] > 0 and df_combined_t.values[[10],[2]] < 0:
604
+ cmap_y = matplotlib.colors.LinearSegmentedColormap.from_list("", ["white","#FBBC04"])
605
+ norm = Normalize(vmin=0, vmax=1)
606
+ colour_df[[10],[1]] = tuple(cmap_y(norm(df_combined_t.values[[10],[1]] - df_combined_t.values[[10],[2]])))
607
+
608
+
609
  ax1 = plt.subplot(1,3,1)
610
  ax2 = plt.subplot(3,3,2)
611
  ax3 = plt.subplot(3,3,5)