Changeset ca6c17e8 in sasview


Ignore:
Timestamp:
Apr 17, 2010 8:06:10 PM (14 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:
db72faf
Parents:
7f66617
Message:

fixed the zmax and zmin of the plot according to the actual data: it was pretty annoying before.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guiframe/local_perspectives/plotting/masking.py

    ra5ca7ef rca6c17e8  
    450450        #self.newplot.setValues(temp_data) 
    451451        #self.plotpanel.add_image(self.newplot) 
    452         #use this method 
     452         
     453        ##use this method 
     454        #set zmax and zmin to plot: Fix it w/ data. 
     455        if self.plotpanel.scale == 'log': 
     456            zmax = math.log(max(self.data.data[self.data.data>0])) 
     457            zmin = math.log(min(self.data.data[self.data.data>0])) 
     458        else: 
     459            zmax = max(self.data.data) 
     460            zmin = min(self.data.data) 
     461        #plot     
    453462        plot = self.plotpanel.image(data= temp_mask, 
    454463                       qx_data=self.data.qx_data, 
     
    458467                       ymin= self.data.ymin, 
    459468                       ymax= self.data.ymax, 
    460                        zmin= self.data.zmin, 
    461                        zmax= self.data.zmax, 
     469                       zmin= zmin, 
     470                       zmax= zmax, 
    462471                       cmap= self.cmap, 
    463472                       color=0,symbol=0,label=self.data.name) 
     
    509518        # Keep track of the parent Frame 
    510519        self.parent = parent 
    511         
     520        self.scale = "log" 
    512521        # Internal list of plottable names (because graph  
    513522        # doesn't have a dictionary of handles for the plottables) 
Note: See TracChangeset for help on using the changeset viewer.