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 Jupyter Notebook output mode parameters
from tradeexecutor.backtest.notebook import setup_charting_and_output
  • 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.