def addCategory(self,name,nmin=<NUM_LIT:0>,n=<NUM_LIT:0>,nmax=<NUM_LIT:100>):
assert isinstance(name,basestring) <EOL>if name in self.categories:<EOL><INDENT>raise KeyError("<STR_LIT>"%name)<EOL><DEDENT>self.categories[name]=[nmin,n,nmax]<EOL>self.redraw()<EOL>
Adds a category with the given name.

If the category already exists, a :py:exc:`KeyError` will be thrown. Use
:py:meth:`updateCategory()` instead if you want to update a category.