plot size question
-
Hi!
When I make a plot as in the following:num = 20 fig = cerebro.plot(numfigs = num, barupfill = False, bardownfill = False, style = 'candle', plotdist = 0.5, figsize=(30,30), volume = False, barup = 'green', valuetags = False, subtxtsize = 7, start = startdate, end = enddate) for i in range(num): fig[0][i].tight_layout() fig[0][i].savefig(output_folder + '/{}_'.format(timeframe) + stratname + '_{}'.format(strat_type) + '_plot{}.png'.format(i), dpi=300, hight = 30, width = 30, tight = True)
I get one very nice big plot as can be seen here (it's the second image printed):
and 19 small not so nice plots (where one can be seen here):
What could be the reason ? Would love to see 20 plots similar to the first one.
Thank you for your help!
-
@alain said in plot size question:
figsize=(30,30)
Hey @Alain, I was wondering how you got the plot to change size at all!? Which IDE are you using?
Best,
Nikitaj -
@alain said in plot size question:
hight = 30
Things are in the
matplotlib
arena, but that could have something to do with it. -
Hi @nikitaj and @backtrader
Actually the figsize = (30,30) command didn't do anything to the plots. I also deleted hight = 30, but nothing changed...
I'm using anaconda -> spyder.The code now looks like this
fig = cerebro.plot(numfigs = num,barupfill = False, bardownfill = False, style = 'candle', plotdist = 0.5, volume = False, barup = 'green', valuetags = False, subtxtsize = 7, start = startdate, end = enddate) for i in range(num): fig[0][i].tight_layout() fig[0][i].savefig(output_folder + '/{}_'.format(timeframe) + stratname + '_{}'.format(strat_type) + '_plot{}.png'.format(i), dpi=500)
and unfortunately I still get one nice plot and all others are small... no idea why.
Should all plots look like the big one I posted ?Thanks,
Alain -
-
same result unfortunately... also updated matplotlib, de- and reinstalled anconda, but nothing helps so far.
-
I have the same problem but when I remove
bt.ind.StdDev
from the strategy the fig size becomes okay.