@plotting.customize<EOL>def create_txn_tear_sheet(returns, positions, transactions,<EOL>unadjusted_returns=None, estimate_intraday='<STR_LIT>',<EOL>return_fig=False):
positions = utils.check_intraday(estimate_intraday, returns,<EOL>positions, transactions)<EOL>vertical_sections = <NUM_LIT:6> if unadjusted_returns is not None else <NUM_LIT:4><EOL>fig = plt.figure(figsize=(<NUM_LIT>, vertical_sections * <NUM_LIT:6>))<EOL>gs = gridspec.GridSpec(vertical_sections, <NUM_LIT:3>, wspace=<NUM_LIT:0.5>, hspace=<NUM_LIT:0.5>)<EOL>ax_turnover = plt.subplot(gs[<NUM_LIT:0>, :])<EOL>ax_daily_volume = plt.subplot(gs[<NUM_LIT:1>, :], sharex=ax_turnover)<EOL>ax_turnover_hist = plt.subplot(gs[<NUM_LIT:2>, :])<EOL>ax_txn_timings = plt.subplot(gs[<NUM_LIT:3>, :])<EOL>plotting.plot_turnover(<EOL>returns,<EOL>transactions,<EOL>positions,<EOL>ax=ax_turnover)<EOL>plotting.plot_daily_volume(returns, transactions, ax=ax_daily_volume)<EOL>try:<EOL><INDENT>plotting.plot_daily_turnover_hist(transactions, positions,<EOL>ax=ax_turnover_hist)<EOL><DEDENT>except ValueError:<EOL><INDENT>warnings.warn('<STR_LIT>', UserWarning)<EOL><DEDENT>plotting.plot_txn_time_hist(transactions, ax=ax_txn_timings)<EOL>if unadjusted_returns is not None:<EOL><INDENT>ax_slippage_sweep = plt.subplot(gs[<NUM_LIT:4>, :])<EOL>plotting.plot_slippage_sweep(unadjusted_returns,<EOL>positions,<EOL>transactions,<EOL>ax=ax_slippage_sweep<EOL>)<EOL>ax_slippage_sensitivity = plt.subplot(gs[<NUM_LIT:5>, :])<EOL>plotting.plot_slippage_sensitivity(unadjusted_returns,<EOL>positions,<EOL>transactions,<EOL>ax=ax_slippage_sensitivity<EOL>)<EOL><DEDENT>for ax in fig.axes:<EOL><INDENT>plt.setp(ax.get_xticklabels(), visible=True)<EOL><DEDENT>if return_fig:<EOL><INDENT>return fig<EOL><DEDENT>
Generate a number of plots for analyzing a strategy's transactions.

Plots: turnover, daily volume, and a histogram of daily volume.

Parameters
----------
returns : pd.Series
    Daily returns of the strategy, noncumulative.
     - See full explanation in create_full_tear_sheet.
positions : pd.DataFrame
    Daily net position values.
     - See full explanation in create_full_tear_sheet.
transactions : pd.DataFrame
    Prices and amounts of executed trades. One row per trade.
     - See full explanation in create_full_tear_sheet.
unadjusted_returns : pd.Series, optional
    Daily unadjusted returns of the strategy, noncumulative.
    Will plot additional swippage sweep analysis.
     - See pyfolio.plotting.plot_swippage_sleep and
       pyfolio.plotting.plot_slippage_sensitivity
estimate_intraday: boolean or str, optional
    Approximate returns for intraday strategies.
    See description in create_full_tear_sheet.
return_fig : boolean, optional
    If True, returns the figure that was plotted on.