Changeset 2150 for trunk/python/asapplotter.py
- Timestamp:
- 04/22/11 18:21:29 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/asapplotter.py
r2147 r2150 8 8 9 9 import re 10 11 def new_asaplot(visible=None,**kwargs): 12 """ 13 Returns a new asaplot instance based on the backend settings. 14 """ 15 if visible == None: 16 visible = rcParams['plotter.gui'] 17 18 backend=matplotlib.get_backend() 19 if not visible: 20 from asap.asaplot import asaplot 21 elif backend == 'TkAgg': 22 from asap.asaplotgui import asaplotgui as asaplot 23 elif backend == 'Qt4Agg': 24 from asap.asaplotgui_qt4 import asaplotgui as asaplot 25 elif backend == 'GTkAgg': 26 from asap.asaplotgui_gtk import asaplotgui as asaplot 27 else: 28 from asap.asaplot import asaplot 29 return asaplot(**kwargs) 10 30 11 31 class asapplotter: … … 66 86 67 87 def _newplotter(self, **kwargs): 68 backend=matplotlib.get_backend() 69 if not self._visible: 70 from asap.asaplot import asaplot 71 elif backend == 'TkAgg': 72 from asap.asaplotgui import asaplotgui as asaplot 73 elif backend == 'Qt4Agg': 74 from asap.asaplotgui_qt4 import asaplotgui as asaplot 75 elif backend == 'GTkAgg': 76 from asap.asaplotgui_gtk import asaplotgui as asaplot 77 else: 78 from asap.asaplot import asaplot 79 return asaplot(**kwargs) 88 return new_asaplot(self._visible,**kwargs) 80 89 81 90 def _newcasabar(self):
Note: See TracChangeset
for help on using the changeset viewer.