Changeset 52e0f2d in sasview


Ignore:
Timestamp:
Jan 24, 2012 4:50:26 PM (12 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

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plottools/src/danse/common/plottools/PlotPanel.py

    r053f983 r52e0f2d  
    2222from matplotlib.font_manager import FontProperties 
    2323 
    24 try: 
    25     from mpl_toolkits.mplot3d import Axes3D 
    26 except: 
    27     logging.error("PlotPanel could not import Axes3D") 
     24from mpl_toolkits.mplot3d import Axes3D 
    2825#from matplotlib import cm 
    2926#from matplotlib.ticker import LinearLocator, FixedLocator, FormatStrFormatter 
     
    138135        #self.SetBackgroundColour(parent.GetBackgroundColour()) 
    139136        self._resizeflag = True 
    140         self._SetInitialSize()  
     137        self._SetSize()  
    141138        self.subplot = self.figure.add_subplot(111) 
    142139        self.figure.subplots_adjust(left=0.2, bottom=.2) 
     
    14281425                   cmap=self.cmap, zmin=zmin_2D_temp, 
    14291426                   zmax=zmax_2D_temp) 
    1430         self.figure.canvas.draw_idle() 
    14311427       
    14321428    def image(self, data, qx_data, qy_data, xmin, xmax, ymin, ymax,  
     
    15261522        cb.update_bruteforce(im) 
    15271523        cb.set_label('$' + self.scale + '$') 
     1524        self.figure.canvas.draw_idle() 
    15281525     
    15291526    def _build_matrix(self): 
  • 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.