globe_plot

ssapy.plotUtils.globe_plot(r, t, limits=False, title='', figsize=(7, 8), save_path=False, el=30, az=0, scale=1)[source][source]

Plot a 3D scatter plot of position vectors on a globe representation.

Parameters: - r (array-like): Position vectors with shape (n, 3), where n is the number of points. - t (array-like): Time array corresponding to the position vectors. This parameter is not used in the current function implementation but is included for consistency. - limits (float, optional): The limit for the plot axes. If not provided, it is calculated based on the data. Default is False. - title (str, optional): Title of the plot. Default is an empty string. - figsize (tuple of int, optional): Figure size (width, height) in inches. Default is (7, 8). - save_path (str, optional): Path to save the generated plot. If not provided, the plot will not be saved. Default is False. - el (int, optional): Elevation angle (in degrees) for the view of the plot. Default is 30. - az (int, optional): Azimuth angle (in degrees) for the view of the plot. Default is 0. - scale (int, optional): Scale factor for resizing the Earth image. Default is 1.

Returns: - fig (matplotlib.figure.Figure): The figure object containing the plot. - ax (matplotlib.axes._subplots.Axes3DSubplot): The 3D axis object used in the plot.

The function creates a 3D scatter plot of the position vectors on a globe. The globe is represented using a textured Earth image, and the scatter points are colored using a rainbow colormap. The plot’s background is set to black, and the plot is displayed with customizable elevation and azimuth angles.

Example usage: ``` import numpy as np from your_module import globe_plot

# Example data r = np.array([[1, 2, 3], [4, 5, 6]]) # Replace with actual data t = np.arange(len(r)) # Replace with actual time data

globe_plot(r, t, save_path=’globe_plot.png’) ```