STIXMap#
- class stixpy.map.stix.STIXMap(data, header, plot_settings=None, **kwargs)[source]#
Bases:
GenericMapA class to represent a STIX Map.
Attributes Summary
Methods Summary
is_datasource_for(data, header, **kwargs)plot(**kwargs)Plots the map using matplotlib.
Attributes Documentation
Methods Documentation
- plot(**kwargs)[source]#
Plots the map using matplotlib.
By default, the map’s pixels will be drawn in an coordinate-aware fashion, even when the plot axes are a different projection or a different coordinate frame. See the
autoalignkeyword and the notes below.- Parameters:
annotate (
bool, optional) – IfTrue, the data is plotted at its natural scale; with title and axis labels.axes (
Axesor None) – If provided the image will be plotted on the given axes. Else the current Matplotlib axes will be used.title (
str,bool, optional) – The plot title. IfTrue, uses the default title for this map.clip_interval (two-element
Quantity, optional) – If provided, the data will be clipped to the percentile interval bounded by the two numbers.autoalign (
boolorstr, optional) –If other than
False, the plotting accounts for any difference between the WCS of the map and the WCS of theWCSAxesaxes (e.g., a difference in rotation angle). The options are:"mesh", which draws a mesh of the individual map pixels"image", which draws the map as a single (warped) imageTrue, which automatically determines whether to use"mesh"or"image"
**imshow_kwargs (
dict) – Any additional arguments are passed toimshow()orpcolormesh().
Examples
>>> # Simple Plot with color bar >>> aia.plot() >>> plt.colorbar() >>> # Add a limb line and grid >>> aia.plot() >>> aia.draw_limb() >>> aia.draw_grid()
Notes
The
autoalignfunctionality can be intensive to render. If the plot is to be interactive, the alternative approach of preprocessing the map to match the intended axes (e.g., through rotation or reprojection) will result in better plotting performance.The
autoalign='image'approach is usually faster than theautoalign='mesh'approach, but is not as reliable, depending on the specifics of the map. If parts of the map cannot be plotted, a warning is emitted. If the entire map cannot be plotted, an error is raised.When combining
autoalignfunctionality withHelioprojectivecoordinates, portions of the map that are beyond the solar disk may not appear. To preserve the off-disk parts of the map, using theSphericalScreencontext manager may be appropriate.