@@ -237,11 +237,13 @@ def label(ax, s):
237237 ax .get_yaxis ().set_visible (False )
238238
239239 ax = axes ['lightness-deltas' ]
240- ax .plot (x [1 :], N * np .diff (JKapbp [:, 0 ]))
240+ ax .axhline (0 , linestyle = "--" , color = "grey" )
241+ lightness_deltas = N * np .diff (JKapbp [:, 0 ])
242+ ax .plot (x [1 :], lightness_deltas )
241243 label (ax ,
242244 "Perceptual lightness deltas (total: %0.2f)"
243- % (JKapbp [ - 1 , 0 ] - JKapbp [ 0 , 0 ] ))
244- ax .set_ylim (0 , ax .get_ylim ()[1 ])
245+ % (np . sum ( np . abs ( lightness_deltas )) / N , ))
246+ # ax.set_ylim(0, ax.get_ylim()[1])
245247 ax .get_xaxis ().set_visible (False )
246248
247249 # ax = axes['lightness']
@@ -456,6 +458,7 @@ def __init__(self, min_JK=15, max_JK=95, xp=None, yp=None):
456458 ax_btn_props = plt .axes ([0.81 , 0.1 , 0.1 , 0.025 ])
457459 self .btn_props = Button (ax_btn_props , 'Properties' )
458460 self .btn_props .on_clicked (self .show_viscm )
461+ self .prop_windows = []
459462
460463 axcolor = 'None'
461464 ax_jk_min = plt .axes ([0.1 , 0.1 , 0.5 , 0.03 ], axisbg = axcolor )
@@ -566,7 +569,7 @@ def show_viscm(self, event):
566569 cm = LinearSegmentedColormap .from_list (
567570 'test_cm' ,
568571 self .cmap_model .get_sRGB (num = 64 )[0 ])
569- viscm (cm , name = 'test_cm' , show_gamut = False )
572+ self . prop_windows . append ( viscm (cm , name = 'test_cm' ) )
570573 plt .show ()
571574
572575 def _jk_update (self , val ):
0 commit comments