MeasurementVisualization2D
MeasurementVisualization2D#
- class abtem.visualize.MeasurementVisualization2D(measurements, ax=None, cbar=False, cmap=None, vmin=None, vmax=None, power=1.0, common_scale=False, explode=False, figsize=None, interact=False)[source]#
Bases:
abtem.visualize.BaseMeasurementVisualization2DShow the image(s) using matplotlib.
- Parameters
measurements (_BaseMeasurement2D) –
ax (matplotlib.axes.Axes, optional) – If given the plots are added to the axis. This is not available for image grids.
cmap (str, optional) – Matplotlib colormap name used to map scalar data to colors. Ignored if image array is complex.
power (float) – Show image on a power scale.
vmin (float, optional) – Minimum of the intensity color scale. Default is the minimum of the array values.
vmax (float, optional) – Maximum of the intensity color scale. Default is the maximum of the array values.
common_scale (bool, optional) – If True all images in an image grid are shown on the same colorscale, and a single colorbar is created (if it is requested). Default is False.
cbar (bool, optional) – Add colorbar(s) to the image(s). The position and size of the colorbar(s) may be controlled by passing keyword arguments to mpl_toolkits.axes_grid1.axes_grid.ImageGrid through image_grid_kwargs.
- __init__(measurements, ax=None, cbar=False, cmap=None, vmin=None, vmax=None, power=1.0, common_scale=False, explode=False, figsize=None, interact=False)[source]#
Methods
__init__(measurements[, ax, cbar, cmap, ...])add_area_indicator(area_indicator[, panel])adjust_axes_position(rect)adjust_figure_aspect()adjust_tight_bbox()animate([interval, blit, repeat, adjust_scale])axis_off([spines])get_global_vmin_vmax([vmin, vmax])- rtype
tuple[float,float]
set_artists()set_axes_padding([padding])Set the padding between the axes in an
AxesGrid.set_cbar_labels([label])set_cbar_padding([padding])set_cbar_size(fraction)set_cbar_spacing(spacing)set_cbars(**kwargs)set_column_titles([titles, pad, format, ...])set_ensemble_indices([indices])Set the indices into the ensemble dimensions to select the visualized ensemble members.
set_extent([extent])set_normalization([power, vmin, vmax])set_panel_labels([labels, frameon, loc, ...])set_row_titles([titles, shift, format, units])Set the titles for the rows of the grid of axes.
set_scale_units([units])set_scalebars([panel_loc, label, size, loc, ...])set_xlabels([label])set_xlim()set_xunits([units])Set the units for the x-axis.
set_ylabels([label])set_ylim()set_yunits([units])Set the units for the y-axis.
update_artists()update_panel_labels()Attributes
artistsautoscaleaxesaxes_typesfigindicesmeasurementsncolsnrowswidgets- set_axes_padding(padding=(0.0, 0.0))#
Set the padding between the axes in an
AxesGrid.- Parameters
padding (float or tuple of float) – The padding along columns and rows.
- set_ensemble_indices(indices=())#
Set the indices into the ensemble dimensions to select the visualized ensemble members. Interactive visualization are updated.
- Parameters
indices (int or tuple of int) –
- set_row_titles(titles=None, shift=0.0, format='.3g', units=None, **kwargs)#
Set the titles for the rows of the grid of axes.
- Parameters
titles (str or list of str, optional) – If given as list, each item is given as a title for a row, the list must have the same length as the number of rows. If given as string the same title is given to all rows. If not given the titles are derived from the axes metadata.
shift (float, optional) – Horizontal shift of the title positions.
format (str, optional) – String formatting of titles derived from axes metadata.
units (str, optional) – The units used for titles derived from axes metadata.
- set_xunits(units=None)#
Set the units for the x-axis.
- Parameters
units (str) – The name of the units. Must be compatible with existing units.
- set_yunits(units=None)#
Set the units for the y-axis.
- Parameters
units (str) – The name of the units. Must be compatible with existing units.