plot with logarithmic y axis
Is it possible to use logarithmic scale for y axis when plotting with cerebro?
plotinfo=dict(plotlog=True)and try your luck.
@backtrader Thanks. I couldn't get it to work. I am not plotting individual datas but only cash, value, and trades profits/losses. I wasn't sure where to specify plotinfo=...
I tried in cerebro.plot(plotinfo=...) and cerebro.run(plotinfo=...) but y-scale was not logarhitmic.
plotinfois a property (which you declara as a
dict, but which supports dot notation too) of lines objects like data feeds, indicators ...
mydata = bt.feeds.MyPreferredDatafeed(dataname='xxx') mydata.plotinfo.plotlog = True
# not recognized kwargs will be passed to plotinfo mydata = bt.feeds.MyPreferredDatafeed(dataname='xxx', plotlog=True)
class MyOwnLog(bt.feeds.MyPreferredDatafeed): plotinfo(plotlog=True) mydata = bt.feeds.MyOwnLog(dataname='xxx')