John Hunter | 1 Jul 04:10
Picon
Gravatar

Re: dataLim and getting the data from `scatter` (bonus: an attempt at a Frame class)

On Sun, Jun 29, 2008 at 6:10 PM, Tony S Yu <tonyyu@...> wrote:
> Hi. A couple of questions about `scatter`:
> Q1
> ====
> The bounding box `axes.dataLim` increases in size when calling scatter(x, y)
> compared to plot(x, y) (for the same x, y data, of course). I think this
> change is due to the size of the markers being added to the data limits (not
> sure if this is true). Is there an easy way to get the same data limits I
> would have for a call to `plot`?

I think your explanation is correct (the size of the markers are
included in scatter (and patches in general) but not for plot (and
lines in general).  There is no *easy* way, but you could maintain
your own bbox instance and update it in the same way the
Axes._update_datalim* methods do.  (See Axes._update_patch_limits and
Axes._update_line_limits for example)

> Q2
> ====
> Is there a way to get the data from the axes of a scatter plot?
> Initially I thought I could get it with:
>>>> for collection in ax.collections:
>>>>     for path in collection._paths:
>>>>         print path.vertices
> But this seems to be the path that draws the scatter markers. Any ideas?

The "offsets" of the collection are the x and y locs, and the vertices
are the marker path, as you observed.  We do not have a "publicly
accessible" api for accessing the offsets (they are stored as
col._offsets where col is the collection instance), but you could add
(Continue reading)

John Hunter | 1 Jul 04:15
Picon
Gravatar

Re: gcf() problem

On Sun, Jun 29, 2008 at 3:40 PM, Vincent Noel <vincent.noel@...> wrote:

> in Matlab, gcf() returns a handle to the last activated figure, either
> by click or programmatically (e.g. "figure(1)", etc)

OK, then it's a bug.  Could you file a bug report on the sf bug tracker

http://sourceforge.net/tracker/?group_id=80706&atid=560720

since I don't have time to fix this right now but don't want to forget about it?

Thanks,
JDH

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Gideon Simpson | 1 Jul 06:02
Favicon

Re: help error

Just tried the 0.98.2, and am still getting:

help> modules

Please wait a moment while I gather a list of all available modules...

Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/sw/lib/python2.5/site.py", line 346, in __call__
     return pydoc.help(*args, **kwds)
   File "/sw/lib/python2.5/pydoc.py", line 1636, in __call__
     self.interact()
   File "/sw/lib/python2.5/pydoc.py", line 1654, in interact
     self.help(request)
   File "/sw/lib/python2.5/pydoc.py", line 1670, in help
     elif request == 'modules': self.listmodules()
   File "/sw/lib/python2.5/pydoc.py", line 1791, in listmodules
     ModuleScanner().run(callback)
   File "/sw/lib/python2.5/pydoc.py", line 1842, in run
     for importer, modname, ispkg in pkgutil.walk_packages():
   File "/sw/lib/python2.5/pkgutil.py", line 125, in walk_packages
     for item in walk_packages(path, name+'.', onerror):
   File "/sw/lib/python2.5/pkgutil.py", line 110, in walk_packages
     __import__(name)
   File "/opt/lib/python2.5/site-packages/matplotlib/config/ 
__init__.py", line 10, in <module>
     from mplconfig import rcParams, mplConfig, save_config, rcdefaults
   File "/opt/lib/python2.5/site-packages/matplotlib/config/ 
mplconfig.py", line 486, in <module>
     filePriority=True)
(Continue reading)

Tony S Yu | 1 Jul 06:13
Picon
Favicon

Re: dataLim and getting the data from `scatter` (bonus: an attempt at a Frame class)


On Jun 30, 2008, at 10:10 PM, John Hunter wrote:
I'd love for you to take the lead on this.  Given my (and other
developers) constraints on time, we'll have only limited time to help,
but hopefully we can give you some pointers when you get stuck.

I don't know if I'm the best person to be taking this on, but if no one else is interested, then I'd be happy to take a shot at it.


