astrix.plots package¶
- class CartPlot(width=12.0, aspect=0.6)[source]¶
Bases:
object- Parameters:
width (float)
aspect (float)
- add_path(path, color='r', style='-', label=None, show_label=True)[source]¶
Add a path to the map. :type path:
Path:param path: The path to add. :type path: Path :type color:str:param color: The color of the path. Defaults to “r”. :type color: str, optional :type style:str:param style: The style of the path. Defaults to “-“. :type style: str, optional- Parameters:
path (Path)
color (str)
style (str)
label (str | None)
show_label (bool)
- add_point(point, color='r', marker='o', ms=6.0, label=None, ha='left', fw='normal', bgc='none')[source]¶
- Parameters:
point (Point)
color (str)
marker (str)
ms (float)
label (str | None)
ha (str)
fw (str)
bgc (str)
- add_rays(rays, length=200000.0, color='g')[source]¶
- Parameters:
rays (Ray)
length (Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])
color (str)
- class Plot3D(size=900, aspect_ratio=1.0, aa='ms')[source]¶
Bases:
object- Parameters:
size (int)
aspect_ratio (float)
- add_2d_text(name, text, pos=(50, 50), font_size=12, from_tl=True)[source]¶
- Parameters:
name (str)
text (str)
pos (tuple[float, float])
font_size (int)
- add_box(name, lat_bounds, lon_bounds, fill=True, fill_color=None, line_color=None, alpha=0.3, line_width=2.0, resolution=40, alt=50.0)[source]¶
- Parameters:
name (str)
lat_bounds (Sequence[float])
lon_bounds (Sequence[float])
fill (bool)
fill_color (str | int | None)
line_color (str | int | None)
alpha (float)
line_width (float)
resolution (int)
alt (float)
- add_circle(name, center, radius_km, fill=True, fill_color=None, line_color=None, alpha=0.3, line_width=2.0, resolution=120, alt=150.0)[source]¶
- Parameters:
name (str)
center (tuple[float, float])
radius_km (float)
fill (bool)
fill_color (str | int | None)
line_color (str | int | None)
alpha (float)
line_width (float)
resolution (int)
alt (float)
- add_grid(lat_bounds, lon_bounds, spacing=5.0)[source]¶
- Parameters:
lat_bounds (Sequence[float])
lon_bounds (Sequence[float])
spacing (float)
- add_ground_track(name, path, dt=10.0, line_width=1.0, color='white', alpha=0.6)[source]¶
- Parameters:
name (str)
path (Path)
dt (float)
line_width (float)
color (str | int | None)
alpha (float)
- add_labelled_point(name, text, position, font_size=14, text_color='lightgrey', marker_color='red', marker_size=6.0, show_points=True, bold=False, always_visible=True)[source]¶
- Parameters:
name (str)
text (str)
position (Point)
font_size (int)
text_color (str | int)
marker_color (str | int)
marker_size (float)
show_points (bool)
bold (bool)
always_visible (bool)
- add_legend(labels, pos_x=0.7)[source]¶
Add a legend to the plot
- Parameters:
labels (
list[tuple[str,str]]) – List of (data_name, label) tuplesfont_size – Font size for the legend text
pos_x (float)
- add_point(name, point, size=2.0, color=None, alpha=1.0)[source]¶
- Parameters:
name (str)
point (Point)
size (float)
color (str | int | None)
alpha (float)
- add_ray(name, ray, length=100000.0, color='grey', alpha=0.5, line_width=1.0)[source]¶
- Parameters:
name (str)
ray (Ray)
length (float | ndarray[tuple[Any, ...], dtype[_ScalarT]])
color (str | int)
alpha (float)
line_width (float)
- add_texture(lat_bounds, lon_bounds, alpha=0.6)[source]¶
- Parameters:
lat_bounds (Sequence[float])
lon_bounds (Sequence[float])
- autocomplete(bounds=None)[source]¶
- Parameters:
bounds (tuple[tuple[float, float], tuple[float, float]] | None)
- save(filepath='./plot3d_screenshot.png', scale=1.0)[source]¶
- Parameters:
filepath (str)
scale (float)
- set_view(cent, heading=180, pitch=-45, zoom=1.0, parrallel=False)[source]¶
- Parameters:
cent (Point)
heading (float)
pitch (float)
zoom (float)
parrallel (bool)
- update_ray(name, ray, length=100000.0)[source]¶
- Parameters:
name (str)
ray (Ray | None)
length (float | ndarray[tuple[Any, ...], dtype[_ScalarT]])
- aspect_ratio: float¶
- p: Plotter¶
- text_actors: dict[str, Actor]¶
Submodules¶
- astrix.plots.cartplot module
- astrix.plots.plot3d module
ConnectingLinesPlot3DPlot3D.add_2d_text()Plot3D.add_box()Plot3D.add_circle()Plot3D.add_grid()Plot3D.add_ground_track()Plot3D.add_labelled_point()Plot3D.add_legend()Plot3D.add_path()Plot3D.add_point()Plot3D.add_ray()Plot3D.add_texture()Plot3D.autocomplete()Plot3D.calc_bounds()Plot3D.clear_ground_track()Plot3D.clear_path()Plot3D.clear_point()Plot3D.close()Plot3D.frame()Plot3D.render()Plot3D.save()Plot3D.set_view()Plot3D.show()Plot3D.start_animation()Plot3D.update_2d_text()Plot3D.update_ground_track()Plot3D.update_labelled_point_pos()Plot3D.update_path()Plot3D.update_point()Plot3D.update_ray()Plot3D.aspect_ratioPlot3D.dataPlot3D.pPlot3D.text_actors
PlotDatacolor_from_int()split_lon_interval()