Plot Markers (ligo.skymap.plot.marker
)¶
- ligo.skymap.plot.marker.earth = Path(array([[ 0. , -1. ], [ 0.2652031 , -1. ], [ 0.51957987, -0.89463369], [ 0.70710678, -0.70710678], [ 0.89463369, -0.51957987], [ 1. , -0.2652031 ], [ 1. , 0. ], [ 1. , 0.2652031 ], [ 0.89463369, 0.51957987], [ 0.70710678, 0.70710678], [ 0.51957987, 0.89463369], [ 0.2652031 , 1. ], [ 0. , 1. ], [-0.2652031 , 1. ], [-0.51957987, 0.89463369], [-0.70710678, 0.70710678], [-0.89463369, 0.51957987], [-1. , 0.2652031 ], [-1. , 0. ], [-1. , -0.2652031 ], [-0.89463369, -0.51957987], [-0.70710678, -0.70710678], [-0.51957987, -0.89463369], [-0.2652031 , -1. ], [ 0. , -1. ], [ 0. , -1. ], [-1. , 0. ], [ 1. , 0. ], [ 0. , -1. ], [ 0. , 1. ]]), array([ 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 79, 1, 2, 1, 2], dtype=uint8))¶
The Earth symbol (circle and cross).
Examples
from matplotlib import pyplot as plt from ligo.skymap.plot.marker import earth plt.plot(0, 0, markersize=20, markeredgewidth=2, markerfacecolor='none', marker=earth)
(
Source code
,png
,hires.png
,pdf
)
Specialized markers.
- ligo.skymap.plot.marker.reticle(inner=0.5, outer=1.0, angle=0.0, which='lrtb')[source] [edit on github]¶
Create a reticle or crosshairs marker.
- Parameters:
- innerfloat
Distance from the origin to the inside of the crosshairs.
- outerfloat
Distance from the origin to the outside of the crosshairs.
- anglefloat
Rotation in degrees; 0 for a ‘+’ orientation and 45 for ‘x’.
- Returns:
- path
matplotlib.path.Path
The new marker path, suitable for passing to Matplotlib functions (e.g.,
plt.plot(..., marker=reticle())
)
- path
Examples
from matplotlib import pyplot as plt from ligo.skymap.plot.marker import reticle markers = [reticle(inner=0), reticle(which='lt'), reticle(which='lt', angle=45)] fig, ax = plt.subplots(figsize=(6, 2)) ax.set_xlim(-0.5, 2.5) ax.set_ylim(-0.5, 0.5) for x, marker in enumerate(markers): ax.plot(x, 0, markersize=20, markeredgewidth=2, marker=marker)
(
Source code
,png
,hires.png
,pdf
)