On Fri, May 23, 2008 at 3:47 PM, Darren Dale <[EMAIL PROTECTED]> wrote:
>> so I have to get to work creating a new cool mpl figure for the logo. >> Our old banner is so 70s. > > I wasn't going to say it... but yeah. :) Thanks for your sensitivity :-) I made that a long time ago when I was really proud that I could set the font size on text! > I think we need to set a policy on how we are going to handle code in > docstrings. There are lots of places where indentation and asterisks are > causing trouble. Should examples be codeblocks (::) or doctests (>>>)? I > think inlines should just be `` quoted, like: > > data are plotted as ``plot(lags, c, **kwargs)`` Works for me -- we should prefer code blocks whether than inlines just because they are more readable w/o the quotes, but if we need inlines in some cases we'll use 'em > Here is an example from axes.Axes: > > def xcorr(self, x, y, normed=False, detrend=mlab.detrend_none, > usevlines=False, maxlags=None, **kwargs): > """ > XCORR(x, y, normed=False, detrend=mlab.detrend_none, usevlines=False, > **kwargs):a > > Can we eliminate the call signature? I think this is only necessary for > extension code, the call signature will already be displayed by sphinx and by > pythons interactive help. Unfortunately, I think we need it. pyplot xcorr is just a *args, **kwargs pass though to Axes.xcorr, so if you do help pyplot.xcorr you won't see the signature, which is why we manually copy the signature in axes.py. In [89]: help pyplot.xcorr Help on function xcorr in module matplotlib.pyplot: xcorr(*args, **kwargs) XCORR(x, y, normed=False, detrend=mlab.detrend_none, usevlines=False, **kwargs): Plot the cross correlation between x and y. If normed=True, normalize the data but the cross correlation at 0-th lag. x and y are detrended by the detrend callable (default no normalization. x and y must be equal length We could use a codeblock in axes.py def xcorr(self, x, y, normed=False, detrend=mlab.detrend_none, usevlines=False, maxlags=None, **kwargs): """ pyplot signature: xcorr(x, y, normed=False, detrend=mlab.detrend_none, usevlines=False, **kwargs): Plot the cross correlation between x and y. If normed=True, normalize the data but the cross correlation at 0-th lag. x and y are detrended by the detrend callable (default no > Regarding the crazy pyplot error, I'm doing it the slow, painful way, > including a few members at a time in the members list and fixing the errors > that arise. Ugg, I don't envy you. Perhaps a message to the maintainer about the need for some verbose context in these error messages would be more expeditious. We have a lot of these to do. Another feature I'd like to see is a macro location parameter. Eg define location:`mplexamples` = ../../examples/pyplot and then later be able to refer to that .. literalinclude:: location:`mplexamples`/simple_plot.py with whatever syntax is appropriate so as we reorganize we don't have to keep fixing the relative path structure. Eg, I am including icons from mpl/data/images in the navigation toolbar section.... JDH ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel