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