Skip to content

Commit

Permalink
Fix long/short holdings legend and xlims
Browse files Browse the repository at this point in the history
  • Loading branch information
gusgordon committed May 2, 2017
1 parent a52fb2b commit 68fa432
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyfolio/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def plot_holdings(returns, positions, legend_loc='best', ax=None, **kwargs):


def plot_long_short_holdings(returns, positions,
legend_loc='best', ax=None, **kwargs):
legend_loc='upper left', ax=None, **kwargs):
"""
Plots total amount of stocks with an active position, breaking out
short and long into transparent filled regions.
Expand Down Expand Up @@ -433,6 +433,7 @@ def plot_long_short_holdings(returns, positions,
framealpha=0.8, prop={'size': 12})
leg.get_frame().set_edgecolor('black')

ax.set_xlim((returns.index[0], returns.index[-1]))
ax.set_title('Long and short holdings')
ax.set_ylabel('Holdings')
ax.set_xlabel('')
Expand Down

0 comments on commit 68fa432

Please sign in to comment.