Changeset 2654 for trunk/GSASIIplot.py
- Timestamp:
- Jan 22, 2017 2:28:44 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r2653 r2654 2293 2293 new,plotNum,Page,Plot,lim = G2frame.G2plotNB.FindPlotTab('Error analysis','mpl') 2294 2294 if new: 2295 G2frame.Cmin = 0.0 2295 2296 G2frame.Cmax = 1.0 2296 2297 # save information needed to reload from tree and redraw … … 2352 2353 or multiple plots with waterfall and contour plots as options 2353 2354 ''' 2355 G2frame.ShiftDown = False 2354 2356 if not plotType: 2355 2357 plotType = G2frame.G2plotNB.plotList[G2frame.G2plotNB.nb.GetSelection()] … … 2357 2359 return 2358 2360 2361 def OnPlotKeyUp(event): 2362 if event.key == 'shift': 2363 G2frame.ShiftDown = False 2364 return 2365 2359 2366 def OnPlotKeyPress(event): 2367 if event.key == 'shift': 2368 G2frame.ShiftDown = True 2369 return 2360 2370 newPlot = False 2371 if G2frame.ShiftDown: event.key = event.key.upper() 2361 2372 if event.key == 'u': 2362 2373 if G2frame.Contour: … … 2369 2380 elif Page.Offset[1] > 0.: 2370 2381 Page.Offset[1] -= 1. 2382 elif event.key == 'U': 2383 G2frame.Cmin += (G2frame.Cmax - G2frame.Cmin)/20. 2384 elif event.key == 'D': 2385 G2frame.Cmin -= (G2frame.Cmax - G2frame.Cmin)/20. 2371 2386 elif event.key == 'l': 2372 2387 Page.Offset[0] -= 1. … … 2443 2458 else: 2444 2459 newPlot = True 2460 G2frame.Cmin = 0.0 2445 2461 G2frame.Cmax = 1.0 2446 2462 Page.canvas.mpl_connect('key_press_event', OnPlotKeyPress) 2463 Page.canvas.mpl_connect('key_release_event', OnPlotKeyUp) 2447 2464 Page.canvas.mpl_connect('motion_notify_event', OnMotion) 2448 2465 Page.Offset = [0,0] … … 2451 2468 if G2frame.Contour: 2452 2469 Page.Choice = (' key press','d: lower contour max','u: raise contour max', 2453 'i: interpolation method','s: color scheme','c: contour off','f: select data') 2470 'D: lower contour min','U: raise contour min', 2471 'i: interpolation method','s: color scheme','c: contour off','f: select data', 2472 ) 2454 2473 else: 2455 2474 Page.Choice = (' key press','l: offset left','r: offset right','d: offset down','u: offset up', … … 2530 2549 if G2frame.Contour and len(Pattern)>1: 2531 2550 acolor = mpl.cm.get_cmap(G2frame.ContourColor) 2532 Img = Plot.imshow(ContourZ,cmap=acolor,vmin= 0,vmax=Ymax*G2frame.Cmax,interpolation=G2frame.Interpolate,2551 Img = Plot.imshow(ContourZ,cmap=acolor,vmin=Ymax*G2frame.Cmin,vmax=Ymax*G2frame.Cmax,interpolation=G2frame.Interpolate, 2533 2552 extent=[ContourX[0],ContourX[-1],ContourY[0],ContourY[-1]],aspect='auto',origin='lower') 2534 2553 Page.figure.colorbar(Img)
Note: See TracChangeset
for help on using the changeset viewer.