def test_3d_contour(self): fig = plt.figure() ax = fig.add_subplot(111, projection='mantid3d') funcs.contour(ax, self.ws2d_histo_rag) funcs.contourf(ax, self.ws2d_histo, vmin=0) self.assertRaises(ValueError, funcs.contour, ax, self.ws2d_point_uneven)
def contourf(self, *args, **kwargs): """ If the **mantid3d** projection is chosen, it can be used the same as :py:meth:`matplotlib.axes.Axes3D.contourf` for arrays, or it can be used to plot :class:`mantid.api.MatrixWorkspace` or :class:`mantid.api.IMDHistoWorkspace`. You can have something like:: import matplotlib.pyplot as plt from mantid import plots ... fig, ax = plt.subplots(subplot_kw={'projection':'mantid3d'}) ax.contourf(workspace) #for workspaces ax.contourf(x,y,z) #for arrays fig.show() For keywords related to workspaces, see :func:`plotfunctions3D.contourf` """ if helperfunctions.validate_args(*args): logger.debug('using plotfunctions3D') return plotfunctions3D.contourf(self, *args, **kwargs) else: return Axes3D.contourf(self, *args, **kwargs)