utils#
- dibisoplot.utils.format_structure_name(struct_name: str, country_code: str) str#
Format the structure name by cropping if too long and adding a country flag.
- Parameters:
struct_name (str) – The structure name.
country_code (str) – The country code.
- Returns:
The formatted structure name with country flag.
- Return type:
str
- dibisoplot.utils.get_bar_width(n_bars: int) int | float#
Calculate the width of bars in a plot based on the number of bars.
This function uses linear interpolation to determine the bar width based on the number of bars. The interpolation is based on two examples: one with 10 bars and a width of 0.7, and another with 2 bars and a width of 0.25.
- Parameters:
n_bars (int) – Number of bars in the plot.
- Returns:
Width of the bars.
- Return type:
int | float
- dibisoplot.utils.get_empty_latex_with_message(message: str) str#
Create an empty plot with a message.
- dibisoplot.utils.get_empty_plot_with_message(message: str) Figure#
Create an empty plot with a message.
- dibisoplot.utils.get_hal_doc_type_name(name)#