[matplotlib-devel] NameError: global name 'app' is not defined

2007-07-06 Thread Nils Wagner
 Hi all,

The svn version raises a name error.

Traceback (most recent call last):
  File "lshape.py", line 49, in ?
figure(1)
  File "/usr/lib64/python2.4/site-packages/matplotlib/pylab.py", line
865, in figure
figManager = new_figure_manager(num, figsize=figsize, dpi=dpi,
facecolor=facecolor, edgecolor=edgecolor, frameon=frameon, Fi   
gureClass=FigureClass, **kwargs)
  File
"/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_wxagg.py",
line 135, in new_figure_manager
backend_wx._create_wx_app()
  File
"/usr/lib64/python2.4/site-packages/matplotlib/backends/backend_wx.py",
line 1221, in _create_wx_app
_create_wx_app.theWxApp = app
NameError: global name 'app' is not defined

Nils


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Subsetting fonts in Postscript

2007-07-06 Thread Michael Droettboom
Carl Worth wrote:
>> don't think it is supported in cairo.  So I am not sure where these
>> rasters are coming from, unless cairo is converting all text to
>> rasters.
>> 
>
> Definitely not converting all text to raster, (unless someone's using
> an ancient version of cairo).
>   
I don't know the root cause, but FYI I'm definitely getting rasterized 
text with the Cairo backend for mathtext_demo.py.  (I'm using 
cairo-1.4.10, which I believe is the latest stable release).

Cheers,
Mike

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] wxPython reference leak was (Re: Memory leaks)

2007-07-06 Thread Michael Droettboom
I had no trouble reproducing this on my Ubuntu Feisty box.

It turns out that wxPython leaks a dictionary for every object whose 
class subclasses a Wx class.  There is a fix for this that made it into 
wxPython-2.8.3.0:

http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/src/helpers.cpp.diff?r1=1.145&r2=1.145.4.1
 


I have verified this on my source-built wxPython-2.8.4.0.  If I remove 
this line, I can reproduce the reference leak.

** I would recommend that anyone using a wxPython-2.8.x prior to 
wxPython-2.8.4 should upgrade.  There are binary packages available for 
a number of distributions on wxpython.org. **

As an aside, I filed a bug for this on Ubuntu launchpad.  I don't know 
if this qualifies for the kind of fix they would normally make as a 
maintenance release.  Promisingly, my bug was confirmed within about 
five minutes of filing it.

https://bugs.launchpad.net/ubuntu/+source/wxwidgets2.8/+bug/124381 


Cheers,
Mike

Eric Firing wrote:
> Michael Droettboom wrote:
>> Interesting...
>>
>> When you get a chance, would you mind running the attached script?  
>> This is how I was finding object leaks before.  It takes a single 
>> commandline argument that is the number of iterations.  Can you send 
>> me the outputs from 1 and 2 iterations?  That way we should be able 
>> to see what type of object is being leaked, which is a good first step.
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 1
> 75891 76010
> *** 
> *** 
>
> uncollectable list: []
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 2
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer 
> Dell424 could not be loaded.
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer pslj4m 
> could not be loaded.
> 75891 76014
> *** 
> *** 
>
> uncollectable list: []
>
>
> Eric
>


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Subsetting fonts in Postscript

2007-07-06 Thread John Hunter
On 7/6/07, Michael Droettboom <[EMAIL PROTECTED]> wrote:

> I don't know the root cause, but FYI I'm definitely getting rasterized
> text with the Cairo backend for mathtext_demo.py.  (I'm using
> cairo-1.4.10, which I believe is the latest stable release).

And you are pretty sure it is all the text, not just the mathtext?  We
do use special fonts for mathtext (the Backoma cm ttf fonts) and
perhaps something funny is going on with them?  But that should not
affect non-mathtext in the same figure.


What about simple_demo.py -- do you get rasters there too?
JDH

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] wxPython reference leak was (Re: Memory leaks)

2007-07-06 Thread Michael Droettboom
I had no trouble reproducing this on my Ubuntu Feisty box.

It turns out that wxPython leaks a dictionary for every object whose 
class subclasses a Wx class.  There is a fix for this that made it into 
wxPython-2.8.3.0:

http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/src/helpers.cpp.diff?r1=1.145&r2=1.145.4.1
 


I have verified this on my source-built wxPython-2.8.4.0.  If I remove 
this line, I can reproduce the reference leak.

** I would recommend that anyone using a wxPython-2.8.x prior to 
wxPython-2.8.4 should upgrade.  There are binary packages available for 
a number of distributions on wxpython.org. **

As an aside, I filed a bug for this on Ubuntu launchpad.  I don't know 
if this qualifies for the kind of fix they would normally make as a 
maintenance release.  Promisingly, my bug was confirmed within about 
five minutes of filing it.

https://bugs.launchpad.net/ubuntu/+source/wxwidgets2.8/+bug/124381 


Cheers,
Mike

Eric Firing wrote:
> Michael Droettboom wrote:
>> Interesting...
>>
>> When you get a chance, would you mind running the attached script?  
>> This is how I was finding object leaks before.  It takes a single 
>> commandline argument that is the number of iterations.  Can you send 
>> me the outputs from 1 and 2 iterations?  That way we should be able 
>> to see what type of object is being leaked, which is a good first step.
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 1
> 75891 76010
> *** 
> *** 
>
> uncollectable list: []
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 2
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer 
> Dell424 could not be loaded.
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer pslj4m 
> could not be loaded.
> 75891 76014
> *** 
> *** 
>
> uncollectable list: []
>
>
> Eric
>


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] wxPython reference leak was (Re: Memory leaks)

2007-07-06 Thread Michael Droettboom
I had no trouble reproducing this on my Ubuntu Feisty box.

It turns out that wxPython leaks a dictionary for every object whose 
class subclasses a Wx class.  There is a fix for this that made it into 
wxPython-2.8.3.0:

http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/src/helpers.cpp.diff?r1=1.145&r2=1.145.4.1
 


I have verified this on my source-built wxPython-2.8.4.0.  If I remove 
this line, I can reproduce the reference leak.

** I would recommend that anyone using a wxPython-2.8.x prior to 
wxPython-2.8.4 should upgrade.  There are binary packages available for 
a number of distributions on wxpython.org. **

As an aside, I filed a bug for this on Ubuntu launchpad.  I don't know 
if this qualifies for the kind of fix they would normally make as a 
maintenance release.  Promisingly, my bug was confirmed within about 
five minutes of filing it.

https://bugs.launchpad.net/ubuntu/+source/wxwidgets2.8/+bug/124381 


Cheers,
Mike

