def abu_profiles(p,ifig=<NUM_LIT:1>,xlm=xlm,ylm=(-<NUM_LIT:8>,<NUM_LIT:0>),show=False,abunds='<STR_LIT>',xaxis=xaxis_type, figsize1=(<NUM_LIT:8>,<NUM_LIT:8>)):
matplotlib.rc('<STR_LIT>',facecolor='<STR_LIT>',figsize=figsize1)<EOL>f, ([ax1,ax2],[ax3,ax4]) = pl.subplots(<NUM_LIT:2>, <NUM_LIT:2>, sharex=False, sharey=True, figsize=figsize1)<EOL>all_isos=[['<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>'],['<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>'], ['<STR_LIT>', '<STR_LIT>','<STR_LIT>', '<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>', '<STR_LIT>','<STR_LIT>', '<STR_LIT>', '<STR_LIT>','<STR_LIT>'],<EOL><NUM_LIT>'<STR_LIT:U+002C>'ca42'<STR_LIT:U+002C>'ca48'<STR_LIT:U+002C>'sc45'<STR_LIT:U+002C>'ti46'<STR_LIT:U+002C>'ti48'<STR_LIT:U+002C>'ti50'<STR_LIT:U+002C>'v50'<STR_LIT:U+002C>'v51'<STR_LIT:U+002C>'cr52'<STR_LIT:U+002C>'cr54'<STR_LIT:U+002C>'mn55'<STR_LIT:U+002C>'fe56']]<EOL>if abunds == '<STR_LIT>':<EOL>abus=[[],[],[],[]]<EOL>j=<NUM_LIT:0><EOL>for i, row in enumerate(all_isos):<EOL>for iso in row:<EOL>if iso in p.cols:<EOL>abus[i].append(iso)<EOL>j+=<NUM_LIT:1>  <EOL>abus1=[]<EOL>abus2 =[[],[],[],[]]<EOL>for l in range(len(abus)):<EOL>for k in range(len(abus[l])):<EOL>abus1.append(abus[l][k])<EOL>is_small_isos = False                <EOL>for i in range(len(abus)):<EOL>if len(abus[i]) < <NUM_LIT:5>:<EOL>is_small_isos = True<EOL>print("<STR_LIT>")<EOL>if is_small_isos:<EOL>n=<NUM_LIT:4><EOL>quo, rem = divmod(len(abus1), n)<EOL>for i in range(len(abus2)):<EOL>for k in range(i*quo,(i+<NUM_LIT:1>)*quo+rem):<EOL>abus2[i].append(abus1[k])<EOL>abus = abus2<EOL>else:<EOL>abus = abus    <EOL>ax = [ax1,ax2,ax3,ax4]<EOL>xxx = p.get('<STR_LIT>') if xaxis is "<STR_LIT>" else p.get('<STR_LIT>') <EOL>mass = p.get('<STR_LIT>')                      <EOL>radius = p.get('<STR_LIT>')*ast.rsun_cm/<NUM_LIT>  <EOL>if xaxis is "<STR_LIT>":<EOL>xxx = radius<EOL>if xlm[<NUM_LIT:0>] == <NUM_LIT:0> and xlm[<NUM_LIT:1>] == <NUM_LIT:0>:<EOL>indtop = <NUM_LIT:0><EOL>indbot = len(mass)-<NUM_LIT:1><EOL>else: <EOL>indbot = np.where(radius>=xlm[<NUM_LIT:0>])[<NUM_LIT:0>][-<NUM_LIT:1>]<EOL>indtop = np.where(radius<xlm[<NUM_LIT:1>])[<NUM_LIT:0>][<NUM_LIT:0>]<EOL>xll = (radius[indbot],radius[indtop])<EOL>xxlabel = "<STR_LIT>"<EOL>elif xaxis is "<STR_LIT>": <EOL>xxx = mass<EOL>xll = xlm<EOL>xxlabel = "<STR_LIT>"<EOL>else:<EOL>print("<STR_LIT>")<EOL>for i in range(<NUM_LIT:4>):<EOL>for thing in abus[i]:<EOL>ind = abus[i].index(thing)<EOL>ax[i].plot(xxx, np.log10(p.get(thing)), ls=u.linestylecb(ind,a,b)[<NUM_LIT:0>],marker=u.linestylecb(ind,a,b)[<NUM_LIT:1>], color=u.linestylecb(ind,a,b)[<NUM_LIT:2>],markevery=<NUM_LIT:50>,label=thing)<EOL>ax[i].set_ylim(ylm)<EOL>ax[i].set_xlim(xll)<EOL>ax[i].legend(loc=<NUM_LIT:1>)<EOL>ax[i].set_xlabel(xxlabel)<EOL>if i%<NUM_LIT:2> == <NUM_LIT:0>:<EOL>ax[i].set_ylabel('<STR_LIT>')<EOL>title_str = "<STR_LIT>"+'<STR_LIT>'+str(title_format%p.header_attr['<STR_LIT>'])+'<STR_LIT>'+str(title_format%p.header_attr['<STR_LIT>'])+'<STR_LIT>'+str(int(p.header_attr['<STR_LIT>']))<EOL>f.suptitle(title_str, fontsize=<NUM_LIT:12>)<EOL>f.tight_layout()<EOL>f.subplots_adjust(left=<NUM_LIT:0.1>, bottom=<NUM_LIT:0.1>, right=<NUM_LIT>, top=<NUM_LIT>, wspace=<NUM_LIT:0>, hspace=<NUM_LIT:0.1>)<EOL>f.savefig('<STR_LIT>'+str(int(p.header_attr['<STR_LIT>'])).zfill(<NUM_LIT:6>)+'<STR_LIT>')<EOL>
Four panels of abundance plots

    Parameters
    ----------

    p : instance
      mesa_profile instance

    xlm : tuple
      xlimits: mass_min, mass_max

    abus : 'All' plots many 'commonly used' isotopes up to Fe if they are in your mesa output.
    otherwise provide a list of lists of desired abus 

    show : Boolean
      False  for batch use
      True   for interactive use

    xaxis : character
      Lagrangian    mass is radial mass coordinate
      Eulerian      radius is radial coordinate, in Mm