Changeset 52e0f2d in sasview for sansguiframe/src


Ignore:
Timestamp:
Jan 24, 2012 4:50:26 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
d2843a9
Parents:
0b705915
Message:

trying to fix the problem in plots on MAC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/local_perspectives/plotting/masking.py

    r4a4164c r52e0f2d  
    3737_SCALE = 1e-6 
    3838_STATICBOX_WIDTH = 380 
    39 PANEL_SIZE = 420 
     39 
    4040#SLD panel size  
    4141if sys.platform.count("win32") > 0: 
     42    PANEL_SIZE = 350 
    4243    FONT_VARIANT = 0 
    4344else: 
     45    PANEL_SIZE = 300 
    4446    FONT_VARIANT = 1 
    4547     
     
    469471        ##use this method 
    470472        #set zmax and zmin to plot: Fix it w/ data. 
    471         if self.plotpanel.scale == 'log': 
    472             zmax = math.log(max(self.data.data[self.data.data>0])) 
    473             zmin = math.log(min(self.data.data[self.data.data>0])) 
     473        if self.plotpanel.scale == 'log_{10}': 
     474            zmax = math.log10(max(self.data.data[self.data.data>0])) 
     475            zmin = math.log10(min(self.data.data[self.data.data>0])) 
    474476        else: 
    475477            zmax = max(self.data.data[self.data.data>0]) 
     
    561563                 data=None, dimension=1, id=ID, *args, **kwds): 
    562564        kwds["style"] = wx.DEFAULT_DIALOG_STYLE 
    563         kwds["size"] = wx.Size(_STATICBOX_WIDTH*1.5, PANEL_SIZE*1.5)  
     565        kwds["size"] = wx.Size(PANEL_SIZE*1.5, PANEL_SIZE*1.5)  
    564566        wx.Dialog.__init__(self, parent, id=id,  *args, **kwds) 
    565567         
     
    578580            self.plotpanel = Maskplotpanel(self, -1, dimension, 
    579581                                           style=wx.TRANSPARENT_WINDOW) 
     582            self.plotpanel._SetInitialSize() 
    580583             
    581584            self.cmap = DEFAULT_CMAP 
     
    625628            note_txt = wx.StaticText(self, -1, note)  
    626629            note_txt.SetForegroundColour(wx.RED) 
    627             sizer.Add(note_txt, (0, 2), flag=wx.RIGHT|wx.BOTTOM, border=5) 
    628          
    629         sizer.Add(self.plotpanel, (1, 1), (9, 9),  
     630            sizer.Add(note_txt, (0, 2), flag=wx.RIGHT|wx.TOP, border=5) 
     631         
     632        sizer.Add(self.plotpanel, (1, 0), (9, 9),  
    630633                  wx.EXPAND|wx.ALL, 15) 
    631634 
     
    737740        status_type = 'stop'            
    738741        self.graph.render(self) 
     742        self.subplot.figure.canvas.resizing = False 
    739743        if self.dimension < 3: 
    740744            self.graph.render(self) 
    741             self.subplot.figure.canvas.draw_idle() 
     745            self.subplot.figure.canvas.draw() 
     746        elif FONT_VARIANT: 
     747            self.subplot.figure.canvas.draw() 
    742748        msg = 'Plotting Completed.' 
    743749        self._status_info(msg, status_type) 
Note: See TracChangeset for help on using the changeset viewer.