Eric Firing wrote:
> Michael Droettboom wrote:
>> Interesting...
>>
>> When you get a chance, would you mind running the attached script?  
>> This is how I was finding object leaks before.  It takes a single 
>> commandline argument that is the number of iterations.  Can you send 
>> me the outputs from 1 and 2 iterations?  That way we should be able 
>> to see what type of object is being leaked, which is a good first step.
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 1
> 75891 76010
> *** 
> *** 
>
> uncollectable list: []
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 2
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer 
> Dell424 could not be loaded.
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer pslj4m 
> could not be loaded.
> 75891 76014
> *** 
> *** 
>
> uncollectable list: []
>
>
> Eric
>


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] wxPython reference leak was (Re: Memory leaks)

2007-07-06 Thread Michael Droettboom
I had no trouble reproducing this on my Ubuntu Feisty box.

It turns out that wxPython leaks a dictionary for every object whose
class subclasses a Wx class.  There is a fix for this that made it into
wxPython-2.8.3.0:

http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/src/helpers.cpp.diff?r1=1.145&r2=1.145.4.1
 


I have verified this on my source-built wxPython-2.8.4.0.  If I remove
this line, I can reproduce the reference leak.

** I would recommend that anyone using a wxPython-2.8.x prior to
wxPython-2.8.4 upgrade.  There are binary packages available for
a number of distributions on wxpython.org. **

As an aside, I filed a bug for this on Ubuntu launchpad.  I don't know
if this qualifies for the kind of fix they would normally make as a
maintenance release, but I thought it was worth trying.

https://bugs.launchpad.net/ubuntu/+source/wxwidgets2.8/+bug/124381

Cheers,
Mike

Eric Firing wrote:
> Michael Droettboom wrote:
>> Interesting...
>>
>> When you get a chance, would you mind running the attached script?  
>> This is how I was finding object leaks before.  It takes a single 
>> commandline argument that is the number of iterations.  Can you send 
>> me the outputs from 1 and 2 iterations?  That way we should be able 
>> to see what type of object is being leaked, which is a good first step.
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 1
> 75891 76010
> *** 
> *** 
>
> uncollectable list: []
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 2
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer 
> Dell424 could not be loaded.
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer pslj4m 
> could not be loaded.
> 75891 76014
> *** 
> *** 
>
> uncollectable list: []
>
>
> Eric
>



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] E-mail server trouble

2007-07-06 Thread Michael Droettboom
My sincere apologies for the multiple copies of the e-mail sent this 
morning.  I was getting "SMTP server down" messages, but clearly the 
messages were sent anyway.

I'm not a spammer, really! ;)

Mike

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Subsetting fonts in Postscript

2007-07-06 Thread Darren Dale
On Friday 06 July 2007 08:35:31 am John Hunter wrote:
> On 7/6/07, Michael Droettboom <[EMAIL PROTECTED]> wrote:
> > I don't know the root cause, but FYI I'm definitely getting rasterized
> > text with the Cairo backend for mathtext_demo.py.  (I'm using
> > cairo-1.4.10, which I believe is the latest stable release).
>
> And you are pretty sure it is all the text, not just the mathtext?  We
> do use special fonts for mathtext (the Backoma cm ttf fonts) and
> perhaps something funny is going on with them?  But that should not
> affect non-mathtext in the same figure.

When I set my backend to gtkcairo, and do something like

plot([1,2])
xlabel('$0.0, 0.1$')

it is clear that the ticklabels are not rasters, only the mathtext. My fonts 
are the MPL defaults, the search settled on Vera.ttf.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] wxPython reference leak was (Re: Memory leaks)

2007-07-06 Thread Michael Droettboom
I had no trouble reproducing this on my Ubuntu Feisty box.

It turns out that wxPython leaks a dictionary for every object whose
class subclasses a Wx class.  There is a fix for this that made it into
wxPython-2.8.3.0:

http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/src/helpers.cpp.diff?r1=1.145&r2=1.145.4.1
 


I have verified this on my source-built wxPython-2.8.4.0.  If I remove
this line, I can reproduce the reference leak.

** I would recommend that anyone using a wxPython-2.8.x prior to
wxPython-2.8.4 upgrade.  There are binary packages available for
a number of distributions on wxpython.org. **

As an aside, I filed a bug for this on Ubuntu launchpad.  I don't know
if this qualifies for the kind of fix they would normally make as a
maintenance release, but I thought it was worth trying.

https://bugs.launchpad.net/ubuntu/+source/wxwidgets2.8/+bug/124381

Cheers,
Mike

Eric Firing wrote:
> Michael Droettboom wrote:
>> Interesting...
>>
>> When you get a chance, would you mind running the attached script?  
>> This is how I was finding object leaks before.  It takes a single 
>> commandline argument that is the number of iterations.  Can you send 
>> me the outputs from 1 and 2 iterations?  That way we should be able 
>> to see what type of object is being leaked, which is a good first step.
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 1
> 75891 76010
> *** 
> *** 
>
> uncollectable list: []
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 2
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer 
> Dell424 could not be loaded.
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer pslj4m 
> could not be loaded.
> 75891 76014
> *** 
> *** 
>
> uncollectable list: []
>
>
> Eric
>



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] wxPython reference leak was (Re: Memory leaks)

2007-07-06 Thread Michael Droettboom
I had no trouble reproducing this on my Ubuntu Feisty box.

It turns out that wxPython leaks a dictionary for every object whose
class subclasses a Wx class.  There is a fix for this that made it into
wxPython-2.8.3.0:

http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/src/helpers.cpp.diff?r1=1.145&r2=1.145.4.1
 


I have verified this on my source-built wxPython-2.8.4.0.  If I remove
this line, I can reproduce the reference leak.

** I would recommend that anyone using a wxPython-2.8.x prior to
wxPython-2.8.4 should upgrade.  There are binary packages available for
a number of distributions on wxpython.org. **

As an aside, I filed a bug for this on Ubuntu launchpad.  I don't know
if this qualifies for the kind of fix they would normally make as a
maintenance release.  Promisingly, my bug was confirmed within about
five minutes of filing it.

https://bugs.launchpad.net/ubuntu/+source/wxwidgets2.8/+bug/124381

Cheers,
Mike

Eric Firing wrote:
> Michael Droettboom wrote:
>> Interesting...
>>
>> When you get a chance, would you mind running the attached script?  
>> This is how I was finding object leaks before.  It takes a single 
>> commandline argument that is the number of iterations.  Can you send 
>> me the outputs from 1 and 2 iterations?  That way we should be able 
>> to see what type of object is being leaked, which is a good first step.
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 1
> 75891 76010
> *** 
> *** 
>
> uncollectable list: []
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 2
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer 
> Dell424 could not be loaded.
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer pslj4m 
> could not be loaded.
> 75891 76014
> *** 
> *** 
>
> uncollectable list: []
>
>
> Eric
>



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] wxPython reference leak was (Re: Memory leaks)

