- Timestamp:
- 02/08/05 09:34:16 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/__init__.py
r378 r379 164 164 """ 165 165 Set the current rc params. Group is the grouping for the rc, eg 166 for lines.linewidth the group is 'lines', for axes.facecolor, the167 group is ' axes', and so on. kwargs is a list of attribute166 for scantable.save the group is 'scantable', for plotter.stacking, the 167 group is 'plotter', and so on. kwargs is a list of attribute 168 168 name/value pairs, eg 169 169 170 rc(' lines', linewidth=2, color='r')170 rc('scantable', save='SDFITS') 171 171 172 172 sets the current rc params and is equivalent to 173 173 174 rcParams['lines.linewidth'] = 2 175 rcParams['lines.color'] = 'r' 176 177 178 Note you can use python's kwargs dictionary facility to store 179 dictionaries of default parameters. Eg, you can customize the 180 font rc as follows 181 182 font = {'family' : 'monospace', 183 'weight' : 'bold', 184 'size' : 'larger', 185 } 186 187 rc('font', **font) # pass in the font dict as kwargs 188 189 This enables you to easily switch between several configurations. 174 rcParams['scantable.save'] = 'SDFITS' 175 190 176 Use rcdefaults to restore the default rc params after changes. 191 177 """ 192 178 193 aliases = { 194 } 179 aliases = {} 195 180 196 181 for k,v in kwargs.items():
Note:
See TracChangeset
for help on using the changeset viewer.