[matplotlib-devel] axes.set_xlim has wrong keyword documentation

2010-05-28 Thread Jason Grout
I just noticed here:

http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.set_xlim

that the keywords that are documented for set_xlim are actually the 
keywords for set_ylim.  Surely this is just a copy-paste error.

Thanks,

Jason


--

___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] savefig options doc inconsistency

2010-06-09 Thread Jason Grout
In the "call signature" of savefig found here:

http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.savefig

it doesn't list the bbox_inches and pad_inches options, though they are 
listed in the list below the signature.

Thanks,

Jason


--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Solaris bugfix in ttconv/pprdrv_tt2.cpp

2010-06-10 Thread Jason Grout
In 
http://www.mail-archive.com/[email protected]/msg05423.html, 
I reported a patch that Sage uses for matplotlib on Solaris.  Notice 
below that only one line is changed.


---
ttconv/pprdrv_tt2.cpp: This patch is *only* applied when `uname` =
"SunOS".  The comment is: Copy patched version of pprdrv_tt2.cpp for
Solaris 10 that builds with gcc 4.3.2.


--- src/ttconv/pprdrv_tt2.cpp2009-08-01 12:15:15.0 -0700
+++ patches/pprdrv_tt2.cpp2009-08-08 23:33:24.0 -0700
@@ -104,7 +104,8 @@
 {/* have a log of points. */
 if(stack_depth == 0)
 {
-stream.put_char('{');
+//  Note the below is a hack to make it compile on Solaris
10 with gcc 4.3.2
+stream.puts("{");
 stack_depth=1;
 }


In 
http://www.mail-archive.com/[email protected]/msg05428.html, 
John said he'd look at it, but also asked for a platform macro for 
Solaris.  I'm not sure what was done about it since then.  I notice that 
the 0.99.3 release has the original code (i.e., no patch has been 
applied).  John (or anyone), if you have time, could you take a look at 
this?


I'm CCing Dave Kirkby, who is a person in the Sage community that has 
been working quite a bit on getting things to work on Solaris.  He might 
have an idea of a good C macro for detecting when we are on Solaris.


Thanks,

Jason

--
Jason Grout

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Solaris bugfix in ttconv/pprdrv_tt2.cpp

2010-06-10 Thread Jason Grout

On 6/10/10 7:01 AM, Jason Grout wrote:
In 
http://www.mail-archive.com/[email protected]/msg05423.html, 
I reported a patch that Sage uses for matplotlib on Solaris.  Notice 
below that only one line is changed.


---
ttconv/pprdrv_tt2.cpp: This patch is *only* applied when `uname` =
"SunOS".  The comment is: Copy patched version of pprdrv_tt2.cpp for
Solaris 10 that builds with gcc 4.3.2.


--- src/ttconv/pprdrv_tt2.cpp2009-08-01 12:15:15.0 -0700
+++ patches/pprdrv_tt2.cpp2009-08-08 23:33:24.0 -0700
@@ -104,7 +104,8 @@
  {/* have a log of points. */
  if(stack_depth == 0)
  {
-stream.put_char('{');
+//  Note the below is a hack to make it compile on Solaris
10 with gcc 4.3.2
+stream.puts("{");
  stack_depth=1;
  }
   

In 
http://www.mail-archive.com/[email protected]/msg05428.html, 
John said he'd look at it, but also asked for a platform macro for 
Solaris.  I'm not sure what was done about it since then.  I notice 
that the 0.99.3 release has the original code (i.e., no patch has been 
applied).  John (or anyone), if you have time, could you take a look 
at this?


I'm CCing Dave Kirkby, who is a person in the Sage community that has 
been working quite a bit on getting things to work on Solaris.  He 
might have an idea of a good C macro for detecting when we are on Solaris.


I see that 
http://www.mail-archive.com/[email protected]/msg04947.html 
is a related message which discusses compiling on Solaris and the 
put_char method.  In fact, I think the issue may be fixed from the 
discussion in that message, and our patch is unnecessary now.  I'm 
preparing a new matplotlib package for Sage without our patch above 
which we will test on Solaris.


Jason

--
Jason Grout

--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Plots shifted up or to the left a pixel or so

2010-06-10 Thread Jason Grout
Hi all,

If you zoom in to the origin in the following figure:

fig = plt.figure()
ax = fig.add_subplot(1,1,1, aspect='equal')
ax.plot([-1,1],[-1,1], color='blue')
ax.set_xlim(-1.1,1.1)
ax.set_ylim(-1.1,1.1)
ax.spines['left'].set_position('zero')
ax.spines['right'].set_color('none')
ax.spines['bottom'].set_position('zero')
ax.spines['top'].set_color('none')
ax.xaxis.set_ticks_position('bottom')
ax.yaxis.set_ticks_position('left')
fig.savefig('test.png',dpi=300)

you'll see that the blue line isn't quite centered at the origin (at 
least the origin marked by the spines).  It appears to hit just above or 
just to the left of the origin.  Notice that there is a bit of blue 
coloring in the second quadrant, but none in the fourth.  Notice also 
that there are more pixels colored just below the x-axis in quadrant 3 
than just above the axis in quadrant 1.

Several of us Sage developers have been practically pulling out our hair 
trying to trace down why our plots seem to be shifted up or to the left 
by a pixel or so.  I think the above example illustrates what is going on.

Any ideas as to what is going on?  I'm not sure if the problem is with 
the line or with the spines.  The lines ax.plot([-1,1],[0,0]) and 
ax.plot([0,0],[-1,1]) seem to be right on center with the spines.

Thanks,

Jason

--
Jason Grout


--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] build_windowing option

2010-06-11 Thread Jason Grout
I notice in setupext.py, a default is set for the setup.cfg 
build_windowing option, but it doesn't look like anything is ever 
actually read in from the configuration file to override the default.  
Also, the build_windowing option is not in the setup.cfg.template file.  
Is all of this intentional?

Thanks,

Jason

--
Jason Grout


--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] compiling on Solaris

2010-07-07 Thread Jason Grout
David Kirkby discovered that a recent SVN version of matplotlib did not 
compile when he was testing a new matplotlib for inclusion in Sage.  A 
bug was opened here:

https://sourceforge.net/tracker/?func=detail&aid=3022815&group_id=80706&atid=560720

It appears that a patch has been committed to 1.0.0 which tries to fix 
the issue.  However, David still reports that matplotlib 1.0.0 still 
doesn't compile on Solaris.  See:

http://trac.sagemath.org/sage_trac/ticket/9221?#comment:7

I'm not sure what the right procedure for reopening a ticket is.

Thanks,

Jason

--
Jason Grout


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] compiling on Solaris (and going against the python API)

2010-09-16 Thread Jason Grout
Apologies for the long message---I've really tried to be precise and 
complete.