2007-07-06 Thread Michael Droettboom
I had no trouble reproducing this on my Ubuntu Feisty box.

It turns out that wxPython leaks a dictionary for every object whose
class subclasses a Wx class.  There is a fix for this that made it into
wxPython-2.8.3.0:

http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/src/helpers.cpp.diff?r1=1.145&r2=1.145.4.1
 


I have verified this on my source-built wxPython-2.8.4.0.  If I remove
this line, I can reproduce the reference leak.

** I would recommend that anyone using a wxPython-2.8.x prior to
wxPython-2.8.4 should upgrade.  There are binary packages available for
a number of distributions on wxpython.org. **

As an aside, I filed a bug for this on Ubuntu launchpad.  I don't know
if this qualifies for the kind of fix they would normally make as a
maintenance release.  Promisingly, my bug was confirmed within about
five minutes of filing it.

https://bugs.launchpad.net/ubuntu/+source/wxwidgets2.8/+bug/124381

Cheers,
Mike

Eric Firing wrote:
> Michael Droettboom wrote:
>> Interesting...
>>
>> When you get a chance, would you mind running the attached script?  
>> This is how I was finding object leaks before.  It takes a single 
>> commandline argument that is the number of iterations.  Can you send 
>> me the outputs from 1 and 2 iterations?  That way we should be able 
>> to see what type of object is being leaked, which is a good first step.
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 1
> 75891 76010
> *** 
> *** 
>
> uncollectable list: []
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 2
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer 
> Dell424 could not be loaded.
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer pslj4m 
> could not be loaded.
> 75891 76014
> *** 
> *** 
>
> uncollectable list: []
>
>
> Eric
>



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] wxPython reference leak was (Re: Memory leaks)

2007-07-06 Thread Michael Droettboom
I had no trouble reproducing this on my Ubuntu Feisty box.

It turns out that wxPython leaks a dictionary for every object whose
class subclasses a Wx class.  There is a fix for this that made it into
wxPython-2.8.3.0:

http://cvs.wxwidgets.org/viewcvs.cgi/wxWidgets/wxPython/src/helpers.cpp.diff?r1=1.145&r2=1.145.4.1
 


I have verified this on my source-built wxPython-2.8.4.0.  If I remove
this line, I can reproduce the reference leak.

** I would recommend that anyone using a wxPython-2.8.x prior to
wxPython-2.8.4 upgrade.  There are binary packages available for
a number of distributions on wxpython.org. **

As an aside, I filed a bug for this on Ubuntu launchpad.  I don't know
if this qualifies for the kind of fix they would normally make as a
maintenance release, but I thought it was worth trying.

https://bugs.launchpad.net/ubuntu/+source/wxwidgets2.8/+bug/124381

Cheers,
Mike

Eric Firing wrote:
> Michael Droettboom wrote:
>> Interesting...
>>
>> When you get a chance, would you mind running the attached script?  
>> This is how I was finding object leaks before.  It takes a single 
>> commandline argument that is the number of iterations.  Can you send 
>> me the outputs from 1 and 2 iterations?  That way we should be able 
>> to see what type of object is being leaked, which is a good first step.
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 1
> 75891 76010
> *** 
> *** 
>
> uncollectable list: []
>
> [EMAIL PROTECTED]:~/programs/py/mpl/tests$ python memleak_gui_wx.py 2
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer 
> Dell424 could not be loaded.
> GnomePrintCupsPlugin-Message: The ppd file for the CUPS printer pslj4m 
> could not be loaded.
> 75891 76014
> *** 
> *** 
>
> uncollectable list: []
>
>
> Eric
>



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Subsetting fonts in Postscript

2007-07-06 Thread Michael Droettboom
John Hunter wrote:
> On 7/6/07, Michael Droettboom <[EMAIL PROTECTED]> wrote:
>
>> I don't know the root cause, but FYI I'm definitely getting rasterized
>> text with the Cairo backend for mathtext_demo.py.  (I'm using
>> cairo-1.4.10, which I believe is the latest stable release).
>
> And you are pretty sure it is all the text, not just the mathtext?  We
> do use special fonts for mathtext (the Backoma cm ttf fonts) and
> perhaps something funny is going on with them?  But that should not
> affect non-mathtext in the same figure.
Yes, all text is rasterized (in this case the math as well as the tick 
labels).  Looking in the file it doesn't appear that any vector fonts 
have been included at all.

I have posted the file here for the curious:

ftp://ftp.stsci.edu/tmp/mdroe/mathtext_demo_cairo.ps

I'm running cairo-1.4.10, pycairo-1.4.0, python-2.5.1.  Any other 
relevant details?

Cheers,
Mike

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Subsetting fonts in Postscript

2007-07-06 Thread John Hunter
On 7/5/07, Carl Worth <[EMAIL PROTECTED]> wrote:

> Thanks, John, for sharing this essay. Please allow me to respond to a
> few points:

Hey Carl -- thanks for the response.  You have definitely made me
reconsider some of my arguments, though my conclusion mostly remains
intact.   At the end of the day, it is a fact that almost all of the
significant software for scientific computing in python is BSD
compatible and GPL averse.  This in part stems from the position of
enthought, who make very substantial contributions to scientific
computing in python (scipy, chaco, traits, envisage, tvtk, the annual
conference...) and it is my understanding that they do need to release
closed source applications built on top of their open source
libraries.  In the past I have had similar ambitions, and one day may
again, so I too am GPL averse.

I have no objection to proprietary, closed source software in the
commercial domain as many in the free software world do, with the
notable exception that I think scientific computing should be done
with open source software.  I wrote mpl as part of a suite of tools to
replace proprietary EEG software (dongle and all) because work done
with that software is only reproducible if you have the 50 thousand
dollar dongle.  There is a particular ideology with the free software
foundation that all software must be free that many in the scientific
computing community in python do not support.  In this community, I
think most people prefer open source software because they like to
build their own tools, see what is going on under the hood, and fix it
if it is broken.  There is also the compelling argument, in principle
though not in practice,  that open algorithms and code is required by
peer review.  And as coding science geeks who might actually do
something one day that will also pay off in dollar terms, I think many
of us want to leave open the possibility of building a proprietary
product built on these tools, and the GPL is somewhat incompatible
with these ambitions.

> I would guess you'll find that quite difficult in many cases,
> (I don't agree that the GPL is most often chosen without intention
> just because it is "famous").

