From f2eef224fbf9ce0ccc4cec8ee644c7d62467833f Mon Sep 17 00:00:00 2001 From: Andrew Campbell Date: Fri, 16 Oct 2015 10:57:54 -0400 Subject: [PATCH] fixed sharex turnover plot bug --- pyfolio/plotting.py | 2 +- pyfolio/tears.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyfolio/plotting.py b/pyfolio/plotting.py index d6898bde..c67be2e4 100644 --- a/pyfolio/plotting.py +++ b/pyfolio/plotting.py @@ -1023,7 +1023,7 @@ def plot_turnover(returns, transactions, positions, y_axis_formatter = FuncFormatter(utils.one_dec_places) ax.yaxis.set_major_formatter(FuncFormatter(y_axis_formatter)) - + df_turnover = txn.get_turnover(transactions, positions) df_turnover_by_month = df_turnover.resample("M") df_turnover.plot(color='steelblue', alpha=1.0, lw=0.5, ax=ax, **kwargs) diff --git a/pyfolio/tears.py b/pyfolio/tears.py index d6a3df21..7857ede4 100644 --- a/pyfolio/tears.py +++ b/pyfolio/tears.py @@ -422,7 +422,7 @@ def create_txn_tear_sheet(returns, positions, transactions, warnings.warn('Unable to generate turnover plot.', UserWarning) if unadjusted_returns is not None: - ax_slippage_sweep = plt.subplot(gs[3, :], sharex=ax_turnover) + ax_slippage_sweep = plt.subplot(gs[3, :]) plotting.plot_slippage_sweep(unadjusted_returns, transactions, positions,