On 7/7/10 10:23 AM, Jason Grout wrote:
> David Kirkby discovered that a recent SVN version of matplotlib did not
> compile when he was testing a new matplotlib for inclusion in Sage.  A
> bug was opened here:
>
> https://sourceforge.net/tracker/?func=detail&aid=3022815&group_id=80706&atid=560720
>
> It appears that a patch has been committed to 1.0.0 which tries to fix
> the issue.  However, David still reports that matplotlib 1.0.0 still
> doesn't compile on Solaris.  See:
>
> http://trac.sagemath.org/sage_trac/ticket/9221?#comment:7
>
> I'm not sure what the right procedure for reopening a ticket is.
>

I've had some time and access to a solaris box today to try to deal with 
this issue.  I think I've solved it, based on a hint from David Kirkby.


Again, the issue is that matplotlib 1.0.0 will not compile on the 
solaris box t2.sagemath.org (and on another Solaris box too).  David 
Kirkby provided the logs and specs for the systems at

http://trac.sagemath.org/sage_trac/ticket/9221#comment:7


The error is in compiling CXX:

==
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API 
-DPYCXX_ISO_CPP_LIB=1 
-I/scratch/grout/sage-4.5.3/local/lib/python2.6/site-packages/numpy/core/include
 
-I/scratch/grout/sage-4.5.3/local/include -I. 
-I/scratch/grout/sage-4.5.3/local/lib/python2.6/site-packages/numpy/core/include
 
-Isrc -Iagg24/include -I. 
-I/scratch/grout/sage-4.5.3/local/lib/python2.6/site-packages/numpy/core/include
 
-I/scratch/grout/sage-4.5.3/local/include/freetype2 
-I/scratch/grout/sage-4.5.3/local/include -I. 
-I/scratch/grout/sage-4.5.3/local/include/python2.6 -c 
src/backend_agg.cpp -o build/temp.solaris-2.10-sun4v-2.6/src/backend_agg.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for 
Ada/C/ObjC but not for C++
In file included from 
/scratch/grout/sage-4.5.3/local/include/python2.6/Python.h:8,
  from ./CXX/WrapPython.h:61,
  from ./CXX/Extensions.hxx:37,
  from src/ft2font.h:4,
  from src/backend_agg.cpp:10:
/scratch/grout/sage-4.5.3/local/include/python2.6/pyconfig.h:1013:1: 
warning: "_FILE_OFFSET_BITS" redefined
In file included from /usr/include/sys/types.h:18,
  from /scratch/grout/sage-4.5.3/local/include/zconf.h:364,
  from /scratch/grout/sage-4.5.3/local/include/zlib.h:34,
  from /scratch/grout/sage-4.5.3/local/include/png.h:470,
  from src/backend_agg.cpp:3:
/usr/local/gcc-4.4.1-sun-linker/bin/../lib/gcc/sparc-sun-solaris2.10/4.4.1/include-fixed/sys/feature_tests.h:197:1:
 
warning: this is the location of the previous definition
In file included from 
/scratch/grout/sage-4.5.3/local/include/python2.6/Python.h:42,
  from ./CXX/WrapPython.h:61,
  from ./CXX/Extensions.hxx:37,
  from src/ft2font.h:4,
  from src/backend_agg.cpp:10:
/usr/include/stdlib.h:144: error: declaration of C function 'void 
swab(const char*, char*, ssize_t)' conflicts with
/usr/include/unistd.h:496: error: previous declaration 'void swab(const 
void*, void*, ssize_t)' here
error: command 'gcc' failed with exit status 1

==

This was reportedly fixed in 1.0.0, but apparently the fix does not work 
for this Solaris box.

Based on a hint from David Kirkby, I changed the CXX/WrapPython.h file 
to be:

==
#ifndef __PyCXX_wrap_python_hxx__
#define __PyCXX_wrap_python_hxx__

// On some platforms we have to include time.h to get select defined
#if !defined(__WIN32__) && !defined(WIN32) && !defined(_WIN32) && 
!defined(_WIN64)
#include 
#endif

// pull in python definitions
#include 

#endif
==

(in other words, I just deleted all the defining and undefining of 
variables).  The resulting matplotlib compiled finally, and the result 
of the testing was:



==
In [1]: import matplotlib
In [2]: matplotlib.__version__
Out[2]: '1.0.0'

In [3]: matplotlib.test()
/scratch/grout/sage-4.5.3/local/lib/python2.6/site-packages/matplotlib/axes.py:2369:
 
UserWarning: Attempting to set identical left==right results
in singular transformations; automatically expanding.
left=730139.0, right=730139.0
   + 'left=%s, right=%s') % (left, right))
--
Ran 138 tests in 755.419s

OK (KNOWNFAIL=42)
Out[3]: True
=

Re: [matplotlib-devel] compiling on Solaris (and going against the python API)

2010-09-16 Thread Jason Grout
As a follow-up, I've implemented the patch for CXX and also patches for 
the other files which do not include Python.h first here:


http://github.com/jasongrout/matplotlib/commit/a961c299f5d589dae87e06caf54975eb657ebf3b

I've also attached the patch.

This patch gets rid of the warnings about redefining things on OSX 
10.6.4 (see my last message on this thread).


Thanks,

Jason

diff --git a/CXX/WrapPython.h b/CXX/WrapPython.h
index ef97cf1..f62d5b4 100644
--- a/CXX/WrapPython.h
+++ b/CXX/WrapPython.h
@@ -38,26 +38,12 @@
 #ifndef __PyCXX_wrap_python_hxx__
 #define __PyCXX_wrap_python_hxx__
 
+/* Python API mandates Python.h is included *first* */
+#include "Python.h"
+
 // On some platforms we have to include time.h to get select defined
 #if !defined(__WIN32__) && !defined(WIN32) && !defined(_WIN32) && 
!defined(_WIN64)
 #include 
 #endif
 
-// Prevent multiple conflicting definitions of swab from stdlib.h and unistd.h
-#if defined(__sun) || defined(sun)
-#if defined(_XPG4)
-#undef _XPG4
-#endif
-#if defined(_XPG3)
-#undef _XPG3
-#endif
-#endif
-
-// Python.h will redefine these and generate warning in the process
-#undef _XOPEN_SOURCE
-#undef _POSIX_C_SOURCE
-
-// pull in python definitions
-#include 
-
 #endif
diff --git a/src/_backend_agg.cpp b/src/_backend_agg.cpp
index 1bf4d97..90f065b 100644
--- a/src/_backend_agg.cpp
+++ b/src/_backend_agg.cpp
@@ -1,11 +1,9 @@
 /* A rewrite of _backend_agg using PyCXX to handle ref counting, etc..
  */
-#include 
 
-// To remove a gcc warning
-#ifdef _POSIX_C_SOURCE
-#undef _POSIX_C_SOURCE
-#endif
+/* Python API mandates Python.h is included *first* */
+#include "Python.h"
+#include 
 
 #include "ft2font.h"
 #include "_image.h"
