Christopher Barker wrote:
[...]
> It is nice to have a really simple plot command. What would it do if we
> were trying to be fully OO? My key question is whether it would return
> and axis, a figure or both:
>
> Fig, ax = plot([1,2,3])
>
> then:
>
> ax.xlabel("whatever")
>
> isn't bad for me
John Hunter wrote:
> On 2/27/07, Christopher Barker <[EMAIL PROTECTED]> wrote:
>> There is nothing inherent in OO
>> design that makes it necessary to write a bunch more code.
>
> I don't agree with this at all. Inherent in OO design is object
> creation, attribute setting and method calling.
On 2/27/07, Christopher Barker <[EMAIL PROTECTED]> wrote:
> Or even more - not use pylab at all. There is nothing inherent in OO
> design that makes it necessary to write a bunch more code. It would be
> nice if the OO interface were just as easy to use.
I don't agree with this at all. Inherent
Eric Firing wrote:
> make it as easy as possible for a person to do
> something interactive in pylab and then translate it into a more
> OO-style script.
Or even more - not use pylab at all. There is nothing inherent in OO
design that makes it necessary to write a bunch more code. It would be
ni
Mark Bakker wrote:
> John -
>
> Maybe I misunderstand you, but I thought the pylab interface
> was invented to do very useful stuff (yet you want to prevent it
> from doing something useful ??).
No, the point is to minimize differences between pylab functions and
object methods, to make it as eas
John -
Maybe I misunderstand you, but I thought the pylab interface
was invented to do very useful stuff (yet you want to prevent it
from doing something useful ??).
All the functionality is already in the API, but the calling sequence
is too lengthy and somewhat convoluted for interactive use.
On 2/27/07, Mark Bakker <[EMAIL PROTECTED]> wrote:
> Thanks for the explanation, John.
> I printed out the CODING_GUIDE (sorry, didn't know it existed).
> The new function with the extra copy command is shown below.
> Can we add this to pylab?
Since Eric has been developing and maintaining the asp
Thanks for the explanation, John.
I printed out the CODING_GUIDE (sorry, didn't know it existed).
The new function with the extra copy command is shown below.
Can we add this to pylab?
Thanks, Mark
def aspect(*args, **kwargs):
"""
Set/Get the aspect ratio (ylength/xlength) of the current ax
On 2/26/07, Mark Bakker <[EMAIL PROTECTED]> wrote:
> ax = gca()
> if len(args)==0:
> aspect = ax.get_aspect()
> elif len(args)==1:
> aspect = args[0]
> adjustable = popd(kwargs,'adjustable','box')
> anchor = popd(kwargs,'anchor','C')
> fixlim = popd(kwargs,'
Eric, list -
Here is the new aspect function for possible inclusion in pylab.
It works great and with the default values for the kwargs, it works exactly
the way I think it is useful for a combination of contouring and plotting.
What do you think, should we include this?
Mark
def aspect(*args,
10 matches
Mail list logo