Added return_fig boolean parameter to create_full_tear_sheet() and create_simple_tear_sheet() #694
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Modified create_full_tear_sheet() and create_simple_tear_sheet() to optionally return matplotlib figures based on the return_fig boolean parameter, in analogy to other tear sheet functions, such as create_returns_tear_sheet(), create_position_tear_sheet() etc. Now these two tear sheet functions can be used outside of IPython (%matplotlib inline) environments to capture these tear sheets and display them, convert them to pdf files etc.
If return_fig==True, create_full_tear_sheet() now returns the following dictionary containing all the matplotlib figures that were created internally:
{
'returns': fig_returns,
'interesting_times': fig_interesting_times,
'position': fig_position,
'txn': fig_txn,
'round_trip': fig_round_trip,
'capacity': fig_capacity,
'perf_attrib': fig_perf_attrib
}
And if return_fig==True, create_simple_tear_sheet() returns the matplotlib figure already created internally.