diff --git a/src/_image.cpp b/src/_image.cpp
index b20373f..cd7650a 100644
--- a/src/_image.cpp
+++ b/src/_image.cpp
@@ -1,8 +1,4 @@
-// To remove a gcc warning
-#ifdef _POSIX_C_SOURCE
-#undef _POSIX_C_SOURCE
-#endif
-
+/* Python API mandates Python.h is included *first* */
 #include "Python.h"
 #include 
 
diff --git a/src/_png.cpp b/src/_png.cpp
index 0e71105..57c1862 100644
--- a/src/_png.cpp
+++ b/src/_png.cpp
@@ -1,9 +1,7 @@
-#include 
+/* Python API mandates Python.h is included *first* */
+#include "Python.h"
 
-// To remove a gcc warning
-#ifdef _POSIX_C_SOURCE
-#undef _POSIX_C_SOURCE
-#endif
+#include 
 
 // TODO: Un CXX-ify this module
 #include "CXX/Extensions.hxx"
--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] compiling on Solaris (and going against the python API)

2010-09-16 Thread Jason Grout
On 9/16/10 5:24 PM, Eric Firing wrote:
> On 09/16/2010 09:50 AM, Jason Grout wrote:
>> As a follow-up, I've implemented the patch for CXX and also patches for
>> the other files which do not include Python.h first here:
>>
>> http://github.com/jasongrout/matplotlib/commit/a961c299f5d589dae87e06caf54975eb657ebf3b
>>
>>
>> I've also attached the patch.
>>
>> This patch gets rid of the warnings about redefining things on OSX
>> 10.6.4 (see my last message on this thread).
>>
>> Thanks,
>>
>> Jason
>
> Jason,
>
> I tested your patch with Ubuntu 10.10, and it failed.  The problem is
> that something is including setjmp.h before libpng.h tries to do so via
> pngconf.h, resulting in an error as the compiler trips over the following:


What file caused the error (i.e., what file was compiling?)

Thanks,

Jason


--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] compiling on Solaris (and going against the python API)

2010-09-16 Thread Jason Grout
On 9/16/10 8:00 PM, Eric Firing wrote:

>>> I tested your patch with Ubuntu 10.10, and it failed. The problem is
>>> that something is including setjmp.h before libpng.h tries to do so via
>>> pngconf.h, resulting in an error as the compiler trips over the
>>> following:
>>
>
> Python.h includes pyfpe.h which includes setjmp.h.
>
> Eric
>

Ah, good catch.  So we just need to include Python.h first, and then set 
that extra #def so that libpng doesn't try to include it?

#include "Python.h"
#def PNG_SKIP_SETJMP_CHECK
#include 

or something like that?

Jason

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] compiling on Solaris (and going against the python API)

2010-09-16 Thread Jason Grout
On 9/16/10 9:03 PM, Jason Grout wrote:
> On 9/16/10 8:00 PM, Eric Firing wrote:
>
>>>> I tested your patch with Ubuntu 10.10, and it failed. The problem is
>>>> that something is including setjmp.h before libpng.h tries to do so via
>>>> pngconf.h, resulting in an error as the compiler trips over the
>>>> following:
>>>
>>
>> Python.h includes pyfpe.h which includes setjmp.h.
>>
>> Eric
>>
>
> Ah, good catch.  So we just need to include Python.h first, and then set
> that extra #def so that libpng doesn't try to include it?
>
> #include "Python.h"
> #def PNG_SKIP_SETJMP_CHECK
> #include
>

Let me try again:

In _backend_agg.cpp and _png.cpp, just add

#define PNG_SKIP_SETJMP_CHECK

right above

#include

Does that fix it?

Thanks,

Jason

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] compiling on Solaris (and going against the python API)

2010-09-16 Thread Jason Grout
On 9/16/10 10:00 PM, Eric Firing wrote:
> On 09/16/2010 04:12 PM, Jason Grout wrote:
>> On 9/16/10 9:03 PM, Jason Grout wrote:
>>> On 9/16/10 8:00 PM, Eric Firing wrote:
>>>
>>>>>> I tested your patch with Ubuntu 10.10, and it failed. The problem is
>>>>>> that something is including setjmp.h before libpng.h tries to do so via
>>>>>> pngconf.h, resulting in an error as the compiler trips over the
>>>>>> following:
>>>>>
>>>>
>>>> Python.h includes pyfpe.h which includes setjmp.h.
>>>>
>>>> Eric
>>>>
>>>
>>> Ah, good catch.  So we just need to include Python.h first, and then set
>>> that extra #def so that libpng doesn't try to include it?
>>>
>>> #include "Python.h"
>>> #def PNG_SKIP_SETJMP_CHECK
>>> #include
>>>
>>
>> Let me try again:
>>
>> In _backend_agg.cpp and _png.cpp, just add
>>
>> #define PNG_SKIP_SETJMP_CHECK
>>
>> right above
>>
>> #include
>>
>> Does that fix it?
>
> Sure does.  Your patch with that modification is committed to branch and
> trunk, 8706, 8707.  Thank you!
>

Did someone check on Windows?  I was hoping things wouldn't break in 
WrapPython.h when I switched the order of includes, but you never know...

Jason

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] compiling on Solaris (and going against the python API)

2010-09-16 Thread Jason Grout
On 9/16/10 10:15 PM, Jason Grout wrote:

>> Sure does.  Your patch with that modification is committed to branch and
>> trunk, 8706, 8707.  Thank you!
>>
>
> Did someone check on Windows?  I was hoping things wouldn't break in
> WrapPython.h when I switched the order of includes, but you never know...
>

Also, since you guys already have a relationship with upstream (CXX), 
could you report the bug and fix upstream?

Thanks,

Jason

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] compiling on Solaris (and going against the python API)

