Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Intro

Charts in roboquant are all based on matplotlib. Either by directly invoking methods or via the Pandas dateframe plot method.

Using matplotlib for trading charts brings several benefits:

Styles

Roboquant has a light and dark style for the charts, which can be enabled by calling the set_dark_style() and set_light_style() function. Besides the dark background, it also sets some other parameters for the charts, like the figure size, dpi and grids.

import roboquant as rq

rq.set_light_style()
rq.set_dark_style()

The following charts shows these two styles in action.

Light style

Great for exporting to PDF and printing.

<Figure size 2400x1350 with 2 Axes>

Dark style

Great for developing late at night or in a dark mode editor.

<Figure size 2400x1350 with 2 Axes>