Current Limitations:
================
* the frame can only be placed on the borders of the axes (mainly because I
don't know how to move the tickers anywhere else).

Look at how the transforms are set in the axis.Axis class for the
tickers - the ticks and labels have "blended transforms" which blend
data coords and axes coords.  

That reminds me: does it make more sense to have the frame as an attribute/child of each axis (just as ticks are attributes of each axis)? It seemed more appropriate to me, but I just used the `frame` in axes because it was already defined.

It would be extremely useful if
you could develop and extensible API for axis handling (so one could
incorporate some of these Tufte extensions and related ideas at the
*user* level even if they are not built in, though we'd probably
supply some by default or by example)

I didn't really expect the Tufte-style frames to be incorporated into the core; Incidentally, my initial goal was just to play around with these Tufte-style frames, not to write a Frame class.

Keep us posted!

Will do. Thanks for your comments.

-Tony
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Adam Mercer | 1 Jul 06:19
Picon
Gravatar

0.98.2 release?

Hi

Has matplotlib-0.98.2 been officially released? The reason I'm asking
is that the web page still states that 0.98.1 is the release and the
0.98.2 tar ball is under the 0.98.1 release on the sourceforge
download page?

Cheers

Adam

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Adam Mercer | 1 Jul 06:21
Picon
Gravatar

Re: "ValueError: oridinal must be >= 1" with 0.98.1 - non with 0.98.0

On Wed, Jun 25, 2008 at 8:44 AM, John Hunter <jdh2358@...> wrote:

> I think I have this fixed in svn

Just downloaded 0.98.2 and the code that failed in 0.98.1 works! Thanks!

Cheers

Adam

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
sa6113 | 1 Jul 07:31
Picon

Re: how to save animation


Thanks for your help but there is a problem while I using this code, it
raises an error :
"mencoder" is not recognized  as an internal or external command, operable
program or batch file.

Darren Dale-3 wrote:
> 
> On Monday 30 June 2008 04:18:14 sa6113 wrote:
>> I want to save an animation in avi format by python code, would you
>> please
>> help me to start in this way?
> 
> At the FAQ page, http://matplotlib.sourceforge.net/faq.html , there is a 
> section titled "How do I make a movie with matplotlib?"
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 

--

-- 
View this message in context: http://www.nabble.com/how-to-save-animation-tp18190767p18209531.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Alan G Isaac | 1 Jul 07:41
Picon
Favicon
Gravatar

Re: movies

Someone said:
> http://matplotlib.sourceforge.net/faq.html#MOVIE

OK, this works.
But might it be a possible goal for Matplotlib to be able
to assemble these PNGs into an APNG?
<URL:http://wiki.mozilla.org/APNG_Specification>

Until then, this can be done with a FireFox 3 extension:
<URL:https://addons.mozilla.org/en-US/firefox/addon/5519>

Cheers,
Alan Isaac

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Alan G Isaac | 1 Jul 07:41
Picon
Favicon
Gravatar

Re: how to save animation

On Mon, 30 Jun 2008, apparently wrote:
> "mencoder" is not recognized 

http://en.wikipedia.org/wiki/MEncoder

hth,
Alan Isaac

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
Eric Firing | 1 Jul 09:20
Favicon
Gravatar

Re: movies

Alan G Isaac wrote:
> Someone said:
>> http://matplotlib.sourceforge.net/faq.html#MOVIE
> 
> OK, this works.
> But might it be a possible goal for Matplotlib to be able
> to assemble these PNGs into an APNG?
> <URL:http://wiki.mozilla.org/APNG_Specification>

I don't think it makes sense for mpl to do this; it seems to me to be 
inherently a different sort of operation from plotting, and one that 
would be done best by something like gifsicle in a post-processing mode.

Eric

> 
> Until then, this can be done with a FireFox 3 extension:
> <URL:https://addons.mozilla.org/en-US/firefox/addon/5519>
> 
> Cheers,
> Alan Isaac
> 
> 
> 
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

Gmane