astrix.plots.plot3d module

class ConnectingLines(points_1, points_2)[source]

Bases: object

Parameters:
classmethod from_paths(path1, path2, n=10)[source]
Return type:

ConnectingLines

Parameters:
truncate(start, end)[source]
Return type:

ConnectingLines

Parameters:
points_1: Point
points_2: Point
class Plot3D(size=900, aspect_ratio=1.0)[source]

Bases: object

Parameters:
  • size (int)

  • aspect_ratio (float)

add_2d_text(name, test, position=(10, 10), font_size=12, color='white')[source]
Parameters:
  • name (str)

  • test (str)

  • position (tuple[float, float])

  • font_size (int)

  • color (str)

add_grid(lat_bounds, lon_bounds)[source]
Parameters:
  • lat_bounds (Sequence[float])

  • lon_bounds (Sequence[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)

  • alpha (float)

add_labelled_point(name, text, position, font_size=14, text_color='lightgrey', marker_color='red')[source]
Parameters:
  • name (str)

  • text (str)

  • position (Point)

  • font_size (int)

  • text_color (str | int)

  • marker_color (str | int)

add_legend(labels)[source]

Add a legend to the plot

Parameters:
  • labels (list[tuple[str, str]]) – List of (data_name, label) tuples

  • font_size – Font size for the legend text

add_path(name, path, path_max=None, line_width=2.0, color=None, alpha=1.0)[source]
Parameters:
  • name (str)

  • path (Path)

  • path_max (Path | None)

  • line_width (float)

  • color (str | int | None)

  • alpha (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)[source]
Parameters:
  • name (str)

  • ray (Ray)

  • length (float | ndarray[tuple[Any, ...], dtype[_ScalarT]])

  • color (str | int)

  • alpha (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)

calc_bounds(buffer=0.3)[source]
Return type:

tuple[tuple[float, float], tuple[float, float]]

close()[source]
frame()[source]
render()[source]
save(filepath='./plot3d_screenshot.png')[source]
Parameters:

filepath (str)

set_view(cent, heading=180, pitch=-45, zoom=1.0, parrallel=False)[source]
Parameters:
  • cent (Point)

  • heading (float)

  • pitch (float)

  • zoom (float)

  • parrallel (bool)

show()[source]
start_animation(filepath='./animation.mp4', fps=10)[source]
Parameters:
  • filepath (str)

  • fps (int)

update_ground_track(name, path)[source]
Parameters:
  • name (str)

  • path (Path)

update_path(name, path)[source]
Parameters:
  • name (str)

  • path (Path)

update_point(name, point)[source]
Parameters:
  • name (str)

  • point (Point)

update_ray(name, ray, length=100000.0)[source]
Parameters:
  • name (str)

  • ray (Ray)

  • length (float | ndarray[tuple[Any, ...], dtype[_ScalarT]])

data: dict[str, PlotData]
p: Plotter
text_actors: dict[str, Actor]
class PlotData(name, type, actor, lat_bounds, lon_bounds, data=<factory>)[source]

Bases: object

Parameters:
  • name (str)

  • type (str)

  • actor (Actor)

  • lat_bounds (tuple[float, float])

  • lon_bounds (tuple[float, float])

  • data (dict)

actor: Actor
data: dict
lat_bounds: tuple[float, float]
lon_bounds: tuple[float, float]
name: str
type: str
color_from_int(i)[source]
Return type:

str

Parameters:

i (int)