2010-09-16 Thread Jason Grout
On 9/16/10 11:16 PM, Eric Firing wrote:
> On 09/16/2010 05:15 PM, Jason Grout wrote:
>> On 9/16/10 10:00 PM, Eric Firing wrote:
>>> On 09/16/2010 04:12 PM, Jason Grout wrote:
>>>> On 9/16/10 9:03 PM, Jason Grout wrote:
>>>>> On 9/16/10 8:00 PM, Eric Firing wrote:
>>>>>
>>>>>>>> I tested your patch with Ubuntu 10.10, and it failed. The problem is
>>>>>>>> that something is including setjmp.h before libpng.h tries to do so via
>>>>>>>> pngconf.h, resulting in an error as the compiler trips over the
>>>>>>>> following:
>>>>>>>
>>>>>>
>>>>>> Python.h includes pyfpe.h which includes setjmp.h.
>>>>>>
>>>>>> Eric
>>>>>>
>>>>>
>>>>> Ah, good catch.  So we just need to include Python.h first, and then set
>>>>> that extra #def so that libpng doesn't try to include it?
>>>>>
>>>>> #include "Python.h"
>>>>> #def PNG_SKIP_SETJMP_CHECK
>>>>> #include
>>>>>
>>>>
>>>> Let me try again:
>>>>
>>>> In _backend_agg.cpp and _png.cpp, just add
>>>>
>>>> #define PNG_SKIP_SETJMP_CHECK
>>>>
>>>> right above
>>>>
>>>> #include
>>>>
>>>> Does that fix it?
>>>
>>> Sure does.  Your patch with that modification is committed to branch and
>>> trunk, 8706, 8707.  Thank you!
>>>
>>
>> Did someone check on Windows?  I was hoping things wouldn't break in
>> WrapPython.h when I switched the order of includes, but you never know...
>
> Jason,
>
> Big trouble, even without Windows.  First, after doing more reading, I
> am far from sure that skipping the check is OK.  Second, it doesn't work
> on earlier Linux versions, for which pngconf.h lacks that SKIP variable
> entirely.
>
> What a pain.  I see that Andrew Straw ran into this wall a couple years ago.
>
> Time to revert and re-think.  It may be that your patch is almost OK,
> but will need a tweak for Linux.


An equivalent, but very hackish, fix is to just undef _SETJMP_H.  That's 
almost as bad as the original undef, though.

Maybe putting this:

#ifdef __linux__
   #undef _SETJMP_H
#endif
#define PNG_SKIP_SETJMP_CHECK

right before including png.h would work, at least until distros 
(eventually) upgrade to a libpng past April 2009 (when the check was 
added) or until we stop supporting the old distros.

Thanks,

Jason

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] compiling on Solaris (and going against the python API)

2010-09-17 Thread Jason Grout
On 9/17/10 1:57 AM, Eric Firing wrote:
> On 09/16/2010 08:21 PM, Christoph Gohlke wrote:
>>
>>
>> On 9/16/2010 8:15 PM, Jason Grout wrote:
>>> On 9/16/10 10:00 PM, Eric Firing wrote:
>>>> On 09/16/2010 04:12 PM, Jason Grout wrote:
>>>>> On 9/16/10 9:03 PM, Jason Grout wrote:
>>>>>> On 9/16/10 8:00 PM, Eric Firing wrote:
>>>>>>
>>>>>>>>> I tested your patch with Ubuntu 10.10, and it failed. The problem is
>>>>>>>>> that something is including setjmp.h before libpng.h tries to do so 
>>>>>>>>> via
>>>>>>>>> pngconf.h, resulting in an error as the compiler trips over the
>>>>>>>>> following:
>>>>>>>>
>>>>>>>
>>>>>>> Python.h includes pyfpe.h which includes setjmp.h.
>>>>>>>
>>>>>>> Eric
>>>>>>>
>>>>>>
>>>>>> Ah, good catch.  So we just need to include Python.h first, and then set
>>>>>> that extra #def so that libpng doesn't try to include it?
>>>>>>
>>>>>> #include "Python.h"
>>>>>> #def PNG_SKIP_SETJMP_CHECK
>>>>>> #include
>>>>>>
>>>>>
>>>>> Let me try again:
>>>>>
>>>>> In _backend_agg.cpp and _png.cpp, just add
>>>>>
>>>>> #define PNG_SKIP_SETJMP_CHECK
>>>>>
>>>>> right above
>>>>>
>>>>> #include
>>>>>
>>>>> Does that fix it?
>>>>
>>>> Sure does.  Your patch with that modification is committed to branch and
>>>> trunk, 8706, 8707.  Thank you!
>>>>
>>>
>>> Did someone check on Windows?  I was hoping things wouldn't break in
>>> WrapPython.h when I switched the order of includes, but you never know...
>>>
>>> Jason
>>
>> Trunk and 1.0 branch build OK on Windows.
>
> Christoph,
>
> Once again, thanks very much for testing on Windows.
>
> I found a problem on linux (or rather, the buildbot found it because it
> is running an older version) so I have committed one more change to the
> branch.  If that survives the buildbot, I will propagate it to the
> trunk, but I don't consider it the last word; I am hoping that someone
> else can do a better job of cleaning this up.
>


I see the change that you made (keep the old order for linux, do the new 
thing for everything else).  This seems like a bad thing to do.  Looking 
at setjmp.h, it includes features.h.  features.h relies on the POSIX and 
XOPEN variables that are defined in Python.h to set up the environment, 
and the actions from setjmp.h depend on that environment.  I think the 
warning from the Python docs (if I read correctly) is that the 
environment must be set up according to the requirements, and Python.h 
sets up those requirements.  In other words, by undefining the POSIX and 
XOPEN variables, it seems you have a very real likelihood of including a 
different setjmp.h in the Python.h compared to the libpng (because the 
conditions set up by features.h may be different).

Again, I don't see a good way out of the mess.  And I guess in this 
imperfect world, I can't argue with what appears to work!  And as a big 
disclaimer; I knew almost nothing about all of this a couple of days ago.

Thanks,

Jason

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] compiling on Solaris (and going against the python API)

2010-09-17 Thread Jason Grout
  On 09/17/2010 03:04 AM, Eric Firing wrote:
> On 09/16/2010 09:27 PM, Jason Grout wrote:
>>
>>
>> I see the change that you made (keep the old order for linux, do the new
>> thing for everything else).  This seems like a bad thing to do.  Looking
>> at setjmp.h, it includes features.h.  features.h relies on the POSIX and
>> XOPEN variables that are defined in Python.h to set up the environment,
>> and the actions from setjmp.h depend on that environment.  I think the
>> warning from the Python docs (if I read correctly) is that the
>> environment must be set up according to the requirements, and Python.h
>> sets up those requirements.  In other words, by undefining the POSIX and
>> XOPEN variables, it seems you have a very real likelihood of including a
>> different setjmp.h in the Python.h compared to the libpng (because the
>> conditions set up by features.h may be different).
> Before making that change, I verified that at least on my linux system,
> Python.h defines those two variables the same way that features.h does,
> so the redefinition would be harmless if we did not undefine the
> variables. I don't think we are any worse off than before with respect
> to linux, and we should be better off with respect to other
> platforms--mpl on Solaris now compiles, right?.  But I am certainly
> still not comfortable with the whole setjmp mess.  I would love to see
> someone come up with a clean, clearly understandable solution, and
> resolve it once and for all.

Okay, I'm glad you checked on your box.  I agree that we wouldn't be any 
worse than before.  Hopefully everyone's feature.h defaults are the same 
as what Python assumes.  And hopefully Python hasn't changed those 
definitions over the supported releases.

However, wouldn't it be good to leave the redefinitions in, though?  
They are warnings (and they are not spurious), and that would remind us 
that we should investigate the situation in the future (maybe after we 
stop supporting old versions of libpng).  At least on your system, the 
redefinition would not change anything.  I would prefer a warning 
reminding me of an ugly situation that could really potentially be a 
problem, rather than a hack to disable the warning because it doesn't 
affect a particular system or two.

