yt.visualization.plot_modifications.
ArrowCallback
(pos, code_size=None, length=0.03, coord_system='data', plot_args=None)[source]¶annotate_arrow(pos, length=0.03, coord_system=’data’, plot_args=None):
Overplot an arrow pointing at a position for highlighting a specific feature. Arrow points from lower left to the designated position with arrow length “length”.
Parameters: | pos : 2- or 3-element tuple, list, or array
length : float, optional
coord_system : string, optional
plot_args : dictionary, optional
|
---|
Examples
>>> # Overplot an arrow pointing to feature at data coord: (0.2, 0.3, 0.4)
>>> import yt
>>> ds = yt.load('IsolatedGalaxy/galaxy0030/galaxy0030')
>>> s = yt.SlicePlot(ds, 'z', 'density')
>>> s.annotate_arrow([0.2,0.3,0.4])
>>> s.save()
>>> # Overplot a red arrow with longer length pointing to plot coordinate
>>> # (0.1, -0.1)
>>> import yt
>>> ds = yt.load('IsolatedGalaxy/galaxy0030/galaxy0030')
>>> s = yt.SlicePlot(ds, 'z', 'density')
>>> s.annotate_arrow([0.1, -0.1, length=0.06, coord_system='plot',
... plot_args={'color':'red'})
>>> s.save()
Methods