Well, we certainly have had some success with it and we have had
people respond, "you're right, I just picked it because it was the
only thing I'd heard of".  The target audience here is a grad student
releasing some technical suite of algorithms that they happen to be
world experts in -- they are more scientists than coders -- and are
not nearly as deep into this world as we are.  This is their first
significant coding project and they want to share their algorithms,
and often they release it as GPL.  We pounce on them and say, "What
about BSD, so it will play more nicely with scipy and friends?".  And
by and large that is successful.  This is not a pitch aimed at mature
projects with multiple contributors, where you are certainly right,
getting a switch would be almost impossible.

> You only bring the LGPL up at the end of your essay as almost an
> afterthought and dismiss it with a very vague, "but many companies are
> still loath to use it out of legal concerns". Do you have actual
> evidence to point to for that?

I think LGPL is a perfectly good license which satisfies most of my
objections.  Eric Jones of enthought has said he is reluctant to use
LGPL code.  I get the general sense that he simply doesn't want to
risk a legal battle with the FSF, which may not be entirely rational,
but their zealotry on some of these issues may simply scare some of
the people in the commercial space.  Perhaps you are right that the
better answer for the scientific computing community in python is to
reconsider the LGPL stance in scipy, but until that happens, and it is
not my decision and I view it as unlikely, the best thing for this
community is to use a set of compatible licenses in which we can share
code, and the fact remains that we cannot include any LGPL code in our
code unless we want our code to be LGPL as well.  Sometimes I just
want to rip out a small algorithm from a library and insert it into
mpl, without having to bring in the entire library as a dependency.
Unless I want my code to be LGPL, I can't do that.

When I get some time, I'll update my essay, which was really just an
email posted on the scipy site but is now an essay , and
incorporate some of your other very good arguments as well.

Thanks,
JDH

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Subsetting fonts in Postscript

2007-07-06 Thread Michael Droettboom
John Hunter wrote:
> What about simple_demo.py -- do you get rasters there too?
No.  I get vectors there.

I noticed that using the backend "GtkCairo" seems to use backend_ps.py 
for Postscript output.  Using backend "Cairo" uses cairo.  Maybe 
probably explains the difference between Darren and my results.

Cheers,
Mike

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] canvas objects

2007-07-06 Thread Paul Kienzle
Hi,

I've been playing with the pick infrastructure in 0.90 and find that
it doesn't meet my needs.  The issue is that events from all artists
go to the same callback, so you are forced write your callback as a
series of if statements for each artist which may receive a pick event.

I would rather have an infrastructure more like a canvas, where I
can register callbacks to particular handles for particular 
mouse events (enter, leave, motion, press and release).  I would like
to rely on the zorder attribute of artists when processing the
events. If the callback succeeds, then the event is consumed and 
no more handles are checked.  If the callback fails then the next
lower zorder handle is checked.

I can simulate what I want with the current infrastructure by having
the mouse events call figure.pick() and the pick event capture
every object that was picked, but it is ugly and not very 
efficient (not every object wants to track enter/motion/leave
events for example, but they get asked on every pick even if
they only want to monitor mouse clicks).

Instead I would like to start by splitting the current pick method
into two parts:
   contains(event,picker)  which returns truth value,details
   pick(event) which generates the current pick event

Later I can construct the infrastructure I want on the contains()
function for each artist.

Does this approach seem reasonable to those who will approve the
patches I will send?

Thanks,

Paul Kienzle
[EMAIL PROTECTED]

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] canvas objects

2007-07-06 Thread John Hunter
On 7/6/07, Paul Kienzle <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've been playing with the pick infrastructure in 0.90 and find that
> it doesn't meet my needs.  The issue is that events from all artists
> go to the same callback, so you are forced write your callback as a
> series of if statements for each artist which may receive a pick event.

I definitely agree that having to write one callback for all the
different objects you may want to pick on is a bad design, so I'd be
happy to see something better.  Do you think it would make sense to
register callbacks with a given artist -- eg if you are picked call me
-- or with a class (eg all Line3D picks call me), or do you have
another approach in mind?

> I would rather have an infrastructure more like a canvas, where I
> can register callbacks to particular handles for particular
> mouse events (enter, leave, motion, press and release).  I would like
> to rely on the zorder attribute of artists when processing the
> events. If the callback succeeds, then the event is consumed and
> no more handles are checked.  If the callback fails then the next
> lower zorder handle is checked.
>
> I can simulate what I want with the current infrastructure by having
> the mouse events call figure.pick() and the pick event capture
> every object that was picked, but it is ugly and not very
> efficient (not every object wants to track enter/motion/leave
> events for example, but they get asked on every pick even if
> they only want to monitor mouse clicks).
>
> Instead I would like to start by splitting the current pick method
> into two parts:
>contains(event,picker)  which returns truth value,details
>pick(event) which generates the current pick event
>
> Later I can construct the infrastructure I want on the contains()
> function for each artist.
>
> Does this approach seem reasonable to those who will approve the
> patches I will send?

I don't really understand the contains part -- can you elaborate a little bit?

I would definitely be amenable to accepting patches that improve the
current API :-)

If you want to support things like mouse over, in which the pick will
have to be computed on mouse motion, we'll want to do some caching, eg
in line, to make this more efficient.  The current approach is fairly
expensive but that's fine for single click picks, but not for
continuous mouse motion.

JDH

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] GLPython for 3D plots

2007-07-06 Thread Nicolas Rougier


Hi all,

I've been working on an OpenGL python terminal because I needed some
fast display for regular 2D arrays and I thought it might be of some
interest for some of you (even if it does not compare to matplotlib in
any way).

The address is:
http://www.loria.fr/~rougier/index.php?n=GLPython.GLPython


This is an early beta and I'm looking for interested developers that
would like to join the project to think about the overall architecture
and how to make it "compatible" with matplotlib philosophy.


Nicolas.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] canvas objects

2007-07-06 Thread Paul Kienzle
On Fri, Jul 06, 2007 at 10:15:48AM -0500, John Hunter wrote:
> On 7/6/07, Paul Kienzle <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I've been playing with the pick infrastructure in 0.90 and find that
> > it doesn't meet my needs.  The issue is that events from all artists
> > go to the same callback, so you are forced write your callback as a
> > series of if statements for each artist which may receive a pick event.
> 
> I definitely agree that having to write one callback for all the
> different objects you may want to pick on is a bad design, so I'd be
> happy to see something better.  Do you think it would make sense to
> register callbacks with a given artist -- eg if you are picked call me
> -- or with a class (eg all Line3D picks call me), or do you have
> another approach in mind?

I definitely want to be able to associate different callbacks with
different specific artists.  For example, I might want to define
a gaussian peak that I want to drag around and match to the peak in
some data.  The data and the peak will both be represented using lines,
but I only want to drag the peak, not the data.