Thanks,

Jason


--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Streamlines

2010-10-04 Thread Jason Grout

 On 10/04/2010 09:38 AM, Benjamin Root wrote:
On Sat, Oct 2, 2010 at 1:16 PM, 01d > wrote:



Are developers of matplotlib planning to implement something like
this:
http://www.pyngl.ucar.edu/Examples/Images/ngl04p.2.png ?
Thanks.


That would be a nice feature to add.  Would you like to file a feature 
request on that?


http://sourceforge.net/tracker/?group_id=80706


I would also love to have streamlines implemented.

Note that there is a scikit that does similar things using line 
convolution integrals:


http://www.scipy.org/scipy/scikits/#vectorplot

(not streamlines, but it creates a texture which gives you the idea of 
where streamlines are).


Jason
--
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security 
easier or more difficult to achieve? Read this whitepaper to separate the 
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Streamlines

2010-10-04 Thread Jason Grout

 On 10/04/2010 09:38 AM, Benjamin Root wrote:
On Sat, Oct 2, 2010 at 1:16 PM, 01d > wrote:



Are developers of matplotlib planning to implement something like
this:
http://www.pyngl.ucar.edu/Examples/Images/ngl04p.2.png ?
Thanks.


That would be a nice feature to add.  Would you like to file a feature 
request on that?


http://sourceforge.net/tracker/?group_id=80706



Also, it seems like mathematica has a very nice streamline plot 
function, for comparison:


http://reference.wolfram.com/mathematica/ref/StreamPlot.html

Jason

--
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security 
easier or more difficult to achieve? Read this whitepaper to separate the 
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Release schedule for version 1.0.1?

2010-10-26 Thread Jason Grout
On 10/23/10 10:35 PM, [email protected] wrote:
> On 10/22/10 7:16 PM, Michael Droettboom wrote:
>> On 10/22/2010 05:45 PM, Russell E. Owen wrote:
>>> I'm curious when the next release of matplotlib is due.
>>>
>>> My application is suffering badly from the issue that an incorrect font
>>> cache will cause matplotlib to fail (the application mysteriously exits
>>> partway through startup until the user deletes the font cache).
>>>
>>> That problem is allegedly fixed on the trunk and I'm trying to decide
>>> how best to deal with it. Depending on the timing of 1.0.1 I can decide
>>> whether it's worth putting in my own workaround, bundling a prerelease
>>> version of matplotlib or just waiting for the official release.
>> I'm not sure what the timeframe is on 1.0.1.
>>
>> What problem with the cache are you referring to?  I'm aware of a
>> problem where if some fonts are moved or removed after the cache is
>> created matplotlib will crash (and this problem is fixed in the trunk),
>> but is that really a problem in everyday practice?  I'm just curious --
>> if there's another issue with the cache that I'm not aware of, I'd like
>> to fix it.
>> '
>
>
> We've been running into problems in Sage that seem to occur because font
> caches from 1.0.0 make old versions of matplotlib die.  I haven't seen
> the problem myself, but several Sage developers have put in quite a bit
> of time in diagnosing the problem.  In the end, I think they wrote a
> patch to do custom MPLCONFIGDIR for different versions of matplotlib in
> different versions of Sage.
>
> I'm CCing sage-devel, in case one of the sage devs that ran into
> problems wants to comment.
>

John Palmieri asked me to forward his response (below) about the 
problems Sage has been having with matplotlib and backward incompatibility:

Thanks,

Jason


==

The Sage developers have found two issues with MPLCONFIGDIR:

- First, when upgrading from version 0.99.3 to 1.0.0, the contents of
that directory seem to cause compatibility problems.  That is, once
you upgrade to a version of Sage using 1.0.0, it overwrites whatever
was in that directory, and then you get errors when using an older
version of Sage which still uses 0.99.3.  See
 for an
example of the sort of error which arises, and see
 for our fix: in Sage,
we set MPLCONFIGDIR to different directories based on the version of
matplotlib.

- Second, the following code in matplotlib/texmanager.py can cause a
race condition when creating MPLCONFIGDIR:

   if not os.path.exists(DIR):
   os.mkdir(DIR)

In particular, when running doctests for Sage, if MPLCONFIGDIR doesn't
exist, two different doctests can try to create it at the same time,
causing a problem.  (I've also heard people suggest that these sort of
race conditions can be security issues, but I don't know about the
validity of this.)  See
 for our fix: we
replace those lines by

   try:
   os.mkdir(DIR)
   except OSError, e:
   if e.errno == errno.EEXIST:
pass
   else:
raise

(and also add "import errno" at the beginning of the file).

I'd be happy to hear any comments you might have about these.

-- 
John Palmieri
[email protected]


--
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] git-svn matplotlib mirror

2011-01-22 Thread Jason Grout
On 1/22/11 10:26 AM, Darren Dale wrote:
> On Sat, Jan 22, 2011 at 9:09 AM, Friedrich Romstedt
>   wrote:
>> Hi,
>>
>> I want to set up a git mirror for matplotlib, but I 1) have some minor
>> problems and 2) want to know what others think about this.
>
> Late last year, I did some work to convert the svn repository to git.
> The code to d the conversion is available at
> https://github.com/darrendale/mpl2git . The resulting git repo is
> available at https://github.com/darrendale/matplotlib . I have not
> pursued the project further because there did not seem to be enough
> interest in migrating from svn/sourceforge to git/github to justify
> investing more of my time in the project.
>
>> I'm a native git user and I don't know how to use svn properly.
>
> I read that as "uninterested in learning how to use svn", and such
> sentiment is probably a fact of life as many (most?) open source
> projects move to DVC. In my opinion, matplotlib is likely to draw more
> contributors if it lowers barriers to entry and uses a DVCS that is
> growing in popularity, like git/github.


+1.  There have been several times I've wanted to fix something in the 
documentation, and would have via github if it had been available.  As 
it was, I sent an email to the list and someone else did it for me.  In 
my case, the fixes got in, but it took more time and effort for me and 
presumably also for the people making the fix (compared to just 
responding to a pull request, for example).  I do remember debating 
whether it was worth the trouble to report the typo when I realized I 
had to send an email describing exactly where the typo was.

Thanks,

Jason

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] matplotlib.cbook.iterable

2011-03-22 Thread Jason Grout
The function matplotlib.cbook.iterable has the documentation:

def iterable(obj):
 'return true if *obj* is iterable'
 try: len(obj)
 except: return False
 return True


