Changeset 4652 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Nov 8, 2020 7:28:34 AM (13 months ago)
Author:
vondreele
Message:

fix colormap problem for mpl 3.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r4650 r4652  
    251251        1.0, 1.0), (1.0, 0.69411766529083252, 0.69411766529083252)]}
    252252    #This can be done on request for other colors
    253     mpl.cm.register_cmap('Paired',data=_Old_Paired_data,lut=256)
     253    oldpaired = mpl.colors.LinearSegmentedColormap('Paired',_Old_Paired_data,N=256)
     254    mpl.cm.register_cmap(cmap=oldpaired,lut=256)   
    254255    blue = [tuple(1.-np.array(item)) for item in _Old_Paired_data['blue']]
    255256    blue.reverse()
     
    259260    red.reverse()
    260261    Old_Paired_data_r = {'blue':blue,'green':green,'red':red}
    261     mpl.cm.register_cmap('Paired_r',data=Old_Paired_data_r,lut=256)
     262    oldpaired_r = mpl.colors.LinearSegmentedColormap('Paired_r',Old_Paired_data_r,N=256)
     263    mpl.cm.register_cmap(cmap=oldpaired_r,lut=256)   
     264
    262265except:  # causes error in Sphinx
    263266    pass
Note: See TracChangeset for help on using the changeset viewer.