ssapy_toolkit.Plots.misc_plotting

Functions

dotcolors_scaled(num_colors)

koe_2dhist(stable_data[, title, limits, ...])

Generates a 2D histogram plot of orbital elements for a set of stable orbital data.

koe_plot(r, v[, t, elements, save_path, body])

Generates a plot of orbital elements (eccentricity, inclination, and semi-major axis) for a given position and velocity vectors.

orbit_divergence_plot(rs[, r_moon, t, ...])

scatter2d(x, y, cs[, xlabel, ylabel, title, ...])

scatter3d(x[, y, z, cs, xlabel, ylabel, ...])

ssapy_toolkit.Plots.misc_plotting.dotcolors_scaled(num_colors: int) list[source]
ssapy_toolkit.Plots.misc_plotting.koe_2dhist(stable_data, title: str = 'Initial orbital elements of\n1 year stable cislunar orbits', limits: list = [1, 50], bins: int = 200, logscale: bool = False, cmap: str = 'coolwarm', save_path: str = None) Figure[source]

Generates a 2D histogram plot of orbital elements for a set of stable orbital data.

ssapy_toolkit.Plots.misc_plotting.koe_plot(r: ndarray, v: ndarray, t=None, elements=None, save_path=None, body: str = 'Earth')[source]

Generates a plot of orbital elements (eccentricity, inclination, and semi-major axis) for a given position and velocity vectors.

Parameters:
  • r (np.ndarray) – Position vectors of the satellite in 3D space (shape: [n, 3]).

  • v (np.ndarray) – Velocity vectors of the satellite in 3D space (shape: [n, 3]).

  • t (Optional[Time], optional) – Time instance(s) associated with the orbital elements. If None, the x-axis is an index.

  • elements (list, optional) – Subset of elements to plot among [‘a’, ‘e’, ‘i’]. Default: all three.

  • save_path (str or None, optional) – Path to save the plot. If None, the plot is not saved.

  • body (str, optional) – ‘Earth’ or ‘Moon’.

Return type:

(plt.Figure, plt.Axes)

ssapy_toolkit.Plots.misc_plotting.orbit_divergence_plot(rs: ndarray, r_moon: ndarray = None, t=None, limits: float = None, title: str = '', save_path: str = None) None[source]
ssapy_toolkit.Plots.misc_plotting.scatter2d(x: list, y: list, cs: list, xlabel: str = 'x', ylabel: str = 'y', title: str = '', cbar_label: str = '', dotsize: int = 1, colorsMap: str = 'jet', colorscale: str = 'linear', colormin: float = None, colormax: float = None, save_path: str = None) None[source]
ssapy_toolkit.Plots.misc_plotting.scatter3d(x: list, y: list = None, z: list = None, cs: list = None, xlabel: str = 'x', ylabel: str = 'y', zlabel: str = 'z', cbar_label: str = '', dotsize: int = 1, colorsMap: str = 'jet', title: str = '', save_path: str = None)[source]
Return type:

(plt.Figure, matplotlib.axes._subplots.Axes3DSubplot)