Arnaud Bergeron wrote: > 2008/10/22 Jason Grout <[EMAIL PROTECTED]>: >> David Joyner wrote: >>> I'll have to wait until I get home from work to test it out but the >>> patch looks like you've added a lot of nice functionality. My original >>> thought was >>> to include more of the legend options in the method itself (instead of >>> having >>> several methods which set them) but you have so many options, >>> that would be difficult. I wonder though if you can have just one >>> method called legend_options, which of course then has tons of keywords, >>> incorporating all the methods you have for method options? >> >> Mike Hansen and I discussed extending his new @options decorator to >> handle cases like this (where you have "suboptions" that are then passed >> directly into calls inside your plotting function, for example). From >> our discussion before, it would look something like: >> >> @suboption('legend', numpoints=2, pad=0.4, markerscale=0.6, >> shadow=False, labelsep=0.015, handlelen=0.05, handletextsep=0.025, >> axespad=None, color=(0.9,0.9,0.9), show=False) >> @options(<put the plot options here>) >> def plot(): >> # Here, we automatically have all the legend options in a >> legend_options dictionary containing all the settings. >> >> >> In calling the plot function, we can set the legend options using >> plot(legend_numpoints=4, legend_pad=0.6), etc. Or maybe we could also >> just accept a legend_options dictionary which could contain these keywords. >> >> The nice thing is that then these options would be nicely integrated >> into the options framework that Mike designed which makes all the >> options consistent, lets people inquire about the default options and >> reset to the default options, etc. > > I'm all for consistency and will switch to that when it's ready > (because it's really neat). In the meantime, I would still like the > feature to work, even if the options are a bit of a pain to set. > >> See http://trac.sagemath.org/sage_trac/ticket/4201 and >> http://trac.sagemath.org/sage_trac/ticket/4203 on trac. > > Is somebody working on #4203? If not, I might do it.
Mike Hansen just posted a patch and I reviewed it. Hopefully it will go in soon. You might take a look at it and review it as well. Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---