def test_largePercentThreshold(self): """Test select_colormap returns diverging color map for larger threshold""" cmap = maps.selectColormap([-7, 10], percent=0.2) self.assertColorMapEqual(cmap, self.diverging_cmap)
def test_symmetricDataDiverges(self): """Test symmetric data range (around 0) returns divergent color map""" cmap = maps.selectColormap([-1, 1]) self.assertColorMapEqual(cmap, self.diverging_cmap)
def test_sequentialData(self): """Test asymmetric data range returns sequential color map""" cmap = maps.selectColormap([0, 1]) self.assertColorMapEqual(cmap, self.sequential_cmap)
def test_returnsCmap(self): """Test select_colormap returns a cmap object""" cmap = maps.selectColormap([-1, 1]) self.assertIsInstance(cmap, LinearSegmentedColormap)