Having a default callback for a class may be useful in many places
as well, such as automatically highlighting the corresponding legend
entry on mouseover.  For now I have no opinion on whether the additional
complexity is worthwhile.

- Paul

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] OT: licensing discussion

2007-07-06 Thread Bill Baxter

On 7/7/07, Christopher Barker <[EMAIL PROTECTED]> wrote:


Sorry to spam this list with this, but it came up here...

Carl Worth wrote:
>> http://www.scipy.org/License_Compatibility
>
> Thanks, John, for sharing this essay. Please allow me to respond to a
> few points:



I can't answer your question about GPL in the gub'ment, but I would really
like to know where I can read Carl Worth's rebuttal to the above URL.

--bb
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] OT: licensing discussion

2007-07-06 Thread Christopher Barker
Sorry to spam this list with this, but it came up here...

Carl Worth wrote:
>> http://www.scipy.org/License_Compatibility
> 
> Thanks, John, for sharing this essay. Please allow me to respond to a
> few points:

Carl, you have clearly thought this out a lot, and have a real 
experience with this, so I have a issue that you may have some insights 
into:

I work for the US federal government, and we are not allowed to 
copyright our work, so be definition, any code we write is in the public 
domain. This means that we can not release code under the GPL, as you 
have to hold copyright to do that. This makes our managers nervous about 
using GPL'd libs (LGPL is fine, I'm a big fan of LGPL)

The FSF has unfortunately only ALMOST addressed these issues in their FAQ:

http://www.fsf.org/licensing/licenses/gpl-faq.html#GPLUSGov
http://www.fsf.org/licensing/licenses/gpl-faq.html#GPLUSGov

 From the answers to these FAQs, it's clear that we can release our code 
into the public domain, and it can then be combined with GPL code in a 
GPL project, so we can contribute to GPL and LGPL projects.

However, it still looks like we can't actually release a program 
ourselves under the GPL, and if a given program contains GPL code, then 
IIUC, it MUST be released under the GPL, so we've got a problem.

We could probably get around all this by developing the code, but having 
someone else release it, but the implications of that are still 
confusing to me.

To repeat: LGPL is OK -- while we might (and have) contribute to a 
library we use, we have no need to release a version of it ourselves.

Anyway, what all this means is that so far we've avoided GPL code for 
our projects -- something to keep in mind, the US gov't is a major user 
of Open Source Projects.

-Chris

PS: Google is remarkably unhelpful to me in figuring all this out. If 
anyone has useful references about the US Federal gov't developed and 
released software an the GPL -- please send me the links!

-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] OT: licensing discussion

2007-07-06 Thread Carl Worth
On Sat, 7 Jul 2007 02:16:34 +0900, "Bill Baxter" wrote:
> > Carl Worth wrote:
> > >> http://www.scipy.org/License_Compatibility
> > >
> > > Thanks, John, for sharing this essay. Please allow me to respond to a
> > > few points:
>
> I can't answer your question about GPL in the gub'ment, but I would really
> like to know where I can read Carl Worth's rebuttal to the above URL.

I sent that in the middle of a matplotlib-devel thread yesterday. It
appears to be archived here:


http://sourceforge.net/mailarchive/message.php?msg_name=87ps36a32z.wl%25cworth%40cworth.org

-Carl


pgpaZjNzAxbdb.pgp
Description: PGP signature
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] GLPython for 3D plots

2007-07-06 Thread Bill Baxter

"Cheat commandos, Rock rock on."
Sounds great.  This is sorely needed in matplotlib I think.  But I have no
idea how to make it work.  Mayavi is way to huge for the kind of simple 3D
plotting needs most folks have.

--bb

On 7/7/07, Nicolas Rougier <[EMAIL PROTECTED]> wrote:




Hi all,

I've been working on an OpenGL python terminal because I needed some
fast display for regular 2D arrays and I thought it might be of some
interest for some of you (even if it does not compare to matplotlib in
any way).

The address is:
http://www.loria.fr/~rougier/index.php?n=GLPython.GLPython


This is an early beta and I'm looking for interested developers that
would like to join the project to think about the overall architecture
and how to make it "compatible" with matplotlib philosophy.


Nicolas.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Subsetting fonts in Postscript

2007-07-06 Thread Carl Worth
On Fri, 6 Jul 2007 08:20:59 -0500, "John Hunter" wrote:
> On 7/5/07, Carl Worth <[EMAIL PROTECTED]> wrote:
> Hey Carl -- thanks for the response.

You're quite welcome. Thank you for receiving it as intended---as an
alternate viewpoint based on my experience.

> I think LGPL is a perfectly good license which satisfies most of my
> objections.

Good. That's the most important point I wanted to get across. It
seemed like an obvious hole in the original essay to me.

>  Eric Jones of enthought has said he is reluctant to use
> LGPL code.  I get the general sense that he simply doesn't want to
> risk a legal battle with the FSF, which may not be entirely rational,
> but their zealotry on some of these issues may simply scare some of
> the people in the commercial space.

I won't comment on hearsay, but I'd love to have a conversation with
anyone about merits and risks of the LGPL. As for the FSF and
commercial involvement, I think the last 18 months of the GPLv3
drafting process has shown quite conclusively that the FSF has very
effectively engaged some very significant commercial interests.

Here's one point of evidence of that:

GNU-Linux Software License Revision Praised By SIFMA
http://www.sifma.org/news/47167838.shtml

And much more information on a similar theme is available in this
excellent talk recently given by Eben Moglen:

http://www.groklaw.net/article.php?story=20070630094005112

> Perhaps you are right that the
> better answer for the scientific computing community in python is to
> reconsider the LGPL stance in scipy, but until that happens, and it is
> not my decision and I view it as unlikely, the best thing for this
> community is to use a set of compatible licenses in which we can share
> code, and the fact remains that we cannot include any LGPL code in our
> code unless we want our code to be LGPL as well.

I made the caveat earlier that it's often good to not change licensing
once a community has formed around it. Similarly, it's also often good
to go with the same license as the wider community you're trying to be
a part of. So again, you're probably doing the right thing.

But I can also point to my own experience. When I first started what
later would become cairo, (it was called Xr at the time), I had
expected it to be a library that formed part of the X Window
System. So I chose the MIT license that was the basis of that
community's code.

Later though, as cairo matured, and we realized it had much wider
scope than just an X library, I didn't feel constrained to choose the
MIT license for purpose of compatibility with X. So we floated the
idea of changing the license from MIT to to LGPL and that idea was
extremely well-received in the cairo community and ultimately
successful. Here's the thread that started it for interest:

