def _my_eps_formatter(logodata, format, ordered_alphabets) :
substitutions = {}<EOL>from_format =[<EOL>"<STR_LIT>",    "<STR_LIT>",           "<STR_LIT>",      <EOL>"<STR_LIT>",   "<STR_LIT>",           "<STR_LIT>",<EOL>"<STR_LIT>","<STR_LIT>",     "<STR_LIT>",<EOL>"<STR_LIT>",  "<STR_LIT>",         "<STR_LIT>",<EOL>"<STR_LIT>",     "<STR_LIT>",           "<STR_LIT>",<EOL>"<STR_LIT>",     "<STR_LIT>",           <EOL>"<STR_LIT>",  "<STR_LIT>",<EOL>"<STR_LIT>",      "<STR_LIT>",   "<STR_LIT>",<EOL>"<STR_LIT>",      "<STR_LIT>",   "<STR_LIT>",<EOL>"<STR_LIT>",        "<STR_LIT>",      "<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",    "<STR_LIT>",       "<STR_LIT>",<EOL>"<STR_LIT>",   "<STR_LIT>",      "<STR_LIT>",<EOL>"<STR_LIT>",        "<STR_LIT>",          <EOL>"<STR_LIT>",       "<STR_LIT>",          "<STR_LIT>",<EOL>"<STR_LIT>",            "<STR_LIT>",           "<STR_LIT>",<EOL>"<STR_LIT>", "<STR_LIT>",           "<STR_LIT>",<EOL>"<STR_LIT>",       "<STR_LIT>",       "<STR_LIT>",<EOL>"<STR_LIT>",   "<STR_LIT>",            "<STR_LIT>",<EOL>"<STR_LIT>"<EOL>]<EOL>for s in from_format :<EOL><INDENT>substitutions[s] = getattr(format,s)<EOL><DEDENT>substitutions["<STR_LIT>"] = str(format.show_boxes).lower()<EOL>def format_color(color):<EOL><INDENT>return  "<STR_LIT:U+0020>".join( ("<STR_LIT:[>",str(color.red) , str(color.green), <EOL>str(color.blue), "<STR_LIT:]>"))  <EOL><DEDENT>substitutions["<STR_LIT>"] = format_color(format.default_color)<EOL>colors = []  <EOL>if hasattr(format.color_scheme, '<STR_LIT>'):<EOL><INDENT>grouplist = format.color_scheme.rules<EOL><DEDENT>else:<EOL><INDENT>grouplist = format.color_scheme.groups<EOL><DEDENT>for group in grouplist:<EOL><INDENT>cf = format_color(group.color)<EOL>for s in group.symbols :<EOL><INDENT>colors.append( "<STR_LIT>"+s+"<STR_LIT>" + cf )<EOL><DEDENT><DEDENT>substitutions["<STR_LIT>"] = "<STR_LIT:\n>".join(colors)<EOL>data = []<EOL>conv_factor = None <EOL>data.append("<STR_LIT>")<EOL>seq_from = format.logo_start- format.first_index<EOL>seq_to = format.logo_end - format.first_index +<NUM_LIT:1><EOL>for seq_index in range(seq_from, seq_to) :<EOL><INDENT>logo_index = seq_index + format.first_index <EOL>stack_index = seq_index - seq_from<EOL>if stack_index!=<NUM_LIT:0> and (stack_index % format.stacks_per_line) ==<NUM_LIT:0> :<EOL><INDENT>data.append("<STR_LIT>")<EOL>data.append("<STR_LIT>")<EOL>data.append("<STR_LIT>")<EOL>data.append("<STR_LIT>")<EOL><DEDENT>data.append("<STR_LIT>" % format.annotate[seq_index] )<EOL>if conv_factor: <EOL><INDENT>stack_height = logodata.entropy[seq_index] * std_units[format.unit_name]<EOL><DEDENT>else :<EOL><INDENT>stack_height = <NUM_LIT:1.0> <EOL><DEDENT>s_d = dict(zip(logodata.alphabet, logodata.counts[seq_index]))<EOL>s = []<EOL>for aa in ordered_alphabets[seq_index]:<EOL><INDENT>if aa not in ['<STR_LIT:B>', '<STR_LIT:b>']:<EOL><INDENT>s.append((s_d[aa], aa))<EOL><DEDENT>else:<EOL><INDENT>s.append((s_d[aa], '<STR_LIT:U+0020>'))<EOL>
Generate a logo in Encapsulated Postscript (EPS)

    Modified from weblogo version 3.4 source code. 

    *ordered_alphabets* is a dictionary keyed by zero-indexed
    consecutive sites, with values giving order of characters
    from bottom to top.