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