Beispiel #1
0
 def test_is_colorbar(self):
     """Verify the functionality of _is_colorbar, which determines whether a set of axes is a colorbar."""
     ws = CreateSampleWorkspace()
     fig = plt.figure()
     fig = functions.plot_surface([ws], fig=fig)
     axes = fig.get_axes()
     # First set of axes is the surface plot
     self.assertFalse(WorkbenchNavigationToolbar._is_colorbar(axes[0]))
     # Second set of axes is the colorbar
     self.assertTrue(WorkbenchNavigationToolbar._is_colorbar(axes[1]))
Beispiel #2
0
 def _get_toolbar(self, canvas, parent):
     return WorkbenchNavigationToolbar(canvas, parent, False)