Exemple #1
0
 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)
Exemple #2
0
 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)
Exemple #3
0
 def test_sequentialData(self):
     """Test asymmetric data range returns sequential color map"""
     cmap = maps.selectColormap([0, 1])
     self.assertColorMapEqual(cmap, self.sequential_cmap)
Exemple #4
0
 def test_returnsCmap(self):
     """Test select_colormap returns a cmap object"""
     cmap = maps.selectColormap([-1, 1])
     self.assertIsInstance(cmap, LinearSegmentedColormap)