hesmapy.utils package¶
Submodules¶
hesmapy.utils.plot_utils module¶
- hesmapy.utils.plot_utils.add_log_axis_buttons(fig: Figure, axis: str = 'both') Figure ¶
Add buttons to toggle log x axis
Parameters¶
- figgo.Figure
Figure to add buttons to
- axisstr, optional
Axis to add buttons to, by default “both”. Can be “x”, “y”, or “both”
Returns¶
go.Figure
- hesmapy.utils.plot_utils.add_reverse_y_axis_button(fig: Figure) Figure ¶
Add buttons to reverse the y axis
Parameters¶
- figgo.Figure
Figure to add buttons to
Returns¶
go.Figure
- hesmapy.utils.plot_utils.add_timestep_slider(fig: Figure, time: list | None = None, time_unit: str | None = None, num_data: int = 1) Figure ¶
Add a slider to the figure
Parameters¶
- figgo.Figure
Figure to add slider to
- timelist, optional
List of times to use for slider, by default None
- time_unitstr, optional
Unit of time, by default None
- num_dataint, optional
Number of data sets, by default 1
Returns¶
go.Figure
- hesmapy.utils.plot_utils.add_viewing_angle_slider(fig: Figure, viewing_angles: list | None = None, num_data: list = [1], has_derived_data: bool = False) Figure ¶
Add a slider to the figure
Parameters¶
- figgo.Figure
Figure to add slider to
- viewing_angleslist, optional
List of viewing angles to use for slider, by default None
- num_datalist, optional
Number of data sets for each viewing angle, by default [1]
- has_derived_databool, optional
Whether or not the figure has derived data, by default False
Returns¶
go.Figure
- hesmapy.utils.plot_utils.plot_abundance_traces(fig: Figure, abundance_data: DataFrame, data: DataFrame, units: dict) int ¶
Plot abundance data
Parameters¶
- figgo.Figure
Figure to add traces to
- abundance_datapd.DataFrame
Abundance data to plot
- datapd.DataFrame
Hydro data
- unitsdict
Units of data
Returns¶
int
- hesmapy.utils.plot_utils.plot_derived_lightcurve_data(fig: Figure, data: DataFrame) None ¶
Plot derived lightcurve data
Parameters¶
- figgo.Figure
Figure to add traces to
- datapd.DataFrame
Data to plot
Returns¶
None
- hesmapy.utils.plot_utils.plot_hydro_traces(fig: Figure, data: DataFrame, units: dict, normalization_factors: dict = None) int ¶
Plot hydro data
Parameters¶
- figgo.Figure
Figure to add traces to
- datapd.DataFrame
Data to plot
- unitsdict
Units of data
- normalization_factorsdict, optional
Normalization factors, by default None
Returns¶
int