NumpyTensor.show¶
-
NumpyTensor.
show
(self, title=None, method='', indices=None, force_show=False, fig=None, \*\*kwargs)¶ Display the function graphically.
- Parameters
- titlestring, optional
Set the title of the figure
- methodstring, optional
1d methods:
'plot'
: graph plot'scatter'
: scattered 2d points (2nd axis <-> value)2d methods:
'imshow'
: image plot with coloring according to value, including a colorbar.'scatter'
: cloud of scattered 3d points (3rd axis <-> value)- indicesindex expression, optional
Display a slice of the array instead of the full array. The index expression is most easily created with the
numpy.s_
constructor, i.e. supplynp.s_[:, 1, :]
to display the first slice along the second axis. For data with 3 or more dimensions, the 2d slice in the first two axes at the “middle” along the remaining axes is shown (semantically[:, :, shape[2:] // 2]
). This option is mutually exclusive tocoords
.- force_showbool, optional
Whether the plot should be forced to be shown now or deferred until later. Note that some backends always displays the plot, regardless of this value.
- fig
matplotlib.figure.Figure
, optional The figure to show in. Expected to be of same “style”, as the figure given by this function. The most common use case is that
fig
is the return value of an earlier call to this function.- kwargs{‘figsize’, ‘saveto’, ‘clim’, …}, optional
Extra keyword arguments passed on to the display method. See the Matplotlib functions for documentation of extra options.
- Returns
- fig
matplotlib.figure.Figure
The resulting figure. It is also shown to the user.
- fig
See also
odl.util.graphics.show_discrete_data
Underlying implementation