abtem.visualize.artists#
Module Contents#
Classes#
Create a collection of circles with radii scaled by the data. |
|
Functions#
API#
- class abtem.visualize.artists.Artist1D(...)[source]#
Bases:
abtem.visualize.artists.ArtistInitialization
- class abtem.visualize.artists.Artist2D(...)[source]#
Bases:
abtem.visualize.artists.ArtistInitialization
- abstract property num_cbars#
- class abtem.visualize.artists.DomainColoringArtist(...)[source]#
Bases:
abtem.visualize.artists.Artist2DInitialization
- property amplitude_axes_image#
- property amplitude_norm#
- num_cbars#
2
- property phase_axes_image#
- class abtem.visualize.artists.ImageArtist(...)[source]#
Bases:
abtem.visualize.artists.Artist2DInitialization
- property axes_image#
- property norm#
- num_cbars#
1
- class abtem.visualize.artists.LinesArtist(...)[source]#
Bases:
abtem.visualize.artists.Artist1DInitialization
- num_cbars#
0
- class abtem.visualize.artists.OverlayImshowArtist(...)[source]#
Bases:
abtem.visualize.artists.Artist2DInitialization
- class abtem.visualize.artists.ScaledCircleCollection(...)[source]#
Bases:
matplotlib.collections.CollectionCreate a collection of circles with radii scaled by the data.
- Parameters:
array (ndarray) – Array of data values. Used to calculate the radii of the circles. The shape should be (n,).
offsets (ndarray) – Array of offsets for the circles. The shape should be (n, 2) where n is the number of circles.
scale (float, optional) – Scaling factor for the radii, by default 1.0.
threshold (float, optional) – Threshold for showing the circles, by default 1e-6.
kwargs (dict) – Additional keyword arguments passed to the matplotlib.collections.Collection constructor.
Initialization
- Parameters:
edgecolors (color or list of colors, default:
rcParams[“patch.edgecolor”](default:'black')) – Edge color for each patch making up the collection. The special value ‘face’ can be passed to make the edgecolor match the facecolor.facecolors (color or list of colors, default:
rcParams[“patch.facecolor”](default:'C0')) – Face color for each patch making up the collection.hatchcolors (color or list of colors, default:
rcParams[“hatch.color”](default:'edge')) – Hatch color for each patch making up the collection. The color can be set to the special value ‘edge’ to make the hatchcolor match the edgecolor.linewidths (float or list of floats, default:
rcParams[“patch.linewidth”](default:1.0)) – Line width for each patch making up the collection.linestyles (str or tuple or list thereof, default: 'solid') –
Valid strings are [‘solid’, ‘dashed’, ‘dashdot’, ‘dotted’, ‘-‘, ‘–’, ‘-.’, ‘:’]. Dash tuples should be of the form:
(offset, onoffseq),
where onoffseq is an even length tuple of on and off ink lengths in points. For examples, see /gallery/lines_bars_and_markers/linestyles.
capstyle (.CapStyle-like, default: ‘butt’) – Style to use for capping lines for all paths in the collection. Allowed values are %(CapStyle)s.
joinstyle (.JoinStyle-like, default: ‘round’) – Style to use for joining lines for all paths in the collection. Allowed values are %(JoinStyle)s.
antialiaseds (bool or list of bool, default:
rcParams[“patch.antialiased”](default:True)) – Whether each patch in the collection should be drawn with antialiasing.offsets ((float, float) or list thereof, default: (0, 0)) – A vector by which to translate each patch after rendering (default is no translation). The translation is performed in screen (pixel) coordinates (i.e. after the Artist’s transform is applied).
offset_transform (~.Transform, default: .IdentityTransform) – A single transform which will be applied to each offsets vector before it is used.
cmap – Data normalization and colormapping parameters. See .ScalarMappable for a detailed description.
norm – Data normalization and colormapping parameters. See .ScalarMappable for a detailed description.
hatch (str, optional) – Hatching pattern to use in filled paths, if any. Valid strings are [‘/’, ‘', ‘|’, ‘-’, ‘+’, ‘x’, ‘o’, ‘O’, ‘.’, ‘*’]. See /gallery/shapes_and_collections/hatch_style_reference for the meaning of each hatch type.
pickradius (float, default: 5.0) – If
pickradius <= 0, then .Collection.contains will returnTruewhenever the test point is inside of one of the polygons formed by the control points of a Path in the Collection. On the other hand, if it is greater than 0, then we instead check if the test point is contained in a stroke of width2*pickradiusfollowing any of the Paths in the Collection.urls (list of str, default: None) – A URL for each patch to link to once drawn. Currently only works for the SVG backend. See /gallery/misc/hyperlinks_sgskip for examples.
zorder (float, default: 1) – The drawing order, shared by all Patches in the Collection. See /gallery/misc/zorder_demo for all defaults and examples.
**kwargs – Remaining keyword arguments will be used to set properties as
Collection.set_{key}(val)for each key-value pair in kwargs.
- property threshold#
- class abtem.visualize.artists.ScatterArtist(...)[source]#
Bases:
abtem.visualize.artists.Artist2DInitialization
- property circle_collection: ScaledCircleCollection#
- num_cbars#
1