[Cairo] Possible license change: MIT -> LGPL
http://lists.freedesktop.org/archives/cairo/2003-November/000737.html

>Sometimes I just
> want to rip out a small algorithm from a library and insert it into
> mpl, without having to bring in the entire library as a dependency.
> Unless I want my code to be LGPL, I can't do that.

There are some ironies in free software licensing decisions. You can
choose an MIT/BSD license in order to have the widest possible "fan
out", (that is, the number of projects that can take your code), but
that might also limit your "fan in", (the number of projects from
which you can accept code into your project).

So you're suffering from "limited fan-in" I would say due to having
chosen a BSD-ish license but wanting to benefit from other LGPL code.

-Carl


pgplsV8awjdq4.pgp
Description: PGP signature
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] OT: licensing discussion

2007-07-06 Thread Carl Worth
On Fri, 06 Jul 2007 10:05:22 -0700, Christopher Barker wrote:
> Sorry to spam this list with this, but it came up here...
>
> Carl, you have clearly thought this out a lot, and have a real
> experience with this, so I have a issue that you may have some insights
> into:

Yes, I have thought about licensing a lot. And I'll gladly share my
opinions, (but no legal advice, of course, etc. etc.).

> I work for the US federal government, and we are not allowed to
> copyright our work, so be definition, any code we write is in the public
> domain.

Fantastic! And that's just as government work should be. (I used to
work for a University research lab doing mostly government-funded
project. Sadly, I saw lots of government funds getting poured down the
drain to fund projects that resulted in proprietary software that wen
nowhere.)

> This means that we can not release code under the GPL, as you
> have to hold copyright to do that. This makes our managers nervous about
> using GPL'd libs (LGPL is fine, I'm a big fan of LGPL)

You don't have to release code under the GPL. As you said, you
can't. Just keep publishing that public domain code.

> The FSF has unfortunately only ALMOST addressed these issues in their FAQ:
>
> http://www.fsf.org/licensing/licenses/gpl-faq.html#GPLUSGov
> http://www.fsf.org/licensing/licenses/gpl-faq.html#GPLUSGov

The FSF answer looks remarkably clear to me. I don't see the "almost"
at all.

>  From the answers to these FAQs, it's clear that we can release our code
> into the public domain, and it can then be combined with GPL code in a
> GPL project, so we can contribute to GPL and LGPL projects.

Yes, definitely.

> However, it still looks like we can't actually release a program
> ourselves under the GPL, and if a given program contains GPL code, then
> IIUC, it MUST be released under the GPL, so we've got a problem.

Oops. I think you made a mistake here. Read the answer from the FSF
again:

Can the US Government release improvements to a GPL-covered
program?

Yes. If the improvements are written by US government employees in
the course of their employment, then the improvements are in
the public domain. However, the improved version, as a whole,
is still covered by the GNU GPL. There is no problem in this
situation.

And keep rereading that until the part that says "There is no problem
in this situation" really sinks in. I don't know how I could word the
reply more clearly than the FSF did.

And if you think there's specific text in the GPL that contradicts
this advice from the FSF, I'd suggest you contact the FSF about it,
(but frankly, I can't find any such text).

So if I were in your situation, I would contribute to GPL projects by
sending public-domain contributions. I would also start any new
projects by releasing public-domain code, (which others could then
take and modify and release their modifications under the GPL if
desired).

> Anyway, what all this means is that so far we've avoided GPL code for
> our projects -- something to keep in mind, the US gov't is a major user
> of Open Source Projects.

Please reconsider this, (or invite your lawyers to, or write to the
Free Software Foundation as needed).

> PS: Google is remarkably unhelpful to me in figuring all this out. If
> anyone has useful references about the US Federal gov't developed and
> released software an the GPL -- please send me the links!

A quick scan through the Linux kernel source code, (obviously one of
the most popular GPL-released projects), shows plenty of contributions
from people with .gov email addresses, (both NSA and LLNL feature
prominently). So you might find some helpful people to contact there
who are more directly in circumstances similar to yours, (feel free to
contact me off-list if you've got any questions about how to track
down some potentially helpful email addresses there).

-Carl


pgpknlcDvcLB6.pgp
Description: PGP signature
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Cairo backend prospects

2007-07-06 Thread Eric Firing
All,

I am reviving this old thread because the topic came up in a thread with 
a less-apropos name, and I think we can move it forward a bit more now. 
  Steve's message (below) is still a useful summary of the cairo status.

examples/backend_driver.py can now be used for wholesale testing and 
comparison of the cairo backend.  Example:

python backend_driver.py cairo.png agg

will make png files using cairo and using agg.  On my machine (Thinkpad 
T60, ubuntu feisty) it takes 0.96 minutes for Cairo, 0.76 for Agg.

There are two conspicuous bugs in the Cairo output:

1) contour_demo.py: the image part of the figure is wrong in shape and 
content.  It looks like an array dimensions confusion or something like 
that.  Strangely, the very similar image in image_demo.py is fine.

2) polar_demo.py: the part of the spiral outside the bounding circle is 
removed in the Agg version but not in the Cairo version.

There are also subtle differences such as in text positioning.  The 
colorbar in image_masked.py is an example of a case where the agg 
rendering is much better than the Cairo rendering, which has some sort 
of aliasing that causes stripes.  There are probably other such things 
worth pointing out.

For pdf output I have not tried to look at all the images, but the 
timing is Cairo 0.71 minutes, pdf backend 1.56 minutes.

I have also modified matplotlib.use() and the command-line parsing so 
that the "cairo.pdf" style of backend.output specification works in both 
places.  (Only for cairo--it is not needed for any other backend.)

I am not the right person to try to fix the bugs in the Cairo backend, 
but I hope it will indeed be moved forward.  It looks like it is close, 
and it could be a big asset for matplotlib in the longer term.

Eric

