On Mon, Nov 30, 2009 at 8:06 PM, Mike Alger <mal...@ryerson.ca> wrote:
> After a weekend of no replies I managed to figure a way out myself

Hey Mike,  sorry for the radio silence.  mpl is a big project and no
one developer is equipped to answer questions about everything.  We
currently have only one active developer (Reinier) working on the 3D
stuff.  I've CCd him, and hopefully he can take a look at your patch.

>
> 3.)    If I do make a modification should it be as a separate function with
> the additional variable or should I try to stuff the new capability into the
> old function
>
> 4.)    is there a clean easy to follow tutorial for submitting changes via
> svn or can I rely on someone else to do the final commit?

In general, if the new functionality is close to the old, we'd like to
see it incorporated into the existing API, perhaps with a new keyword
argument.  We have some documentation on how to contribute to mpl at
http://matplotlib.sourceforge.net/devel/coding_guide.html; see also
the FAQ http://matplotlib.sourceforge.net/faq/howto_faq.html#contributing-howto

> As this was “left to the reader as an exercise” I will leave the integration
> or improvement of this solution as an exercise to the next reader
>
> What I have done is basically cloned the plot surface function and replaced
> the avgz variable with a reference to the “colors” parameter i have added to
> the function call.
>
> This code doesn’t  center things perfectly with respect to the grid (for
> some reason a 40x40 grid turns into 39x39 grid in the function) again this
> is something else that could be improved, however I am happy with it and a
> one pixel shift won’t be missed in my plots.  I also have no real clue as to
> what the following comments was about
>
>
>
>                 # The construction leaves the array with duplicate points,
> which
>
>                 # are removed here.
>
>
>
>  but it is probably related to my non centered plots.
>
> What follows is the modified function  :
>
> def plot_surface2(self, X, Y, Z, colors, *args, **kwargs):


What will be most helpful is an "svn diff", as explained in the coding
guide and FAQ linked above, with an example (included in the diff)
that shows the before and after behavior.  That way even an naive
developer can appreciate the before and after changes and commit the
code if the original developer responsible for that part of the code
base is not available.  The ideal situation is "apply this patch
generated from an svn diff and run example so_and_so.py to see the
plot with and without the patch".  As explained in the FAQ, if you
don't get proper attention here on the mailing list, please post a bug
or patch on the sourceforge tracker so we don't lose it -- sometimes
our inattention is not due to lack of interest but to lack of time,
and a report filed on the tracker helps us not lose the thread.

Thanks for the help!

JDH

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to