quantopian / pyfolio

Portfolio and risk analytics in Python
https://quantopian.github.io/pyfolio
Apache License 2.0
5.73k stars 1.78k forks source link

plot_annual_returns plot should scale according to length of backtest #305

Open justinlent opened 8 years ago

justinlent commented 8 years ago

long backtests result in unreadable plot

image

related to: https://github.com/quantopian/pyfolio/issues/304

rlartigue commented 3 years ago

The easiest way to accomplish this is to pass in a predefined ax object and set the size of the figure beforehand.
fig, ax = plt.subplots(figsize=(20,10)) plot_monthly_returns_heatmap(returns, ax)

However, I understand the desire for auto-scaling and am working on a bug fix now.