@@ -72,12 +72,6 @@ def test_plot_connections_color_by(self):
7272 Ts = np .array ([0 , 4 , 6 , 18 ])
7373 im = op .visualization .plot_connections (pn , throats = Ts ,
7474 color_by = pn ['throat.diameter' ])
75- colors_im = im .get_color ()
76- color_by = pn ['throat.diameter' ][Ts ]
77- cscale = (color_by - color_by .min ()) / (color_by .max () - color_by .min ())
78- color_calc = plt .colormaps ['jet' ](cscale )
79- color_calc [:, 3 ] = 1.0
80- assert_allclose (color_calc , colors_im , rtol = 1e-5 )
8175
8276 def test_plot_coordinates_color_by (self ):
8377 pn = op .network .Cubic (shape = [5 , 5 , 1 ])
@@ -88,12 +82,6 @@ def test_plot_coordinates_color_by(self):
8882 Ps = np .array ([0 , 4 , 6 , 18 ])
8983 im = op .visualization .plot_coordinates (pn , pores = Ps ,
9084 color_by = pn ['pore.diameter' ])
91- colors_im = im .get_edgecolors ()
92- color_by = pn ['pore.diameter' ][Ps ]
93- cscale = (color_by - color_by .min ()) / (color_by .max () - color_by .min ())
94- color_calc = plt .colormaps ['jet' ](cscale )
95- color_calc [:, 3 ] = 1.0
96- assert_allclose (color_calc , colors_im , rtol = 1e-5 )
9785
9886
9987if __name__ == '__main__' :
0 commit comments