yampex.options.Opts(object)
class documentation
Part of yampex.options
(View In Hierarchy)
I am a dict-like object of options. I make it easy to override global options with local ones just for the present subplot, and provide a few useful methods.
Instance Variable | go | A dict of global options that are set from my _opts defaults and
then from any option-setting calls to the OptsBase subclass
outside subplotting context. |
Instance Variable | lo | A dict of local options that are set only from option-sitting calls inside the subplotting context, for the present subplot. |
Method | __init__ | Undocumented |
Method | __repr__ | Undocumented |
Method | __contains__ | Undocumented |
Method | __setitem__ | Undocumented |
Method | __getitem__ | Undocumented |
Method | newLocal | Sets a new local options context, appending it to my loList. |
Method | useLocal | Undocumented |
Method | usePrevLocal | Undocumented |
Method | useLastLocal | Undocumented |
Method | prevLocal | Lets you use my previous local options (or the current ones, if there are no previous ones) inside a context call. |
Method | goGlobal | Sets my options context to global, where it began before the first call
to newLocal . |
Method | getColor | Supply an integer index starting from zero and this returns a color from a clean and simple default palette. |
Method | getLast | Assuming that key refers to one of my options with a sequence value, returns its item at index k, or its last item if the index is beyond its end. |
Method | useLegend | Returns True if a legend should be added, given my current
set of options. |
Method | kwModified | Adds 'linestyle', 'linewidth', 'marker', and 'color' entries for the next plot to kw if not already defined. |
OptsBase
subclass
outside subplotting context.
Sets a new local options context, appending it to my loList.
All option-setting calls to your OptsBase
subclass will
now go to a new set of local options, and all option inquiries will start
with the local options and then go to globals, ignoring all previously set
local options.
def prevLocal(self):
Lets you use my previous local options (or the current ones, if there are no previous ones) inside a context call.
Sets my options context to global, where it began before the first call
to newLocal
.
Any further option-setting calls will affect global options, and any option inquiries will refer strictly to global options.
Supply an integer index starting from zero and this returns a color from a clean and simple default palette.