def plot_isopattern(self,isos,normiso,spec=None,tpulse='<STR_LIT:all>',dcycle=<NUM_LIT>,fign=<NUM_LIT:1>,deltay=False,logy=False,<EOL>iniabufile='<STR_LIT>',legend=None,plt_symb='<STR_LIT:o>',plt_col='<STR_LIT:k>',plt_lt='<STR_LIT:->',<EOL>plt_lw=<NUM_LIT:1.>,plt_show=True):
from . import utils as u<EOL>if len(iniabufile.split('<STR_LIT:/>')) == <NUM_LIT:1> :   <EOL><INDENT>scriptpathtmp = __file__<EOL>if len(scriptpathtmp.split('<STR_LIT:/>')) == <NUM_LIT:1>:   <EOL><INDENT>scriptpathtmp = os.path.abspath('<STR_LIT:.>') + '<STR_LIT>'   <EOL><DEDENT>svnpathtmp = '<STR_LIT:/>'<EOL>for i in range(len(scriptpathtmp.split('<STR_LIT:/>'))-<NUM_LIT:3>):   <EOL><INDENT>if scriptpathtmp.split('<STR_LIT:/>')[i] != '<STR_LIT>':<EOL><INDENT>svnpathtmp += scriptpathtmp.split('<STR_LIT:/>')[i] + '<STR_LIT:/>'<EOL><DEDENT><DEDENT>iniabufile = svnpathtmp + '<STR_LIT>' + iniabufile   <EOL><DEDENT>if type(isos) == str:<EOL><INDENT>tmp = u.iniabu.stable_el<EOL>tmp2 = -<NUM_LIT:1><EOL>for i in range(len(tmp)):<EOL><INDENT>if isos == tmp[i][<NUM_LIT:0>]:<EOL><INDENT>tmp2 = tmp[i]<EOL>break<EOL><DEDENT><DEDENT>if tmp2==-<NUM_LIT:1>:<EOL><INDENT>print('<STR_LIT>')<EOL>return None<EOL><DEDENT>isos_tmp = []<EOL>for i in range(<NUM_LIT:1>,len(tmp2)):<EOL><INDENT>isos_tmp.append([isos + '<STR_LIT:->' + str(int(tmp2[i])),normiso])<EOL><DEDENT>isos = isos_tmp<EOL><DEDENT>elif type(isos) == list:<EOL><INDENT>isos_tmp = []<EOL>for i in range(len(isos)):<EOL><INDENT>isos_tmp.append([isos[i], normiso])<EOL><DEDENT>isos = isos_tmp<EOL><DEDENT>else:<EOL><INDENT>print('<STR_LIT>')<EOL>return None<EOL><DEDENT>isoslist = []<EOL>for i in range(len(isos)):<EOL><INDENT>isoslist.append(isos[i][<NUM_LIT:0>])<EOL><DEDENT>for i in range(len(isos)):<EOL><INDENT>if isos[i][<NUM_LIT:0>] == isos[i][<NUM_LIT:1>]:<EOL><INDENT>posnorm = i<EOL>break<EOL><DEDENT><DEDENT>inut = u.iniabu(iniabufile)<EOL>ss_rat = []<EOL>for i in range(len(isos)):<EOL><INDENT>ss_rat.append(inut.isoratio_init(isos[i]))<EOL><DEDENT>for i in range(len(isos)):<EOL><INDENT>ss_rat[i] *= (old_div(float(isos[i][<NUM_LIT:1>].split('<STR_LIT:->')[<NUM_LIT:1>]), float(isos[i][<NUM_LIT:0>].split('<STR_LIT:->')[<NUM_LIT:1>])))<EOL><DEDENT>if self._classTest() == '<STR_LIT>':<EOL><INDENT>if spec==None:<EOL><INDENT>spec = str(eval(input('<STR_LIT>'<EOL>'<STR_LIT>')))<EOL><DEDENT>if spec == '<STR_LIT>':<EOL><INDENT>print('<STR_LIT>')<EOL>tp_pos, co_return = self._tp_finder(dcycle)<EOL>tp_pos_tmp = []<EOL>co_return_tmp  = []<EOL>tp_pos_tmp.append(<NUM_LIT:1>)<EOL>co_return_tmp.append(co_return[<NUM_LIT:0>])<EOL>for i in range(len(tp_pos)):<EOL><INDENT>tp_pos_tmp.append(tp_pos[i])<EOL>co_return_tmp.append(co_return[i])<EOL><DEDENT>tp_pos = tp_pos_tmp<EOL>co_return = co_return_tmp<EOL>iso_alldata = self.get(tp_pos,isoslist)<EOL>norm_isotope = np.zeros(len(iso_alldata))<EOL>for i in range(len(iso_alldata)):<EOL><INDENT>norm_isotope[i] = iso_alldata[i][posnorm]<EOL><DEDENT>iso_ratios = np.zeros((len(iso_alldata),len(iso_alldata[<NUM_LIT:0>])))<EOL>for i in range(len(iso_ratios)):<EOL><INDENT>for j in range(len(iso_ratios[i])):<EOL><INDENT>iso_ratios[i][j] = old_div(iso_alldata[i][j], norm_isotope[i])<EOL><DEDENT><DEDENT>for i in range(len(iso_ratios)):<EOL><INDENT>for j in range(len(iso_ratios[i])):<EOL><INDENT>iso_ratios[i][j] *= old_div(float(isos[j][<NUM_LIT:1>].split('<STR_LIT:->')[<NUM_LIT:1>]), float(isos[j][<NUM_LIT:0>].split('<STR_LIT:->')[<NUM_LIT:1>]))<EOL><DEDENT><DEDENT>if deltay:<EOL><INDENT>for i in range(len(iso_ratios)):<EOL><INDENT>for j in range(len(iso_ratios[i])):<EOL><INDENT>iso_ratios[i][j] = (old_div(iso_ratios[i][j], ss_rat[j]) - <NUM_LIT:1.>) * <NUM_LIT><EOL><DEDENT><DEDENT><DEDENT>style = []<EOL>if tpulse == '<STR_LIT>':<EOL><INDENT>ydata = [iso_ratios[len(iso_ratios)-<NUM_LIT:1>]]<EOL>style = [[plt_symb + plt_lt,  plt_col, plt_col, '<STR_LIT>', '<STR_LIT:1>', legend]]<EOL><DEDENT>elif tpulse == '<STR_LIT:o>':<EOL><INDENT>ydata = []<EOL>style = []<EOL>for i in range(len(co_return)):<EOL><INDENT>if co_return[i] < <NUM_LIT:1>:<EOL><INDENT>ydata.append(iso_ratios[i])<EOL>style.append([plt_symb + plt_lt,  plt_col, plt_col, '<STR_LIT>', '<STR_LIT:1>', legend])<EOL><DEDENT><DEDENT>if ydata == []:<EOL><INDENT>print('<STR_LIT>')<EOL>return None<EOL><DEDENT><DEDENT>else:   <EOL><INDENT>msizelst = []   <EOL>crich_list = []<EOL>for i in range(len(co_return)):<EOL><INDENT>if co_return[i] >= <NUM_LIT:1>:<EOL><INDENT>crich_list.append(co_return[i])<EOL><DEDENT><DEDENT>crich_max = np.max(crich_list)<EOL>crich_min = np.min(crich_list)<EOL>slope_tmp = old_div(<NUM_LIT>, (crich_max-crich_min))<EOL>b_tmp = <NUM_LIT> - slope_tmp * crich_min<EOL>for i in range(len(crich_list)):<EOL><INDENT>msizelst.append(crich_list[i] * slope_tmp + b_tmp)<EOL><DEDENT>ydata = []<EOL>style = []<EOL>j=<NUM_LIT:0><EOL>for i in range(len(co_return)):<EOL><INDENT>if co_return[i] < <NUM_LIT:1.>:<EOL><INDENT>j += <NUM_LIT:1><EOL>if tpulse == '<STR_LIT:all>':<EOL><INDENT>ydata.append(iso_ratios[i])<EOL>style.append([plt_symb + '<STR_LIT>', plt_col, plt_col, <NUM_LIT:1.>, <NUM_LIT:1.>, None])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>ydata.append(iso_ratios[i])<EOL>style.append([plt_symb + plt_lt, plt_col, plt_col, msizelst[i-j], <NUM_LIT:1.>, legend])<EOL><DEDENT><DEDENT><DEDENT><DEDENT>elif spec=='<STR_LIT>':<EOL><INDENT>print('<STR_LIT>')<EOL>return None<EOL><DEDENT>else:<EOL><INDENT>print('<STR_LIT>')<EOL>return None<EOL><DEDENT><DEDENT>xdata = []<EOL>for i in range(len(isos)):<EOL><INDENT>xdata.append(int(isos[i][<NUM_LIT:0>].split('<STR_LIT:->')[<NUM_LIT:1>]))<EOL><DEDENT>params = {'<STR_LIT>':  <NUM_LIT:20>,<EOL>'<STR_LIT>':   <NUM_LIT>,<EOL>'<STR_LIT>': <NUM_LIT>,<EOL>'<STR_LIT>': <NUM_LIT>,<EOL>'<STR_LIT>': <NUM_LIT>}<EOL>pl.rcParams.update(params)<EOL>pl.figure(fign)<EOL>for i in range(len(ydata)):<EOL><INDENT>pl.plot(xdata,ydata[i],style[i][<NUM_LIT:0>],c=style[i][<NUM_LIT:1>],mfc=style[i][<NUM_LIT:2>],ms=float(style[i][<NUM_LIT:3>]),<EOL>label=style[i][<NUM_LIT:5>],linewidth=plt_lw,mew=float(style[i][<NUM_LIT:4>]))<EOL><DEDENT>pl.xlim([xdata[<NUM_LIT:0>]-<NUM_LIT:0.5>,xdata[len(xdata)-<NUM_LIT:1>]+<NUM_LIT:0.5>])<EOL>pl.xlabel('<STR_LIT>')<EOL>if deltay:<EOL><INDENT>pl.ylabel('<STR_LIT>' + normiso.split('<STR_LIT:->')[<NUM_LIT:0>] + '<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>pl.ylabel('<STR_LIT>'+ normiso.split('<STR_LIT:->')[<NUM_LIT:0>] + '<STR_LIT>')<EOL><DEDENT>pl.gcf().subplots_adjust(bottom=<NUM_LIT>)<EOL>pl.gcf().subplots_adjust(left=<NUM_LIT>)<EOL>if logy:<EOL><INDENT>pl.semilogy()<EOL><DEDENT>if plt_show:<EOL><INDENT>pl.show()<EOL><DEDENT>
This routine plots isotopic pattern plots for different input along with grain data.

Parameters
----------
isos : list / string
    Enter the list of isotopes that you want to consider here. The list should
    be given in the standard format, e.g., ['Fe-54','Fe-56','Fe-57','Fe-58'] or
    give the element as a string if you want to consider all stable isotopes,
    e.g., 'Fe'
normiso : string
    Give the isotope all the ratios should be normalized to here, e.g., 'Fe-56'
spec : string, optional
    What specifications do you want to do when coming from nugridse models. Choose 'surf' for
    surface models or 'exp' for explosions (out files)
tpulse : string, optional
    In case you have an AGB star, here you decide which thermal pulse to plot. You can choose
    'all' (default) to plot all TPs, 'c' or 'o' for all Carbon (C/O > 1) or all Oxygen
    (C/O < 1) rich, respectively, or 'last' for the last thermal pulse only
dcycle : integer, optional
    Difference between cycles to take for thermal pulse searching, if searching is
    deactivated, dcycle describes how often cycles are sampled.  The default is 500.
fign : integer, optional
    Number of the figure
deltay : boolean, optional
    Do you want to do delta values on y axis or regular ratios?
logy : boolean, optional
    Y axis logarithmic?
iniabufile : string, optional
    Initial abundance file. Use absolute path for your file or filename to choose a
    given file in USEEPP. Attention: You need a standard tree checked out from SVN
legend : string, optional
    Legend for your model / grains. For grains the legend is automatically taken from the
    grain class
plt_symb : string, optional
    Symbol for the plot. In case of grains, this is handled automatically.
plt_col : string / float, optional
    Color for plotted curve. In case of grains, this is handled automatically.
plt_lt : string, optional
    line type for plot.
plt_lw : float, optional
    Line width for plot.
plt_show : boolean, optional
    Show plot?