Hi John, I've been making spacecraft trajectory "Pork
> Chop Plots", a contour plot of a z-value (such amount of
> fuel required) over a range of Earth departure date
> x-values and Mars arrival date y-values.
> Since I needed dates on both x and y axes, it was useful
> for me to factor out the date locator/formatter selection
> code from plot_date() into two Axes methods: xaxis_date()
> and yaxis_date().
> The plot_date() implementation then becomes just a call
> to plot() followed by a call to xaxis_date().
I think this is a good idea. A few suggestions
matplotlib 0.84 / CVS already has the guts of plot_date factored out
in date_ticker_factory
locator, formatter = date_ticker_factory(span, tz)
which appears to be the same thing as your chooseDateFmt. So you'll
want to use that instead. Note also that matplotlib naming
conventions for functions and methods is lower case and underscore
separated.
I think it would be useful to add the following kwargs to plot_date to
support your funcitonality
def plot_date(self, d, y, fmt='bo', tz=None,
xdate=True, ydate=False, **kwargs):
> My current implementation is below. Is this
> general-purpose enough for me to submit? If so, I'll
> make up some diff files and mail them in.
Yep, with the changes above this would be great.
Thanks!
JDH