On Thu, Jun 4, 2009 at 9:42 AM, William Stein <[email protected]> wrote:
>
> 2009/6/4 bill pines <[email protected]>:
>> I am wondering if matplotlib working on windows port of sage, examples?
>
> Yes.  Though I think we currently build it with no GUI backends, so
> you can create plots, but you can only render them to PNG's.  (You use
> savefig, I think.)   It would be nice for a windows guru to fix things

Unfortunately, this doesn't work, at least for me:

In [6]: pylab.savefig("C:\Users\Ondrej\Desktop\a.png")
---------------------------------------------------------------------------
IOError                                   Traceback (most recent call last)
[...]
C:\Program Files\Sage Math\local\python\lib\site-packages\matplotlib\backends\ba
ckend_agg.py in print_png(self, filename_or_obj, *args, **kwargs)
    326         renderer.dpi = self.figure.dpi
    327         if is_string_like(filename_or_obj):
--> 328             filename_or_obj = file(filename_or_obj, 'wb')
    329         _png.write_png(renderer._renderer.buffer_rgba(0, 0),
    330                        renderer.width, renderer.height,

IOError: [Errno 22] invalid mode ('wb') or filename: 'C:\\Users\\Ondrej\\Desktop
\x07.png'



but the path is correct as checked by:

In [15]: os.system("dir "+"C:\Users\Ondrej\Desktop")
 Volume in drive C has no label.
 Volume Serial Number is AC4D-7A9B

 Directory of C:\Users\Ondrej\Desktop

06/04/2009  09:47 AM    <DIR>          .
06/04/2009  09:47 AM    <DIR>          ..
06/03/2009  01:47 AM        72,169,316 sage-0.3.7.RC2.msi
06/04/2009  09:47 AM    <DIR>          sage-windows-0.3.7.RC2
06/04/2009  08:15 AM        67,843,793 sage-windows-0.3.7.RC2.zip
               2 File(s)    140,013,109 bytes
               3 Dir(s)  10,902,740,992 bytes free
Out[15]: 0


But python doesn't allow me to open any file in there in the write mode:

In [16]: open("C:\Users\Ondrej\Desktop\a.txt", "w")
---------------------------------------------------------------------------
IOError                                   Traceback (most recent call last)

C:\Program Files\Sage Math\<ipython console> in <module>()

IOError: [Errno 22] invalid mode ('w') or filename: 'C:\\Users\\Ondrej\\Desktop\
x07.txt'



Thus matplotlib also fails.


> so that a GUI backend works.  Presumably windows has a windowing
> library that works out of the box everywhere! :-).

Yeah, that'd be awesome.

>
> As far as I can tell, sympy, scipy, and numpy all work perfectly in
> sage-windows.
> Sympy gets you pretty far for symbolic computation.  If you try
>
> import sympy
> sympy.<tab key>
>
> you'll see it has a lot of symbolic manipulation capabilities.  It
> also has a plot command which does both 2d and 3d plots and works
> perfectly under windows.

That's right, nice. Unfortunately no one has worked on the pyglet
based plotting in sympy for almost 2 years already.

I still hope someone will show up and port it as a matplotlib backend. :)

Ondrej

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to