However, in Sage, we have some objects that have __len__ defined, but 
are not iterable (i.e., they don't implement the iterator protocol). 
This is causing us problems when we try to plot some things that use 
this function, and matplotlib falsely assumes that the things are 
iterable.  After checking around online, it seems that it is safer to 
check for iterability by doing something like:

try: iter(obj)
except TypeError: return False
return True

or

import collections
return isinstance(obj, collections.Iterable) # only works for new-style 
classes

Or maybe even combining these would be better (though it might be really 
redundant and slow, after looking at the code in collections.Iterable...):

try: iter(obj)
except TypeError:
 import collections
 return isinstance(obj, collections.Iterable)
return True

You guys are the python experts, though.  What do you think?

Thanks,

Jason

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Website needs love

2011-05-10 Thread Jason Grout
On 5/10/11 9:43 AM, Ben Gamari wrote:
> The website is quite out of date. Not only does it claim that the latest
> release is 1.0.0, but the link to the github repository appears to be
> broken (has unneeded .git at the end of it).
>

Is the website itself in the git repository?  If so, I suppose someone 
could just fork it and make a pull request.

Jason

--
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] jsxgraph or flot backend (or interactive viewer for svg backend?)

2011-12-05 Thread Jason Grout
Dan Drake on the Sage mailing list pointed out that google now has the 
ability to plot graphs:

https://www.google.com/search?q=sin(x)%2C+cos(x)

A nice javascript thing is generated and has automatic tracing, zooming, 
and panning turned on.  Of course, those are things we'd all love in the 
Sage project for our matplotlib-based graphics :).

Has anyone ever worked on a backend that generates javascript code for 
one of the javascript plotters out there (like jsxgraph or flot)? 
Alternatively, I suppose we could generate an svg or html5 plot and then 
accompany it with the javascript code to trace the function, etc.  Has 
anyone experimented with writing a javascript "viewer" for graphics, 
having some of the same features that the standard graphics window that 
pops up under qt, wx, gtk, etc.?

I think this would be interesting to work on next summer if I have extra 
time.

Thanks,

Jason

--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] jsxgraph or flot backend (or interactive viewer for svg backend?)

2011-12-07 Thread Jason Grout
On 12/7/11 10:27 PM, Chris Barker wrote:
> On 12/5/11 9:49 PM, Jason Grout wrote:
>> Has anyone ever worked on a backend that generates javascript code for
>> one of the javascript plotters out there (like jsxgraph or flot)?
>> Alternatively, I suppose we could generate an svg or html5 plot and then
>> accompany it with the javascript code to trace the function, etc.
>
> Someone has worked on a html5 back-end, It was jsut discussed a bit on
> the thread "Using the Agg renderer by itself"
>
> Here's a cut and paste:
>
> On 11/27/11 12:33 PM, Ludwig Schwardt wrote:
>   >
>   >  Ben is referring to mplh5canvas, available at
>   >  http://code.google.com/p/mplh5canvas/. The main advantage of this
>   >  approach is interactive zooming of plots within the browser. If this is
>   >  not important to you, it will probably be faster to generate static PNGs
>   >  or SVGs.
>   >
>   >  The HTML5 backend should be easy to try out, as it is a pure Python
>   >  package with no onerous dependencies.
>   >

Michael Droettboom played with this a little at the Sage Days in March, 
IIRC, and I seem to think he also whipped up an interactive demo using 
svg plots.  Michael, do you remember what your conclusions were?

Thanks,

Jason



--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] jsxgraph or flot backend (or interactive viewer for svg backend?)

2011-12-15 Thread Jason Grout
On 12/15/11 8:03 PM, Michael Droettboom wrote:
> On 12/07/2011 11:36 PM, Jason Grout wrote:
>> On 12/7/11 10:27 PM, Chris Barker wrote:
>>> On 12/5/11 9:49 PM, Jason Grout wrote:
>>>> Has anyone ever worked on a backend that generates javascript code for
>>>> one of the javascript plotters out there (like jsxgraph or flot)?
>>>> Alternatively, I suppose we could generate an svg or html5 plot and then
>>>> accompany it with the javascript code to trace the function, etc.
>>> Someone has worked on a html5 back-end, It was jsut discussed a bit on
>>> the thread "Using the Agg renderer by itself"
>>>
>>> Here's a cut and paste:
>>>
>>> On 11/27/11 12:33 PM, Ludwig Schwardt wrote:
>>> >
>>> >Ben is referring to mplh5canvas, available at
>>> >http://code.google.com/p/mplh5canvas/. The main advantage of this
>>> >approach is interactive zooming of plots within the browser. If 
>>> this is
>>> >not important to you, it will probably be faster to generate 
>>> static PNGs
>>> >or SVGs.
>>> >
>>> >The HTML5 backend should be easy to try out, as it is a pure Python
>>> >package with no onerous dependencies.
>>> >
>> Michael Droettboom played with this a little at the Sage Days in March,
>> IIRC, and I seem to think he also whipped up an interactive demo using
>> svg plots.  Michael, do you remember what your conclusions were?
>>
> My conclusion was basically that the current crop of browsers are plenty
> fast and its generally feasible.  But rewriting all that Python code in
> Javascript ain't a small project ;)

So maybe pyjamas or pyjs might help?

http://pyjs.org/

http://stackoverflow.com/questions/683462/best-way-to-integrate-python-and-javascript
 
gives a few other python->javascript compilers.  I don't know if any are 
currently active, though.

I thought you also had some conclusion about using SVG instead of HTML5 
canvas...

Jason

--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] matplotlib and Google Summer of Code

2012-03-01 Thread Jason Grout
On 3/2/12 12:44 AM, Nicolas Rougier wrote:
>
>
> An OpenGL backend would be a nice project also. I've gathered some experience 
> with glumpy and I can help/mentor but I suspect I'm not familiar enough with 
> all the matplotlib internals to do this alone.
>

Similar to this, a webGL backend would be great (for example, you could 
use three.js, or you could use straight webGL/OpenGL).

(of course, there's also the html5 backend that is not quite finished, I 
believe...)

Work on the 3d graphics backend in general would be cool to see too, and 
could likely be added to a openGL project.

Jason




--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] matplotlib and Google Summer of Code

2012-03-02 Thread Jason Grout
On 3/2/12 3:31 AM, Nick Barnes wrote:

> My organization is looking for projects which contribute to our own
> goal (to promote the public understanding of climate science): in this
> context we're helping climate scientists adopt open source techniques
> and tools.  For matplotlib that means asking climate scientists for
> their ideas (which is where the colormap tool idea came from).
>
> For general-purpose matplotlib projects, I recommend that matplotlib
> apply to be a mentoring organization.  The application window closes
> on the 6th.

Sorry; I didn't mean to imply that *you* should take up these other 
projects.  I was replying to the other suggestion about openGL and 
augmenting it with related ideas, for someone else that might be 
interested in the subject of the thread "matplotlib and GSOC".

Jason

--
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] "Live Security Virtual Conference" ad

