Changeset 783940c in sasview for guiframe/local_perspectives/plotting
- Timestamp:
- Mar 21, 2011 3:00:52 PM (14 years ago)
- 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:
- 6512644
- Parents:
- 119dc89
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/plotting/plotting.py
r4158af4 r783940c 87 87 panel.remove_data_by_id(id=id) 88 88 return True 89 else: 90 msg = "Panel with GROUP_ID: %s cannot be located" % str(group_id) 91 raise ValueError, msg 89 return False 90 91 def clear_panel(self, group_id): 92 """ 93 clear the graph 94 """ 95 if group_id in self.plot_panels.keys(): 96 panel = self.plot_panels[group_id] 97 panel.graph.reset() 98 return True 99 return False 100 92 101 93 102 def hide_panel(self, group_id): … … 170 179 _, x_unit = data.get_xaxis() 171 180 _, y_unit = data.get_yaxis() 172 if x_unit != panel.graph.prop["xunit"] \ 173 or y_unit != panel.graph.prop["yunit"]: 181 flag_x = (panel.graph.prop["xunit"] is not None) and \ 182 (panel.graph.prop["xunit"].strip() != "") and\ 183 (x_unit != panel.graph.prop["xunit"]) 184 flag_y = (panel.graph.prop["yunit"] is not None) and \ 185 (panel.graph.prop["yunit"].strip() != "") and\ 186 (x_unit != panel.graph.prop["yunit"]) 187 if (flag_x and flag_y): 174 188 msg = "Cannot add %s" % str(data.name) 175 189 msg += " to panel %s\n" % str(panel.window_caption) … … 224 238 if event.action.lower() == 'delete': 225 239 return self.delete_panel(group_id) 240 if event.action.lower() == "clear": 241 return self.clear_panel(group_id) 242 226 243 title = None 227 244 if hasattr(event, 'title'):
Note: See TracChangeset
for help on using the changeset viewer.