Changeset 119dc89 in sasview


Ignore:
Timestamp:
Mar 21, 2011 11:02:26 AM (14 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
783940c
Parents:
b29e47e
Message:

fix plot behavior for prview

File:
1 edited

Legend:

Unmodified
Added
Removed
  • prview/perspectives/pr/pr.py

    rc8afcb7 r119dc89  
    3939IQ_FIT_LABEL       = r"$I_{fit}(q)$" 
    4040IQ_SMEARED_LABEL   = r"$I_{smeared}(q)$" 
     41GROUP_ID_IQ_DATA = r"$I_{obs}(q)$" 
     42GROUP_ID_PR_FIT = r"$P_{fit}(r)$" 
     43 
    4144 
    4245 
     
    327330        new_plot.id = IQ_FIT_LABEL 
    328331        self.parent.update_theory(data_id=self.data_id, theory=new_plot) 
     332         
    329333        wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title=title)) 
    330334         
     
    418422        new_plot.xtransform = "x" 
    419423        new_plot.ytransform = "y"   
    420         new_plot.group_id = "P(r) fit" 
     424        new_plot.group_id = GROUP_ID_PR_FIT 
    421425        self.parent.update_theory(data_id=self.data_id, theory=new_plot)     
    422426        wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="P(r) fit")) 
     
    920924        new_plot.yaxis("\\rm{Intensity} ","cm^{-1}") 
    921925        new_plot.interactive = True 
    922         new_plot.group_id = IQ_DATA_LABEL  
     926        new_plot.group_id = GROUP_ID_IQ_DATA 
    923927        new_plot.id = self.data_id 
    924         new_plot.title = "I(q)"     
     928        new_plot.title = "I(q)"    
    925929        wx.PostEvent(self.parent,  
    926930                     NewPlotEvent(plot=new_plot, title="I(q)", reset=reset)) 
     
    12761280        if len(panel.plots) > 1 and \ 
    12771281            panel.graph.selected_plottable in panel.plots: 
    1278             dataset = panel.graph.selected_plottable 
    1279         elif len(panel.plots) == 1: 
    1280             dataset = panel.plots.keys()[0] 
     1282            dataset = panel.plots[panel.graph.selected_plottable].name 
    12811283        else: 
    12821284            logging.info("Prview Error: No data is available") 
     
    13461348            if issubclass(data.__class__, Data1D): 
    13471349                try: 
     1350                    wx.PostEvent(self.parent, NewPlotEvent(action='remove', 
     1351                                                group_id=GROUP_ID_IQ_DATA,  
     1352                                                id=self.data_id)) 
     1353                                               
    13481354                    self.data_id = data.id 
    13491355                    self.control_panel._change_file(evt=None, data=data) 
Note: See TracChangeset for help on using the changeset viewer.