cerebro.plot() uses matplotlib to draw the price, the indicators declared in __init__, the executed orders and the capital curve. You call it after run().
Buy and sell markers should land where your rule expects them. The chart is a visual check: a buy in the wrong place often reveals a bug.
A few useful options: cerebro.plot(style='candlestick') for candles, volume=False to hide volume. To hide an indicator, write self.sma.plotinfo.plot = False.
A nice chart is not proof: it shows a single historical path. Robustness is checked on other periods and other markets.
Examples
PLOT-X (fictional market) : The green and red dots play the role of cerebro.plot()’s order markers. Check that each entry lands where your rule expects it: a misplaced marker signals a bug.
matplotlib, born in 2003 : matplotlib was created by John D. Hunter, then a neurobiology researcher, who released it in 2003. It became one of the most widely used charting libraries in Python, and cerebro.plot() is built on it.