def test_2d_pcolors(self): fig, ax = plt.subplots() funcs.pcolor(ax, self.ws2d_histo_rag) funcs.tripcolor(ax, self.ws2d_histo, vmin=0) funcs.pcolormesh(ax, self.ws_MD_2d) funcs.pcolorfast(ax, self.ws2d_point_uneven, vmin=-1) funcs.imshow(ax, self.ws2d_histo)
def tripcolor(self, *args, **kwargs): """ If the **mantid** projection is chosen, it can be used the same as :py:meth:`matplotlib.axes.Axes.tripcolor` 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':'mantid'}) ax.tripcolor(workspace) #for workspaces ax.tripcolor(x,y,C) #for arrays fig.show() For keywords related to workspaces, see :func:`plotfunctions.tripcolor` """ if helperfunctions.validate_args(*args): logger.debug('using plotfunctions') workspace = args[0] return self.track_workspace_artist(workspace, plotfunctions.tripcolor(self, *args, **kwargs)) else: return Axes.tripcolor(self, *args, **kwargs)
def tripcolor(self, *args, **kwargs): """ If the **mantid** projection is chosen, it can be used the same as :py:meth:`matplotlib.axes.Axes.tripcolor` 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':'mantid'}) ax.tripcolor(workspace) #for workspaces ax.tripcolor(x,y,C) #for arrays fig.show() For keywords related to workspaces, see :func:`plotfunctions.tripcolor` """ if helperfunctions.validate_args(*args): logger.debug('using plotfunctions') workspace = args[0] return self.track_workspace_artist( workspace, plotfunctions.tripcolor(self, *args, **kwargs)) else: return Axes.tripcolor(self, *args, **kwargs)