On 2014/09/28, 12:42 PM, Till Stensitzki wrote:
> One point which is often neglected while discussing
> oo- vs the pyplot-api is that today introspection tools
> quite often fail to work with mpl-oo but are
> perfectly fine with the pyplot module. E.g. if i am writing
> some kind of helper oder plotting function taking ax, one
> gets no auto-completion nor docstrings. I always have to use
> a interactive console to search for them or just type in
> the corresponding pyplot command for the function
> signature.

I think I know what you mean here--I do the same thing.

> Note that this is not matplotlibs fault, but
> another reason while beginners may prefer the pyplot-interface:
> Easier access to docstrings and available plotting functions.

All of this sounds like an argument for considering a gradual move to 
plot functions rather than methods, as Tom is suggesting--correct?  That 
is actually the way I implemented contour and quiver, and I have long 
thought that all of the moderately to very complicated plot functions, 
such as "plot", "hist", "boxplot", etc. should similarly be moved out of 
what used to be axes.py into modules containing related functionality; 
then it's easy to attach them as methods with a stub.

>
> This is also why i am a bit wary of using properties in matplotlib and
> i don't think they are a good fit most of the time. Documenting
> them is hard, discoverablity is also worse. And most setter methods in
> mpl have very useful kwargs, something which is not doable with
> properties.

Good point.  I think that one of the problems with the getters and 
setters, though, apart from clunky names, is that there is a conflict 
between what the name suggests--which is consistent with using them as 
the basis for properties--and expanding their functionality with kwargs. 
  When functionality is expanded, a name like "set_something" probably 
is not the best description.  That's why we have some convenience 
functions that can affect a variety of related parameters.  Maybe we 
need more of those; and maybe this can be addressed using Tom's 
Controller idea, but I'm hazy about that.

Eric

>
>
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> Matplotlib-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to