diff options
Diffstat (limited to 'python/mark_backtest_underpar.py')
| -rw-r--r-- | python/mark_backtest_underpar.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/python/mark_backtest_underpar.py b/python/mark_backtest_underpar.py index 307a1f9a..0465049e 100644 --- a/python/mark_backtest_underpar.py +++ b/python/mark_backtest_underpar.py @@ -147,11 +147,15 @@ def pretty_plot(df_long): sb.set_style("whitegrid") sb.set_context("notebook") - order = ['LMCG','BROKER','BVAL','IDC','MARKIT','PRICESERVE','PRICINGDIRECT','REUTERS','S&P'] + order = ['LMCG','BROKER','BVAL','IDC','MARKIT','PRICESERVE', + 'PRICINGDIRECT','REUTERS','S&P'] sb.set_palette(sb.hls_palette(10, l=.4, s=.8)) - grid = sb.FacetGrid(df_long, hue='source', hue_kws={'s':[50] + [20]*9, 'marker': ["o"]+["s"]*9, 'alpha': [1]+[.4]*9}, legend_out=True, aspect = 2.1, size = 4, hue_order = order) + grid = sb.FacetGrid(df_long, hue='source', hue_kws={'s':[50] + [20]*9, + 'marker': ["o"]+["s"]*9, 'alpha': [1]+[.4]*9}, legend_out=True, + aspect=2.1, height= 4, hue_order=order) grid.set(ylim=(0, 105), xlim=(0, 105)) ax = grid.map(plt.scatter, 'mark', 'price').add_legend() ax.set_axis_labels('Mark', 'sale price') - ax.fig.savefig("/home/serenitas/edwin/backtest.png") + plt.plot([100, 0], [100, 0], color="black", lw=2, linestyle='solid') + ax.fig.savefig("/home/serenitas/edwin/PythonGraphs/backtest.png") |
