def plot(self, *args, **kwargs): """ If the **mantid3d** projection is chosen, it can be used the same as :py:meth:`matplotlib.axes.Axes3D.plot` 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.plot(workspace) #for workspaces ax.plot(x,y,z) #for arrays fig.show() For keywords related to workspaces, see :func:`plotfunctions3D.plot3D` """ if helperfunctions.validate_args(*args): logger.debug('using plotfunctions3D') return plotfunctions3D.plot(self, *args, **kwargs) else: return Axes3D.plot(self, *args, **kwargs)
def test_3d_plot(self): fig = plt.figure() ax = fig.add_subplot(111, projection='mantid3d') funcs.plot(ax, self.ws2d_histo, 'rs', specNum=1) funcs.plot(ax, self.ws2d_histo, specNum=2) funcs.plot(ax, self.ws_MD_1d)