Changeset 3349


Ignore:
Timestamp:
Apr 17, 2018 7:39:42 PM (5 years ago)
Author:
toby
Message:

allow publication plot to work with older MPL versions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r3347 r3349  
    30563056        '''
    30573057        hcfigure = mpl.figure.Figure(dpi=plotOpt['dpi'],figsize=(plotOpt['width'],plotOpt['height']))
    3058 #        hccanvas = hcCanvas(hcfigure)
    30593058        CopyRietveldPlot(G2frame,Pattern,Plot,Page,hcfigure)
    30603059        longFormatName,typ = plotOpt['format'].split(',')
     
    30643063            dlg.EndModal(wx.ID_OK)
    30653064        elif fil:
     3065            if hcfigure.canvas is None:
     3066                if GSASIIpath.GetConfigValue('debug'): print('creating canvas')
     3067                hccanvas = hcCanvas(hcfigure)
    30663068            hcfigure.savefig(fil,format=typ.strip())
    30673069            dlg.EndModal(wx.ID_OK)
     
    32543256            mew = l.get_mew()
    32553257            if lbl[1:] == 'obs':
    3256                 siz = plotOpt['markerSiz']
     3258                siz = float(plotOpt['markerSiz'])
    32573259                marker = plotOpt['markerSym']
    3258                 mew = plotOpt['markerWid']
     3260                mew = float(plotOpt['markerWid'])
    32593261            else:
    3260                 lineWid = plotOpt['lineWid']
     3262                lineWid = float(plotOpt['lineWid'])
    32613263            c = plotOpt['colors'].get(lbl[1:],l.get_color())
    32623264            if sum(c) == 4.0: continue
     
    32753277            c = plotOpt['colors'].get(lbl,l.get_color())
    32763278            #siz = l.get_markersize()
    3277             siz = plotOpt['tickSiz']
     3279            siz = float(plotOpt['tickSiz'])
    32783280            #mew = l.get_mew()
    3279             mew = plotOpt['tickWid']
     3281            mew = float(plotOpt['tickWid'])
    32803282            if sum(c) == 4.0: continue
    32813283            if not plotOpt['legend'].get(lbl):
     
    32963298                    verticalalignment='bottom',
    32973299                    horizontalalignment=l.get_horizontalalignment(),
    3298                     fontsize=plotOpt['labelSize'])
     3300                    fontsize=float(plotOpt['labelSize']))
    32993301    rsig = np.sqrt(Pattern[1][2])
    33003302    rsig[rsig>1] = 1
Note: See TracChangeset for help on using the changeset viewer.