Changeset 4516


Ignore:
Timestamp:
Jul 7, 2020 6:08:08 PM (16 months ago)
Author:
toby
Message:

doc build problem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r4508 r4516  
    212212#matplotlib 2.0.x dumbed down Paired to 16 colors -
    213213#   this restores the pre 2.0 Paired color map found in matplotlib._cm.py
    214 _Old_Paired_data = {'blue': [(0.0, 0.89019608497619629,
    215     0.89019608497619629), (0.090909090909090912, 0.70588237047195435,
    216     0.70588237047195435), (0.18181818181818182, 0.54117649793624878,
    217     0.54117649793624878), (0.27272727272727271, 0.17254902422428131,
    218     0.17254902422428131), (0.36363636363636365, 0.60000002384185791,
    219     0.60000002384185791), (0.45454545454545453, 0.10980392247438431,
    220     0.10980392247438431), (0.54545454545454541, 0.43529412150382996,
    221     0.43529412150382996), (0.63636363636363635, 0.0, 0.0),
    222     (0.72727272727272729, 0.83921569585800171, 0.83921569585800171),
    223     (0.81818181818181823, 0.60392159223556519, 0.60392159223556519),
    224     (0.90909090909090906, 0.60000002384185791, 0.60000002384185791), (1.0,
    225     0.15686275064945221, 0.15686275064945221)],
    226 
    227     'green': [(0.0, 0.80784314870834351, 0.80784314870834351),
    228     (0.090909090909090912, 0.47058823704719543, 0.47058823704719543),
    229     (0.18181818181818182, 0.87450981140136719, 0.87450981140136719),
    230     (0.27272727272727271, 0.62745100259780884, 0.62745100259780884),
    231     (0.36363636363636365, 0.60392159223556519, 0.60392159223556519),
    232     (0.45454545454545453, 0.10196078568696976, 0.10196078568696976),
    233     (0.54545454545454541, 0.74901962280273438, 0.74901962280273438),
    234     (0.63636363636363635, 0.49803921580314636, 0.49803921580314636),
    235     (0.72727272727272729, 0.69803923368453979, 0.69803923368453979),
    236     (0.81818181818181823, 0.23921568691730499, 0.23921568691730499),
    237     (0.90909090909090906, 1.0, 1.0), (1.0, 0.3490196168422699,
    238     0.3490196168422699)],
    239 
    240     'red': [(0.0, 0.65098041296005249, 0.65098041296005249),
    241     (0.090909090909090912, 0.12156862765550613, 0.12156862765550613),
    242     (0.18181818181818182, 0.69803923368453979, 0.69803923368453979),
    243     (0.27272727272727271, 0.20000000298023224, 0.20000000298023224),
    244     (0.36363636363636365, 0.9843137264251709, 0.9843137264251709),
    245     (0.45454545454545453, 0.89019608497619629, 0.89019608497619629),
    246     (0.54545454545454541, 0.99215686321258545, 0.99215686321258545),
    247     (0.63636363636363635, 1.0, 1.0), (0.72727272727272729,
    248     0.7921568751335144, 0.7921568751335144), (0.81818181818181823,
    249     0.41568627953529358, 0.41568627953529358), (0.90909090909090906,
    250     1.0, 1.0), (1.0, 0.69411766529083252, 0.69411766529083252)]}
    251 #This can be done on request for other colors
    252 mpl.cm.register_cmap('Paired',data=_Old_Paired_data,lut=256)
    253 blue = [tuple(1.-np.array(item)) for item in _Old_Paired_data['blue']]
    254 blue.reverse()
    255 green = [tuple(1.-np.array(item)) for item in _Old_Paired_data['green']]
    256 green.reverse()
    257 red = [tuple(1.-np.array(item)) for item in _Old_Paired_data['red']]
    258 red.reverse()
    259 Old_Paired_data_r = {'blue':blue,'green':green,'red':red}
    260 mpl.cm.register_cmap('Paired_r',data=Old_Paired_data_r,lut=256)
    261 
     214try:
     215    _Old_Paired_data = {'blue': [(0.0, 0.89019608497619629,
     216        0.89019608497619629), (0.090909090909090912, 0.70588237047195435,
     217        0.70588237047195435), (0.18181818181818182, 0.54117649793624878,
     218        0.54117649793624878), (0.27272727272727271, 0.17254902422428131,
     219        0.17254902422428131), (0.36363636363636365, 0.60000002384185791,
     220        0.60000002384185791), (0.45454545454545453, 0.10980392247438431,
     221        0.10980392247438431), (0.54545454545454541, 0.43529412150382996,
     222        0.43529412150382996), (0.63636363636363635, 0.0, 0.0),
     223        (0.72727272727272729, 0.83921569585800171, 0.83921569585800171),
     224        (0.81818181818181823, 0.60392159223556519, 0.60392159223556519),
     225        (0.90909090909090906, 0.60000002384185791, 0.60000002384185791), (1.0,
     226        0.15686275064945221, 0.15686275064945221)],
     227
     228        'green': [(0.0, 0.80784314870834351, 0.80784314870834351),
     229        (0.090909090909090912, 0.47058823704719543, 0.47058823704719543),
     230        (0.18181818181818182, 0.87450981140136719, 0.87450981140136719),
     231        (0.27272727272727271, 0.62745100259780884, 0.62745100259780884),
     232        (0.36363636363636365, 0.60392159223556519, 0.60392159223556519),
     233        (0.45454545454545453, 0.10196078568696976, 0.10196078568696976),
     234        (0.54545454545454541, 0.74901962280273438, 0.74901962280273438),
     235        (0.63636363636363635, 0.49803921580314636, 0.49803921580314636),
     236        (0.72727272727272729, 0.69803923368453979, 0.69803923368453979),
     237        (0.81818181818181823, 0.23921568691730499, 0.23921568691730499),
     238        (0.90909090909090906, 1.0, 1.0), (1.0, 0.3490196168422699,
     239        0.3490196168422699)],
     240
     241        'red': [(0.0, 0.65098041296005249, 0.65098041296005249),
     242        (0.090909090909090912, 0.12156862765550613, 0.12156862765550613),
     243        (0.18181818181818182, 0.69803923368453979, 0.69803923368453979),
     244        (0.27272727272727271, 0.20000000298023224, 0.20000000298023224),
     245        (0.36363636363636365, 0.9843137264251709, 0.9843137264251709),
     246        (0.45454545454545453, 0.89019608497619629, 0.89019608497619629),
     247        (0.54545454545454541, 0.99215686321258545, 0.99215686321258545),
     248        (0.63636363636363635, 1.0, 1.0), (0.72727272727272729,
     249        0.7921568751335144, 0.7921568751335144), (0.81818181818181823,
     250        0.41568627953529358, 0.41568627953529358), (0.90909090909090906,
     251        1.0, 1.0), (1.0, 0.69411766529083252, 0.69411766529083252)]}
     252    #This can be done on request for other colors
     253    mpl.cm.register_cmap('Paired',data=_Old_Paired_data,lut=256)
     254    blue = [tuple(1.-np.array(item)) for item in _Old_Paired_data['blue']]
     255    blue.reverse()
     256    green = [tuple(1.-np.array(item)) for item in _Old_Paired_data['green']]
     257    green.reverse()
     258    red = [tuple(1.-np.array(item)) for item in _Old_Paired_data['red']]
     259    red.reverse()
     260    Old_Paired_data_r = {'blue':blue,'green':green,'red':red}
     261    mpl.cm.register_cmap('Paired_r',data=Old_Paired_data_r,lut=256)
     262except:  # causes error in Sphinx
     263    pass
    262264# options for publication-quality Rietveld plots
    263265plotOpt = {}
Note: See TracChangeset for help on using the changeset viewer.