def remove_axis_junk(ax, which=['<STR_LIT:right>', '<STR_LIT>']):
for loc, spine in ax.spines.iteritems():<EOL><INDENT>if loc in which:<EOL><INDENT>spine.set_color('<STR_LIT:none>')            <EOL><DEDENT><DEDENT>ax.xaxis.set_ticks_position('<STR_LIT>')<EOL>ax.yaxis.set_ticks_position('<STR_LIT:left>')<EOL>
remove upper and right axis