<s> '''<STR_LIT>''' <EOL> from matplotlib . pyplot import figure , plot , show , legend , xlabel , ylabel , savefig , fill , fill_between , errorbar , xlim <EOL> from numpy . ma . core import mean , std , shape , sqrt <EOL> from pickle import load <EOL> from kameleon_mcmc . paper_figures import latex_plot_init <EOL> import matplotlib as mpl <EOL> from numpy . ma . extras import median <EOL> import sys <EOL> import os <EOL> if len ( sys . argv ) <= <NUM_LIT:1> : <EOL> print "<STR_LIT>" , str ( sys . argv [ <NUM_LIT:0> ] ) . split ( os . sep ) [ - <NUM_LIT:1> ] , "<STR_LIT>" <EOL> exit ( ) <EOL> which_plot = str ( sys . argv [ <NUM_LIT:1> ] ) <EOL> if len ( sys . argv ) >= <NUM_LIT:3> : <EOL> highlight = str ( sys . argv [ <NUM_LIT:2> ] ) <EOL> else : <EOL> highlight = None <EOL> if len ( sys . argv ) >= <NUM_LIT:4> : <EOL> directory = str ( sys . argv [ <NUM_LIT:3> ] ) <EOL> else : <EOL> directory = '<STR_LIT>' <EOL> mpl . rcParams [ '<STR_LIT>' ] = True <EOL> mpl . rcParams [ '<STR_LIT>' ] = True <EOL> sampler_names_short = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> sampler_names = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> colours = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> ii = <NUM_LIT:0> <EOL> for sampler_name in sampler_names : <EOL> filename = directory + sampler_name + "<STR_LIT>" <EOL> f = open ( filename , "<STR_LIT:r>" ) <EOL> upto , mmds , mean_dist = load ( f ) <EOL> trials = shape ( mean_dist ) [ <NUM_LIT:1> ] <EOL> figure ( <NUM_LIT:1> ) <EOL> if which_plot == "<STR_LIT>" : <EOL> stds = std ( mean_dist , <NUM_LIT:1> ) / sqrt ( trials ) <EOL> means = mean ( mean_dist , <NUM_LIT:1> ) <EOL> if which_plot == "<STR_LIT>" : <EOL> stds = std ( mmds , <NUM_LIT:1> ) / sqrt ( trials ) <EOL> means = mean ( mmds , <NUM_LIT:1> ) <EOL> zscore = <NUM_LIT> <EOL> yerr = zscore * stds <EOL> if highlight == "<STR_LIT>" : <EOL> condition = sampler_name == "<STR_LIT>" <EOL> elif highlight == "<STR_LIT>" : <EOL> condition = sampler_name == "<STR_LIT>" or sampler_name == "<STR_LIT>" <EOL> elif highlight == "<STR_LIT>" : <EOL> condition = sampler_name == "<STR_LIT>" <EOL> else : <EOL> condition = True <EOL> if condition : <EOL> errorbar ( upto , means , yerr = yerr , fmt = '<STR_LIT>' , color = colours [ ii ] ) <EOL> else : <EOL> errorbar ( upto , means , yerr = yerr , fmt = '<STR_LIT>' , alpha = <NUM_LIT:0.1> , color = colours [ ii ] , ecolor = '<STR_LIT>' ) <EOL> ii += <NUM_LIT:1> <EOL> legend ( sampler_names_short ) <EOL> xlabel ( "<STR_LIT>" , fontsize = <NUM_LIT:12> ) <EOL> xlim ( <NUM_LIT> , <NUM_LIT> ) <EOL> if which_plot == "<STR_LIT>" : <EOL> ylabel ( "<STR_LIT>" + r"<STR_LIT>" , fontsize = <NUM_LIT:12> ) <EOL> if which_plot == "<STR_LIT>" : <EOL> ylabel ( "<STR_LIT>" , fontsize = <NUM_LIT:12> ) <EOL> show ( ) </s>
