setup_charting_and_output#
API documentation for tradeexecutor.utils.notebook.setup_charting_and_output Python function.
- setup_charting_and_output(mode=OutputMode.interactive, image_format='svg', max_rows=1000, width=1500, height=1500)[source]#
Sets charting and other output options for Jupyter Notebooks.
Interactive charts are better for local development, but are not compatible with most web-based notebook viewers.
Set Quantstats chart to SVG output and for high-resolution screens
Mute common warnings like Matplotlib font loading
Example:
# Set Jupyter Notebook output mode parameters from tradeexecutor.backtest.notebook import setup_charting_and_output setup_charting_and_output()
- Parameters:
mode (OutputMode) – What kind of viewing context we have for this notebook output
image_format –
Do we do SVG or PNG.
SVG is better, but Github inline viewer cannot display it in the notebooks.
max_rows –
Do we remove the
max_rows
limitation from Pandas tables.Default 20 is too low to display summary tables.