mlresearch.utils.display_available_fonts¶
- mlresearch.utils.display_available_fonts(ipython_session=True)[source]¶
Check and display the available fonts in matplotlib.
- Parameters:
- ipython_sessionbool, optional
Flag to determine whether to display the fonts in an IPython session or return the HTML output as a string. If True, the fonts will be displayed in the IPython session using the IPython.core.display.HTML function. If False, the HTML output will be returned as a string. Default is True.
- Returns:
- str or None
If ipython_session is True, the function displays the fonts in the IPython session and returns None. If ipython_session is False, the function returns the HTML output as a string.
Examples
>>> display_available_fonts() # Displays the available fonts in the IPython session
>>> html_output = display_available_fonts(ipython_session=False) >>> print(html_output) # Prints the HTML output as a string