elasticai.preprocessor._plot_helper#
Module Contents#
Functions#
Getting the fontsize (best practice) for publishing in papers |
|
Getting the color for plotting non-spike activity in transient plots |
|
Getting the color string |
|
Getting the marker for plotting |
|
Translation figure size |
|
Saving figure in given format Args: fig: Matplot which will be saved path: Path for saving the figure name: Name of the plot formats: List with data formats for saving the figures Returns: None |
|
Function for extracting the min-max value of given data for defining the logarithmic limits |
|
Getting the scaling value and corresponding string notation for unit scaling in plots Args: data: Array or value for calculating the SI scaling value Returns: Tuple with [0] = scaling value and [1] = SI pre-unit |
|
Translating the unit of a value from string to float |
API#
- elasticai.preprocessor._plot_helper.get_textsize_paper() int[source]#
Getting the fontsize (best practice) for publishing in papers
- elasticai.preprocessor._plot_helper.get_plot_color_inactive() str[source]#
Getting the color for plotting non-spike activity in transient plots
- elasticai.preprocessor._plot_helper.get_plot_marker(idx: int) str[source]#
Getting the marker for plotting
- elasticai.preprocessor._plot_helper.save_figure(fig, path: str, name: str, formats: list = ['pdf', 'svg']) None[source]#
Saving figure in given format Args: fig: Matplot which will be saved path: Path for saving the figure name: Name of the plot formats: List with data formats for saving the figures Returns: None
- elasticai.preprocessor._plot_helper.extract_minmax_for_logarithmic_limits(data: numpy.ndarray) tuple[float, float][source]#
Function for extracting the min-max value of given data for defining the logarithmic limits
- Parameters:
data – Numpy array with data
- Returns:
Tuple with limitation values for applying logarithmic y-limits
- elasticai.preprocessor._plot_helper.scale_auto_value(data: float | numpy.ndarray) tuple[float, str][source]#
Getting the scaling value and corresponding string notation for unit scaling in plots Args: data: Array or value for calculating the SI scaling value Returns: Tuple with [0] = scaling value and [1] = SI pre-unit