2012-05-25 Thread Jason Grout
I just noticed at the bottom of each message in a dozen or so that I 
checked from the last few days, I see an ad entitled "Live Security 
Virtual Conference".  I don't see these ads on messages in the 
sourceforge archive [1], but I do see them on the gmane mirror [2].  I 
also see the ad in a reply on the sourceforge archive [3].

I'm curious: Is this ad being put into outgoing messages by sourceforge, 
but not included in the archive (except when explicitly quoted in a 
reply)?  Or is there some other source for the ad?

Thanks,

Jason

[1] http://sourceforge.net/mailarchive/message.php?msg_id=29253604

[2] http://thread.gmane.org/gmane.comp.python.matplotlib.devel/11060

[3] http://sourceforge.net/mailarchive/message.php?msg_id=29253751

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] [IPython-dev] Interactive Matplotlib in the browser

2012-10-11 Thread Jason Grout
On 10/11/12 4:49 PM, Michael Droettboom wrote:
> I have a proof-of-concept way to make interactive plots in the browser
> work using transparent PNGs described here:
>
> http://mdboom.github.com/blog/2012/10/11/matplotlib-in-the-browser-its-coming/
>
> No PRs yet, because this is miles from ready for that, but it would be
> helpful to get some feedback about how this works in different
> browsers/platforms/network environments etc.
>

A sample implementation using websockets instead of polling is here:

https://gist.github.com/3875846

It still requests the file, which causes a delay.  I think doing a png 
diff sounds like a great idea.  What if we also transfer the png diff 
over the websocket connection (maybe in a binary frame)?

Thanks,

Jason


--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Experiments in removing/replacing PyCXX

2012-11-30 Thread Jason Grout
On 11/29/12 10:59 AM, Michael Droettboom wrote:
> I've not had
> much luck with Cython for this kind of thing in the past, but I know it
> is popular.

I'm curious about what problems you've run into and how long it was.  In 
the past, Cython hasn't supported C++ very well, but the situation has 
greatly improved recently.  See 
http://docs.cython.org/src/userguide/wrapping_CPlusPlus.html for some 
details.

Thanks,

Jason


--
Keep yourself connected to Go Parallel: 
TUNE You got it built. Now make it sing. Tune shows you how.
http://goparallel.sourceforge.net
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Experiments in removing/replacing PyCXX

2012-12-01 Thread Jason Grout
On 12/1/12 12:36 PM, Michael Droettboom wrote:
> I was really hoping by creating this experiment
> that a Cython expert would step up and show the way ;)

There are a lot more Cython experts on the Cython mailing list ;).

Thanks,

Jason


--
Keep yourself connected to Go Parallel: 
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Github Downloads going away...

2012-12-15 Thread Jason Grout
On 12/14/12 10:55 AM, Nathaniel Smith wrote:
> sourceforge's horror of an interface.

I'll second that.  Every time I go to Sourceforge, I have to figure out 
how in the world to download what I want (and I have to figure out which 
things *not* to click on too).

Thanks,

Jason


--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] my $0.02 on MEP13

2013-02-07 Thread Jason Grout
On 2/7/13 8:08 PM, Erik Bray wrote:
> A couple easier solutions: Allow
> the `.title` (and other such attributes) to be assigned to with a
> (value, options) tuple where the value is the title itself, and the
> options is a dictionary or tuple of supported options for the title.

Interesting.  Just brainstorming here...then

ax.title += (None, moreoptions)

could set more options (without changing the title text or already set 
options), or

ax.title -= (None, deleteoptions)

could reset just certain options to default values.

Thanks,

Jason


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] 1.3.0 final tagged and uploaded

2013-07-31 Thread Jason Grout
On 7/31/13 8:38 AM, Michael Droettboom wrote:
> I have tagged and uploaded matplotlib 1.3.0 final.  Congratulations to
> all involved!  It was a long slog getting this release out, and I
> appreciate everyone's patience.
>
> Once we have binaries uploaded to SourceForge, I will make a formal
> announcement in the usual channels.
>


The main matplotlib.org website's layout seems different.  What used to 
be in the sidebar now seems to be in the middle of the page, and the 
example images spill into the sidebar.  Is this a mistake or is it 
supposed to be that way?

Thanks,

Jason



--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] 1.3.0 final tagged and uploaded

2013-07-31 Thread Jason Grout
On 7/31/13 11:02 AM, Michael Droettboom wrote:

> The layout has changed, but sidebar has not.  Can you provide a
> screenshot?  Note, you can always visit the older version of the website
> at http://matplotlib.org/1.2.1 for direct comparison.


I just realized I had the webpage zoomed in (apple/control +), which was 
part of the problem.  It looks great when I unzoom the page.  Sorry for 
the false alarm.

I'm really excited about the webagg backend.  Thanks for all your work 
on this release!

Jason




--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] 1.3.0 final tagged and uploaded

2013-07-31 Thread Jason Grout
On 7/31/13 2:05 PM, Russell E. Owen wrote:
> As a result, binary installers now have to tell users to install
> these packages manually (as well as six and pyparsing).

I don't think six is mentioned in the "What's new" note for 1.3.0.  It 
just details that pyparsing, pytz, and dateutil are now dependencies. 
Can you add six to the notes as well, if it is also moving to 
"dependency" status?

Thanks,

Jason


--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] 1.3.0 final tagged and uploaded

2013-07-31 Thread Jason Grout
On 7/31/13 8:17 PM, Michael Droettboom wrote:
> On 07/31/2013 10:18 PM, Jason Grout wrote:
>> On 7/31/13 2:05 PM, Russell E. Owen wrote:
>>> As a result, binary installers now have to tell users to install
>>> these packages manually (as well as six and pyparsing).
>> I don't think six is mentioned in the "What's new" note for 1.3.0.  It
>> just details that pyparsing, pytz, and dateutil are now dependencies.
>> Can you add six to the notes as well, if it is also moving to
>> "dependency" status?
>>
> six is a dependency of dateutil.  I don't know if we should be in the
> business of listing all secondary dependencies -- when would we stop?
>

Given that six was distributed with matplotlib and is no longer being 
distributed (right?), I think it makes sense to list it.  I would stop 
at the software that never was part of matplotlib.

Thanks,

Jason


--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] 1.3.0 final tagged and uploaded

2013-08-02 Thread Jason Grout
On 7/31/13 8:38 AM, Michael Droettboom wrote:
> I have tagged and uploaded matplotlib 1.3.0 final.  Congratulations to
> all involved!  It was a long slog getting this release out, and I
> appreciate everyone's patience.
>
> Once we have binaries uploaded to SourceForge, I will make a formal
> announcement in the usual channels.
>

FYI, the downloads page at http://matplotlib.org/downloads.html still 
says that 1.3.0 is a release candidate and 1.2.1 is the latest stable 
version.

Again, thanks for all your work on this!

Jason


--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] 1.3.1rc1 tagged

