Skip to content

Commit

Permalink
BUG Get axis instead of figure.
Browse files Browse the repository at this point in the history
  • Loading branch information
twiecki committed Apr 15, 2019
1 parent c939ceb commit 712716a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyfolio/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,7 @@ def plot_max_median_position_concentration(positions, ax=None, **kwargs):
"""

if ax is None:
ax = plt.gcf()
ax = plt.gca()

alloc_summary = pos.get_max_median_position_concentration(positions)
colors = ['mediumblue', 'steelblue', 'tomato', 'firebrick']
Expand Down Expand Up @@ -1249,7 +1249,7 @@ def plot_sector_allocations(returns, sector_alloc, ax=None, **kwargs):
"""

if ax is None:
ax = plt.gcf()
ax = plt.gca()

sector_alloc.plot(title='Sector allocation over time',
alpha=0.5, ax=ax, **kwargs)
Expand Down

0 comments on commit 712716a

Please sign in to comment.