-
Notifications
You must be signed in to change notification settings - Fork 0
plotmpl
Bo Chen edited this page Jul 9, 2023
·
4 revisions
This code consists of functions for lidar data analysis and visualization. It includes functionalities for reading lidar data, calculating derived products, and plotting 2D timeseries.
plot_mpl_2d_timeseries(mpl_datetime, mpl_range_edges, mpl_2d_data, fig=None, ax=None, range_max=20, vmin=0, vmax=1, colorbar_bool=True, tick_number=None)
Plots a 2D timeseries of lidar data.
Parameters:
-
mpl_datetime: Array ofnp.datetime64objects representing the timestamps. -
mpl_range_edges: Array of lidar range values. Height of the bottom and top of each bin instead of the average height of the bin. -
mpl_2d_data: 2D array of lidar data. -
fig(optional): Existing figure object for plotting. -
ax(optional): Existing axes object for plotting. -
range_max(optional): Maximum range in km to plot on the y-axis. -
vmin(optional): Minimum value for the colormap normalization. -
vmax(optional): Maximum value for the colormap normalization. -
colorbar_bool(optional): Boolean value to enable/disable the colorbar. -
tick_number(optional): Number of ticks and labels to use on the x-axis.
Returns:
- None (The function directly modifies the provided
figandaxobjects for plotting.)
Utility function to handle the creation of a figure and axes for plotting.
Parameters:
-
fig(optional): Existing figure object. -
ax(optional): Existing axes object.
Returns:
-
fig: Updated figure object. -
ax: Updated axes object.
Helper function to format an array of datetime objects.
Parameters:
-
datetime_arr: Array ofdatetimeobjects representing timestamps.
Returns:
-
formatted_arr: Array of formatted strings representing the formatted dates and times.