>>>>> "stephen" == stephen  <[EMAIL PROTECTED]> writes:

    stephen> Is there a better way of doing this so that I don't have
    stephen> to go through every permutation of possible arguments
    stephen> (the example here from the matplotlib 'plot' function):

You can make linecolor=None and linewidth=None, and then use
matplotlib's rc defaults

  from matplotlib import rcParams
  def makeplot(self, xvalues, yvalues, linecolor=None, linewidth=None):
      if linecolor is None: linecolor = rcParams['lines.color']
      if linewidth is None: linewidth = rcParams['lines.linewidth']
      plot(xvalues, yvalues, color=linecolor, linewidth=linewidth)

Then you can customize the defaults in the rc file
(http://matplotlib.sf.net/matplotlibrc) any way you want.

Alternatively, you can also set the defaults in your script

  from matplotlib import rc
  rc('lines', linewidth=1.0, color='red')

JDH
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to