Steve Chaplin wrote:
> On Sat, 2007-01-06 at 09:23 -1000, Eric Firing wrote:
>> Steve,
>>
>> Darren Dale raised a question offline that I think will be of general 
>> interest to mpl devels, and that you are the person to answer:
>>
>> How do you see the future of a cairo backend as a prospective 
>> replacement for most or all of the primary mpl backends?
> I think cairo could potentially be used to replace the pdf, ps, svg
> and gdk/gtk backends which would unify most of the backends and simplify
> a lot of the code.
> 
>> What would need to be completed in cairo? Based on the cairo web page, I 
>> get the impression that quite a bit is still missing, including eps 
>> generation and genuine vector ps.  But maybe the web page is just out of 
>> date.
> Which web page is out of date? Where does it mention eps and ps, I
> couldn't find it.
> 
> My general impression of the cairo "surfaces" is:
> ImageSurface/png - support is very good
> gtk/xlib - support is very good
> ps/pdf/svg are usable but less mature and still developing so there may
> be occasional problems drawing specific items
> ps - it used to embed bitmap images but now most output is vector based
> eps - is not supported yet, but may be in a future version
> 
>> What would need to be done in mpl, and how hard would it be?
> The cairo backend can already be used for png, ps, pdf and gtk output so
> I don't think there would be much to do. Mostly, it needs testing -
> running all the mpl examples and checking the output looks OK.
> 
>> Would mpl get slower if everything went through cairo?
> Not sure, you would need to run cairo and test it. It used to be much slower
> than Agg but more recent versions have had many optimisations applied and
> the difference is much smaller now.
> 
>> Any other considerations?
> Some parts of mpl are Agg-specific and other parts (the whole drawing model)
> are designed around the gdk drawing style - this makes things harder and
> inefficient when using cairo.
> 
> On Sat, 2007-01-06 at 09:36 -1000, Eric Firing wrote:
>> One more question: how does the image quality of cairo compare to
>> Agg? 
>> Is the antialiasing as good? 
> Image quality looks OK to me, but I'm no expert.
> 
> The web browser Firefox 3.0 (due to be released early in 2007) will use
> cairo for all rendering. Firefox requires a high level of graphics
> performance and the upcoming cairo 1.4 release is expected to provide
> that.
> 
> Steve
> 
> Send instant messages to your online friends http://au.messenger.yahoo.com 


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Cairo backend prospects

2007-07-06 Thread John Hunter
On 7/6/07, Eric Firing <[EMAIL PROTECTED]> wrote:

> 2) polar_demo.py: the part of the spiral outside the bounding circle is
> removed in the Agg version but not in the Cairo version.

This is a fairly new feature I added to add -- clipping to a polygon.
I haven't ported it to postscript yet.  The GraphicsContext now has a
clip_path attribute, which is an agg path storage instance.  Even
though it is an agg object (not related to backend_agg actually,
separate code base and wrapping) Eg if we construct a path with

  from matplotlib import agg
  path = agg.path_storage()
  path.move_to(10,10)
  path.line_to(100,100)
  path.line_to(200,200)
  path.line_to(100,200)
  path.close_polygon()

We can access it from python code like
In [62]: for i in range(path.total_vertices()):
   : cmd, x, y = path.vertex(i)
   : print cmd, x, y
   :
1 10.0 10.0
2 100.0 100.0
2 200.0 200.0
2 100.0 200.0
79 0.0 0.0

Where each of the cmd is an integer given by one of the path commands

In [60]: for name in dir(agg):
   : if not name.startswith('path_cmd'): continue
   : print name, getattr(agg, name)
   :
path_cmd_catrom 6
path_cmd_curve3 3
path_cmd_curve4 4
path_cmd_curveN 5
path_cmd_end_poly 15
path_cmd_line_to 2
path_cmd_mask 15
path_cmd_move_to 1
path_cmd_stop 0
path_cmd_ubspline 7


The final command "79" which is the result of the
path.close_polygon() function call is a mask of two flags

In [65]: agg.path_flags_close | agg.path_cmd_end_poly
Out[65]: 79

Steve had expressed some dissatisfaction in using the agg python
object for path storage, because agg is C++ whereas cairo is C, and it
just feels wrong to be using an agg path for cairo, but at the end of
the day, we faced either rolling our own backend independent path
object or reusing one, and since agg is fairly deeply ingrained into
mpl and unlikely to disappear, I decided to do a backend independent
SWIG wrapping of agg that could be used across backends to expose some
of the data structures and functionality (eg image interpolation, path
structures, whatever).  The idea was to eventually get rid of backend
agg entirely and replace it with backend_agg2 which uses the SWIG
python layer and thereby exposing more of agg's general functionality
at the python/user layer.  Unfortunately, this project has stalled and
we currently have the agg layer but are not using it for agg backend
rendering, which is still done in the custom CXX extension code.

The agg path structure is used very lightly currently at the python
level, so if folks fine this arrangement problematic we can
reconsider.

JDH

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] OT: licensing discussion

2007-07-06 Thread Christopher Barker
Carl Worth wrote:
> Yes, I have thought about licensing a lot. And I'll gladly share my
> opinions, (but no legal advice, of course, etc. etc.).

Thanks for your input.

>> I work for the US federal government, and we are not allowed to
>> copyright our work, so be definition, any code we write is in the public
>> domain.
> 
> Fantastic! And that's just as government work should be. (I used to
> work for a University research lab doing mostly government-funded
> project. Sadly, I saw lots of government funds getting poured down the
> drain to fund projects that resulted in proprietary software that wen
> nowhere.)

Well, what we produce ourselves is public domain, but what we spend 
taxpayers money on by hiring contractors is a totally different story. 
All too often contractors are paid to develop something that they keep 
all the rights too.

> You don't have to release code under the GPL. As you said, you
> can't. Just keep publishing that public domain code.

> Oops. I think you made a mistake here. Read the answer from the FSF
> again:
> 
>   Can the US Government release improvements to a GPL-covered
>   program?
> 
>   Yes. If the improvements are written by US government employees in
>   the course of their employment, then the improvements are in
>   the public domain. However, the improved version, as a whole,
>   is still covered by the GNU GPL. There is no problem in this
>   situation.

> And keep rereading that until the part that says "There is no problem
> in this situation" really sinks in. I don't know how I could word the
> reply more clearly than the FSF did.

Here is the distinction I (and our lawyers) see, that others don't seem 
to, so maybe I'm missing something. In essence, I see a distinction 
between contributing to a project someone else is releasing, and 
creating a derived work that I release myself. Maybe there is no difference.

Example of the two different situations:

1) I have written a bug fix or new feature to a GPL or LGPL piece of 
software that I want to contribute back. As it says above, no problem. I 
send it to an email list, post it in a bug tracker, whatever. It is now 
in the public domain, and it can be added to the GPL'd project. No 
problem here.

2) I have written a substantial application that makes some use of some 
GPL'd code. I want to put that app up on a government-run web site, and 
let people use it at their will. As I understand it, I am now 
"releasing" the application, and as it includes some GPL code, it MUST 
be released under the GPL. But I can't do that, because I don't hold 
copyright over the stuff I've written on the taxpayers time. So what do 
I do?

I could post all the code I wrote myself (released into the public 
domain), then post instructions how to combine it with the GPL code, 
compile it, and viola, you have your app, but that's not exactly making 
things as accessible as I'd like.

The work around is to find someone else to do the combining, compiling 
and releasing for us.

And here is the text of the GPL FAQ that I refer to:

