Changeset 4484
- Timestamp:
- Jun 12, 2020 8:41:52 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIphsGUI.py
r4479 r4484 9532 9532 elif val == 'TLS': 9533 9533 RBObj['ThermalMotion'][0] = 'TLS' 9534 elif val == 'None': 9535 RBObj['ThermalMotion'][0] = 'None' 9534 9536 wx.CallAfter(FillRigidBodyGrid,True) 9535 9537 if val != 'None': -
trunk/GSASIIplot.py
r4482 r4484 213 213 # this restores the pre 2.0 Paired color map found in matplotlib._cm.py 214 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)],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 226 227 227 'green': [(0.0, 0.80784314870834351, 0.80784314870834351), … … 251 251 #This can be done on request for other colors 252 252 mpl.cm.register_cmap('Paired',data=_Old_Paired_data,lut=256) 253 try: 254 mpl.cm.register_cmap('Paired_r',data=mpl.cm._reverse_cmap_spec(_Old_Paired_data),lut=256) 255 except: 256 if GSASIIpath.GetConfigValue('debug'): 257 print('MPL register_cmap for Paired_r failed') 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) 258 261 259 262 # options for publication-quality Rietveld plots … … 5099 5102 Plot.set_zlabel(labelZ,fontsize=14) 5100 5103 Plot.set_title(Title) 5101 Page.figure.colorbar(mcolors,shrink=0.75,label='Rotation',boundaries=range(91)) 5104 try: 5105 Page.figure.colorbar(mcolors,shrink=0.75,label='Rotation',boundaries=range(91)) 5106 except TypeError: 5107 print('mpl error - no colorbar shown') 5102 5108 Page.canvas.draw() 5103 5109 … … 9469 9475 cent = [View[2]/2,View[3]/2] 9470 9476 oldxy = defaults['oldxy'] 9471 if dxy[0] == dxy[1] == 0: return # on Mac motion can be less than a full pixel!9472 9477 if not len(oldxy): oldxy = list(newxy) 9473 9478 dxy = newxy-oldxy 9479 if dxy[0] == dxy[1] == 0: return # on Mac motion can be less than a full pixel! 9474 9480 defaults['oldxy'] = list(newxy) 9475 9481 V = defaults['viewDir'] … … 10184 10190 if not len(oldxy): oldxy = list(newxy) 10185 10191 dxy = newxy-oldxy 10186 if dxy[0] == dxy[1] == 0: return# on Mac motion can be less than a full pixel!10192 if not np.any(dxy): return # on Mac motion can be less than a full pixel! 10187 10193 defaults['oldxy'] = list(newxy) 10188 10194 V = np.array([dxy[1],dxy[0],0.]) … … 10205 10211 cent = [View[2]/2,View[3]/2] 10206 10212 oldxy = defaults['oldxy'] 10207 if dxy[0] == dxy[1] == 0: return # on Mac motion can be less than a full pixel!10208 10213 if not len(oldxy): oldxy = list(newxy) 10209 10214 dxy = newxy-oldxy 10215 if not np.any(dxy): return # on Mac motion can be less than a full pixel! 10210 10216 defaults['oldxy'] = list(newxy) 10211 10217 V = defaults['viewDir']
Note: See TracChangeset
for help on using the changeset viewer.