yt.visualization.plot_modifications.
SphereCallback
(center, radius, circle_args=None, text=None, coord_system='data', text_args=None)[source]¶Overplot a circle with designated center and radius with optional text.
Parameters: | center : 2- or 3-element tuple, list, or array
radius : YTArray, float, or (1, (‘kpc’)) style tuple
circle_args : dict, optional
coord_system : string, optional
text : string, optional
text_args : dictionary, optional
|
---|
Examples
>>> # Overplot a white circle of radius 100 kpc over the central galaxy
>>> import yt
>>> ds = yt.load('IsolatedGalaxy/galaxy0030/galaxy0030')
>>> s = yt.SlicePlot(ds, 'z', 'density')
>>> s.annotate_sphere([0.5, 0.5, 0.5], radius=(100, 'kpc'))
>>> s.save()
Methods