"""
Can the US Government release a program under the GNU GPL?

If the program is written by US federal government employees in the 
course of their employment, it is in the public domain, which means it 
is not copyrighted. Since the GNU GPL is based on copyright, such a 
program cannot be released under the GNU GPL.
"""

And I have written the FSF, and not gotten a reply.

> So if I were in your situation, I would contribute to GPL projects by
> sending public-domain contributions.

Done and doing that.

>> Anyway, what all this means is that so far we've avoided GPL code for
>> our projects -- something to keep in mind, the US gov't is a major user
>> of Open Source Projects.
> 
> Please reconsider this, (or invite your lawyers to, or write to the
> Free Software Foundation as needed).

Honestly, it hasn't been difficult yet. As John has referred to, most 
Scientific code seems to not be GPL. We came close when we were going to 
use MySQL in a product, but we ended up going with a non-GPL Python 
Object DB instead.

> A quick scan through the Linux kernel source code, (obviously one of
> the most popular GPL-released projects), shows plenty of contributions
> from people with .gov email addresses, 

Sure, contributing is no problem, it's the releasing of derived works 
that has me concerned.

> Feel free to
> contact me off-list if you've got any questions about how to track
> down some potentially helpful email addresses there).

I do know NASA has released some stuff under the GPL, but I haven't 
tracked down how or why yet. Any contacts would be appreciated.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]

-

Re: [matplotlib-devel] canvas objects

2007-07-06 Thread Paul Kienzle
On Fri, Jul 06, 2007 at 10:15:48AM -0500, John Hunter wrote:
> On 7/6/07, Paul Kienzle <[EMAIL PROTECTED]> wrote:
> > Instead I would like to start by splitting the current pick method
> > into two parts:
> >contains(event,picker)  which returns truth value,details
> >pick(event) which generates the current pick event
> 
> I don't really understand the contains part -- can you elaborate a little bit?
> 
> I would definitely be amenable to accepting patches that improve the
> current API :-)

I have an initial patch against CVS available which implements
contains() for most classes.  Legend is too complex for simple hacks.
I have a number of questions regarding details of implementation,
in particular determining sizes of things on the plot.

The question now is what to do with it? I can post it to the patch
tracker on sourceforge, but I'm hesitant to do so since it still
has issues.  Do you want it there or on the list?

Let me know...

- Paul


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] OT: licensing discussion

2007-07-06 Thread Carl Worth
On Fri, 06 Jul 2007 14:03:30 -0700, Christopher Barker wrote:
> to, so maybe I'm missing something. In essence, I see a distinction 
> between contributing to a project someone else is releasing, and 
> creating a derived work that I release myself. Maybe there is no
> difference.

I'll reply only to the problematic case. (And we're definitely
off-topic for the matplotlib-devel list, so I suggest we take any
further discussion privately unless someone steps up and says "please,
continue here").

> 2) I have written a substantial application that makes some use of some 
> GPL'd code. I want to put that app up on a government-run web site, and 
> let people use it at their will. As I understand it, I am now 
> "releasing" the application, and as it includes some GPL code, it MUST 
> be released under the GPL. But I can't do that, because I don't hold 
> copyright over the stuff I've written on the taxpayers time. So what do 
> I do?

From what authority do you derive the "I can't do that" part? Think
about that.

You say "because I don't hold copyright", but what does that mean?
Copyright would give you the ability to impose limits on the
recipients, (specifically with respect to activities such as copying,
creating derived works, public performance, etc.). You don't have any
right to impose such limits, but you also don't need any rights.

I would suggest that all of the parts that you have written by
annotated with appropriate statements indicating their public-domain
status.

The question is, can you combine these public-domain files with other
files that you obtained via the GPL? That's a question of creating a
derived work which is something that requires the copyright holder's
permission. And the copyright holder has given you that permission as
long as the derived work is made available under the terms of the GPL.

So, yes, you have permission to release the combined work under the
terms of the GPL. Recipients can then modify and redistribute the
combined work under the terms of the GPL. Recipients can _also_
extract any public-domain portions of the work and use those in any
way whatsoever, since they are public-domain.

> I could post all the code I wrote myself (released into the public 
> domain), then post instructions how to combine it with the GPL code, 
> compile it, and viola, you have your app, but that's not exactly making 
> things as accessible as I'd like.

Does such a person have an ability that you do not? Your only unique
position is that you cannot assert any copyright in the things you
created. Nor can your hypothetical third party doing the combining,
right? So I see no problem with you being the party doing the
combining.

> """
> Can the US Government release a program under the GNU GPL?
> 
> If the program is written by US federal government employees in the 
> course of their employment, it is in the public domain, which means it 
> is not copyrighted. Since the GNU GPL is based on copyright, such a 
> program cannot be released under the GNU GPL.
> """

That wasn't what you asked though. You asked if you could combine
original software written by the government with software available
under the GPL and release the combination. And that's exactly what the
FSF answers in the next question:

> Sure, contributing is no problem, it's the releasing of derived works 
> that has me concerned.

But what's the distinction there? Releasing a derived work is
certainly an action that requires the copyright holder's permission,
but you have that permission explicitly in the GPL.

There's never any relicensing. The parts that are public-domain are
still public-domain. The parts that are available only under the terms
of the GPL are still available only under the terms of the GPL. You
cannot relicense at all unless you are the copyright holder.

The only question is in the case of a combined work whether there is a
set of permissions that doesn't violate the terms of any of the
pieces. (This is the general "license compatibility" question.) And in
the case of GPL+public domain, the answer is yes, and the set of
permissions is the GPL.

I think one possible point of confusion is the wording of
"improvements" in the FSF GPL FAQ explaining that the government can
"release improvements to a GPL-covered program". This might be
interpreted as somehow implying that its only legitimate if the
improvements are somehow less significant than the GPL program.

A more clear answer might just say that the government, (or anyone
else for that matter), can legitimately combine GPL software with
public domain software and release the result under the GPL.

But you certainly don't need the FSF FAQ to give you that permission
explicitly. The GPL itself gives you all the permission you need.

So again, I'll go back to my original question, by what authority do
you see any problem? Would you be violating anybody's copyright by
releasing a program combining GPL components and government-written
public-domain compo

Re: [matplotlib-devel] Cairo backend prospects

2007-07-06 Thread Eric Firing

> There are two conspicuous bugs in the Cairo output:
> 
> 1) contour_demo.py: the image part of the figure is wrong in shape and 
> content.  It looks like an array dimensions confusion or something like 
> that.  Strangely, the very similar image in image_demo.py is fine.

I fixed this bug.  There is still a bug illustrated by 
examples/figimage_demo.py, however, that I did not mention before.  I 
don't plan to look for it, so I hope someone else does.

Eric

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel