Changeset 4528


Ignore:
Timestamp:
Jul 20, 2020 9:35:19 AM (15 months ago)
Author:
vondreele
Message:

change "if 'mag' ..." to "if 'magline' ..." in various places in Publish codes to allow 'mag' to be in a magnetic phase name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r4519 r4528  
    34043404        for i,l in enumerate(Plot.lines):
    34053405            lbl = l.get_label()
    3406             if 'mag' in lbl:
     3406            if 'magline' in lbl:
    34073407                pass
    34083408            elif lbl[1:] in plotOpt['lineList']: # item not in legend
     
    35343534        for i,l in enumerate(Plot.lines):
    35353535            lbl = l.get_label()
    3536             if 'mag' not in lbl: continue
     3536            if 'magline' not in lbl: continue
    35373537            #ax0.axvline(l.get_data()[0][0],color='0.5',dashes=(1,1))
    35383538            # vertical line
     
    35453545            fp.write(s)
    35463546        for l in Plot.texts:
    3547             if 'mag' not in l.get_label(): continue
     3547            if 'magline' not in l.get_label(): continue
    35483548            if l.xycoords[0] == 'data':
    35493549                xpos = l.get_position()[0]
     
    38793879        for i,l in enumerate(Plot.lines):
    38803880            lbl = l.get_label()
    3881             if 'mag' not in lbl: continue
     3881            if 'magline' not in lbl: continue
    38823882            j += 1
    38833883            fp.write('WAVES /D/O mag{0}X, mag{0}\nBEGIN\n'.format(j))
     
    38873887            fp.write('X ModifyGraph lstyle(mag{0})=3,rgb(mag{0})=(0,0,0)\n'.format(j))
    38883888        for l in Plot.texts:
    3889             if 'mag' not in l.get_label(): continue
     3889            if 'magline' not in l.get_label(): continue
    38903890            if l.xycoords[0] == 'data':
    38913891                xpos = l.get_position()[0]
     
    39253925            else:
    39263926                lbl = l.get_label()
    3927             if 'mag' in lbl:
     3927            if 'magline' in lbl:
    39283928                pass
    39293929            elif lbl in ('obs','calc','bkg','zero','diff'):
     
    39563956        for l in Plot.texts:
    39573957            lbl = l.get_label()
    3958             if 'mag' not in lbl: continue
     3958            if 'magline' not in lbl: continue
    39593959            if l.xycoords == 'axes fraction':
    39603960                lbl = 'initial-mag'
     
    41984198        else:
    41994199            lbl = l.get_label()
    4200         if 'mag' in lbl:
     4200        if 'magline' in lbl:
    42014201            ax0.axvline(l.get_data()[0][0],color='0.5',dashes=(1,1))
    42024202        elif lbl in ('obs','calc','bkg','zero','diff'):
     
    42494249                legLine.append(art[0])
    42504250    for l in Plot.texts:
    4251         if 'mag' not in l.get_label(): continue
     4251        if 'magline' not in l.get_label(): continue
    42524252        ax0.annotate(l.get_text(),
    42534253                    xy=(l.get_position()), xycoords=l.xycoords,
Note: See TracChangeset for help on using the changeset viewer.