Changeset cad617b in sasview for src/sas/sasgui/plottools


Ignore:
Timestamp:
Dec 8, 2016 3:46:27 AM (8 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
b4b8589, d1fb22ee
Parents:
416fa8f
Message:

Code review issues, fixing matplotlib behaviour in unit testing, minor fixes.

Location:
src/sas/sasgui/plottools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/plottools/PlotPanel.py

    rf74bd6e rcad617b  
    1010matplotlib.interactive(False) 
    1111#Use the WxAgg back end. The Wx one takes too long to render 
    12 matplotlib.use('WXAgg') 
     12#matplotlib.use('WXAgg') 
    1313from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg 
    1414from matplotlib.figure import Figure 
  • src/sas/sasgui/plottools/config.py

    r6d05e1d rcad617b  
    3131 
    3232plot_version = "0.98" 
    33 plot_backend = "WXAgg" 
     33#plot_backend = "WXAgg" 
     34plot_backend = "Qt4Agg" 
    3435 
    3536# Sort out matplotlib version 
  • src/sas/sasgui/plottools/plottables.py

    r821c330 rcad617b  
    676676        # Sanity check 
    677677        # Do the transofrmation only when x and y are empty 
    678         has_err_x = not (dx == None or len(dx) == 0) 
    679         has_err_y = not (dy == None or len(dy) == 0) 
    680  
    681         if(x != None) and (y != None): 
    682             if not dx == None and not len(dx) == 0 and not len(x) == len(dx): 
     678        has_err_x = not (dx is None or len(dx) == 0) 
     679        has_err_y = not (dy is None or len(dy) == 0) 
     680 
     681        if(x is not None) and (y is not None): 
     682            if not dx is None and not len(dx) == 0 and not len(x) == len(dx): 
    683683                msg = "Plottable.View: Given x and dx are not" 
    684684                msg += " of the same length" 
     
    690690                raise ValueError, msg 
    691691 
    692             if not dy == None and not len(dy) == 0 and not len(y) == len(dy): 
     692            if not dy is None and not len(dy) == 0 and not len(y) == len(dy): 
    693693                msg = "Plottable.View: Given y and dy are not of the same " 
    694694                msg += "length: len(y)=%s, len(dy)=%s" % (len(y), len(dy)) 
Note: See TracChangeset for help on using the changeset viewer.