2013-09-28 Thread Jason Grout
On 9/27/13 12:20 PM, Michael Droettboom wrote:
> - The WebAgg backend should no have lower latency over heterogeneous
> Internet connections.

Is that "should not"?

Thanks,

Jason


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] IPython Comm backend

2013-10-10 Thread Jason Grout
I've been working on a backend based on the webagg backend, but that 
uses the IPython Comm architecture at 
https://github.com/ipython/ipython/pull/4195 to send messages instead of 
starting a server and opening websocket connections.  I have an initial 
version in my github ipython-comm branch (see 
https://github.com/jasongrout/matplotlib/compare/ipython-comm).  I'm 
getting confused about how the backend infrastructure works, though, 
like what the purpose for the FigureManager class is, etc.  I'm running 
out of time to work on this now, and I'm hoping that someone will take 
what work I've done here and get it working properly with the matplotlib 
architecture.  If not, I'll probably tinker with this more later.

Thanks,

Jason

--
Jason Grout

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] IPython Comm backend

2013-10-16 Thread Jason Grout
On 10/16/13 1:58 PM, Michael Droettboom wrote:
> Sorry to take so long to get to this. This is a nice piece of work.
>
> The most obvious thing is that this is a copy-and-paste of the existing
> WebAgg backend -- and maintaining the two is going to be much harder
> than building both out of the same pieces.  As of 6389d14f, the WebAgg
> backend was refactored so that the transport that it uses to communicate
> to the browser is no longer hard coded.  This was done in large part to
> support working with IPyhton in this way.  (That is, it used to only
> communicate with the browser through Tornado, but now it can be anything
> that can send bits back and forth).  There's an example of this in
> `examples/user_interfaces/embedding_webagg.py` that shows how to do this
> (using Tornado, but again, it doesn't have to be). There's no guarantees
> that this interface is sufficient, so it may require some back and forth
> on this to make it all work.
>
> I think the first thing I would do would be to refactor this to use
> that.  It's a little hard to tell what you've changed from the original
> WebAgg backend to get it to support IPython.  If it were built on top
> of, rather than in addition to, WebAgg, that would be more obvious.

Thanks for the feedback.  I was thinking that a refactor to pull out the 
communication layer would be really nice.

I didn't change the WebAgg backend because I figured you wanted it 
around still.  I figured a plain old diff with the file would reveal 
changes.

Anyways, thanks for the pointer to the refactor commit.  I hope to look 
at this again sometime soon.

Jason


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] ggplot for matplotlib

2013-10-21 Thread Jason Grout
On 10/21/13 12:11 PM, Michael Droettboom wrote:
> Yes -- I reached out to the author about exactly that this morning.  It
> would be great to closely collaborate on this.
>

Awesome.  I saw this on HackerNews a few days ago and got really excited 
about it.  So a big +1 from me.

Thanks,

Jason



--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Hangout today

2013-11-14 Thread Jason Grout
On 11/14/13 9:23 AM, Michael Droettboom wrote:
> Sorry - I've been without network connection this morning, but it's back
> up...
>
> I'll be starting the matplotlib hangout shortly.  Let me know if you
> don't get an invite and would like to join.

I was just thinking about spending a bit of time on the matplotlib 
comm-based backend.  I'd like to join for at least a little bit: 
[email protected]

Thanks,

Jason



--
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] IPython Comm backend

2013-11-14 Thread Jason Grout
On 10/16/13 3:46 PM, Jason Grout wrote:
> On 10/16/13 1:58 PM, Michael Droettboom wrote:
>> Sorry to take so long to get to this. This is a nice piece of work.
>>
>> The most obvious thing is that this is a copy-and-paste of the existing
>> WebAgg backend -- and maintaining the two is going to be much harder
>> than building both out of the same pieces.  As of 6389d14f, the WebAgg
>> backend was refactored so that the transport that it uses to communicate
>> to the browser is no longer hard coded.  This was done in large part to
>> support working with IPyhton in this way.  (That is, it used to only
>> communicate with the browser through Tornado, but now it can be anything
>> that can send bits back and forth).  There's an example of this in
>> `examples/user_interfaces/embedding_webagg.py` that shows how to do this
>> (using Tornado, but again, it doesn't have to be). There's no guarantees
>> that this interface is sufficient, so it may require some back and forth
>> on this to make it all work.
>>
>> I think the first thing I would do would be to refactor this to use
>> that.  It's a little hard to tell what you've changed from the original
>> WebAgg backend to get it to support IPython.  If it were built on top
>> of, rather than in addition to, WebAgg, that would be more obvious.
>
> Thanks for the feedback.  I was thinking that a refactor to pull out the
> communication layer would be really nice.
>
> I didn't change the WebAgg backend because I figured you wanted it
> around still.  I figured a plain old diff with the file would reveal
> changes.
>
> Anyways, thanks for the pointer to the refactor commit.  I hope to look
> at this again sometime soon.
>

Following a very helpful conversation with Michael this morning in the 
dev hangout, I got this working with the current master (of matplotlib 
and ipython).  The refactoring made the code much better; thanks!

I updated the pull request at 
https://github.com/matplotlib/matplotlib/pull/2524

To test this, run IPython (master branch, to get the comm commits), and 
put this in a cell: 
https://github.com/matplotlib/matplotlib/pull/2524#issuecomment-28539813

Then you can execute something like:

from matplotlib.figure import Figure
import numpy as np
fig = Figure()
a = fig.add_subplot(111)
t = np.arange(0.0, 3.0, 0.01)
s = np.sin(2 * np.pi * t)
a.plot(t, s)
CommFigure(fig)

and get a live figure in the IPython notebook that uses the comm 
messaging infrastructure.

Michael---do you have time to take it from here?

Thanks,

Jason


--
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] IPython Comm backend

2013-11-15 Thread Jason Grout
On 11/14/13 7:24 PM, Jason Grout wrote:
> Following a very helpful conversation with Michael this morning in the
> dev hangout, I got this working with the current master (of matplotlib
> and ipython).

I also got this initial experimental demo working on the Sage cell server:

http://sagecell.sagemath.org/?q=ilpajg (for a sage plotting example)

http://sagecell.sagemath.org/?q=spadja (for one of the examples from the
matplotlib docs)

Thanks,

Jason


--
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Meeting...?

2014-01-14 Thread Jason Grout
On 1/14/14, 1:30 PM, Jacob Vanderplas wrote:
> Ugly hacks aside, I think all of this points to a general desire for a
> new type of backend-like hook that can export dynamic plot elements in
> data coordinates, and static plot elements in figure coordinates.  An
> enhancement in that direction could pave the way for a lot of
> interesting interactive front-ends to matplotlib figures.

A *very* big +1.  I'm really excited about doing IPython widgets these 
days, and this would make a matplotlib IPython widget pretty exciting.

Thanks,

Jason


--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel