Re: [matplotlib-devel] latex problem in example

2010-07-07 Thread Michael Droettboom
Sounds like something missing from your LaTeX install.  How did you 
install it?


Mike

On 07/06/2010 09:21 PM, Benjamin Root wrote:
I am working on converting examples in the mplot3d directory when I 
discovered that pathpatch3d_demo.py seems to fail while using LaTeX.  
I am getting an error "LaTeX Error: File `type1cm.sty' not found."  Is 
anyone else having this issue or is there something that needs to be 
setup properly first?


Thanks,
Ben Root


--
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
   



--
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA

--
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] HTML5 Matplotlib Backend

2010-07-07 Thread Michael Droettboom
On 07/06/2010 07:49 PM, Ondrej Certik wrote:
> On Mon, Jun 21, 2010 at 7:51 AM, william ratcliff
>   wrote:
>
>> I just tested it and it's very cool!  It works fairly quickly locally.  It
>> seems to work for Safari 5 and Chrome beta.  Firefox 3.6.3 is a no show.  I
>> haven't tried Opera.   What I'm really curious about is what is the latency
>> like over the actual internet, or under higher server loads (given the round
>> tripping).  For us, I'd have to try to get it to work for firefox (I think
>> as a cross platform browser, it's fairly common, especially on linux systems
>> like Fedora, it's what the user is most likely to have.).  Thanks for
>> sharing this!
>>
>> William
>>
>> On Mon, Jun 21, 2010 at 9:19 AM, Simon Ratcliffe
>> wrote:
>>  
>>> Hello,
>>>
>>> Our HTML5 based matplotlib backend is now available at:
>>>
>>> http://code.google.com/p/mplh5canvas/
>>>
>>> There are some basic installation instructions and included examples
>>> to get going. Keep in mind that the weakest link at this stage is
>>> browser support.
>>>
>>> We recommend Chrome for the most hassle free experience.
>>>
>>> This is very much a beta release and has not seen action outside of
>>> our internal testing, so we expect some teething troubles :)
>>>
>>> Please let us know what works for you, and what doesn't, and we will
>>> try and fix things as they come up.
>>>
> This looks very exciting. I don't know how to install chrome on my
> rhel5 without root access (I didn't find any binary and the source
> build fails due to some missing dependencies) and I have FF3.6.6, but
> I'll try to download some development binary of FF, so that it works.
>
I found a CentOS tarball of Chromium here:

http://code.google.com/p/chromium/wiki/LinuxChromiumPackages

Which seems to work just fine on RHEL5.  Just untar it and run 
"chrome-wrapper".  You may want to read through the chrome-wrapper 
script first: it seems to contain some hardcoded paths specific to the 
packager's machine, so it's not exactly high quality -- but it seems to 
work well with the HTML5 backend.

Mike

-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA


--
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] HTML5 Matplotlib Backend

2010-07-07 Thread Michael Droettboom
The matplotlib version check seems to fail with matplotlib 1.0.0.  Would 
you consider applying the attached patch?


Mike

On 06/21/2010 09:19 AM, Simon Ratcliffe wrote:

Hello,

Our HTML5 based matplotlib backend is now available at:

http://code.google.com/p/mplh5canvas/

There are some basic installation instructions and included examples
to get going. Keep in mind that the weakest link at this stage is
browser support.

We recommend Chrome for the most hassle free experience.

This is very much a beta release and has not seen action outside of
our internal testing, so we expect some teething troubles :)

Please let us know what works for you, and what doesn't, and we will
try and fix things as they come up.

Cheers,

Simon and Ludwig

--
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
   



--
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA

Index: setup.py
===
--- setup.py	(revision 7)
+++ setup.py	(working copy)
@@ -3,7 +3,7 @@
 from matplotlib import __version__
 import sys
 
-if not int(__version__.split(".")[1]) > 98:
+if tuple([int(x) for x in __version__.split(".")[:3]]) < (0, 99, 1):
print "The HTML 5 Canvas Backend requires matplotlib 0.99.1.1 or newer. Your version (%s) appears older than this. Unable to continue..." % __version__
sys.exit(0)
 
--
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] HTML5 Matplotlib Backend

2010-07-07 Thread Simon Ratcliffe
I have checked in your patch, thanks for the suggestion...

matplotlib 1.0.0 seemed such a distant dream a couple of months back,
which led to the simplistic version check :)

Cheers,

Simon

On Wed, Jul 7, 2010 at 3:36 PM, Michael Droettboom  wrote:
> The matplotlib version check seems to fail with matplotlib 1.0.0.  Would you
> consider applying the attached patch?
>
> Mike
>
> On 06/21/2010 09:19 AM, Simon Ratcliffe wrote:
>>
>> Hello,
>>
>> Our HTML5 based matplotlib backend is now available at:
>>
>> http://code.google.com/p/mplh5canvas/
>>
>> There are some basic installation instructions and included examples
>> to get going. Keep in mind that the weakest link at this stage is
>> browser support.
>>
>> We recommend Chrome for the most hassle free experience.
>>
>> This is very much a beta release and has not seen action outside of
>> our internal testing, so we expect some teething troubles :)
>>
>> Please let us know what works for you, and what doesn't, and we will
>> try and fix things as they come up.
>>
>> Cheers,
>>
>> Simon and Ludwig
>>
>>
>> --
>> 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
>>
>
>
> --
> Michael Droettboom
> Science Software Branch
> Space Telescope Science Institute
> Baltimore, Maryland, USA
>
>
> --
> 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
>
>

--
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] latex problem in example

2010-07-07 Thread Benjamin Root
I installed it from the package repositories for Ubuntu 10.04.  I will point
out that there were "issues" with the dependencies, but I believe that I
sorted them out (and filed a bug report about it on Launchpad).  I will
double-check my other latex documents to see if they still compile.

Thanks,
Ben Root

On Wed, Jul 7, 2010 at 8:47 AM, Michael Droettboom  wrote:

>  Sounds like something missing from your LaTeX install.  How did you
> install it?
>
> Mike
>
>
> On 07/06/2010 09:21 PM, Benjamin Root wrote:
>
> I am working on converting examples in the mplot3d directory when I
> discovered that pathpatch3d_demo.py seems to fail while using LaTeX.  I am
> getting an error "LaTeX Error: File `type1cm.sty' not found."  Is anyone
> else having this issue or is there something that needs to be setup properly
> first?
>
> Thanks,
> Ben Root
>
>
> --
> 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 
> [email protected]://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>
>
> --
> Michael Droettboom
> Science Software Branch
> Space Telescope Science Institute
> Baltimore, Maryland, USA
>
>
>
> --
> 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
>
>
--
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


[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] HTML5 Matplotlib Backend

2010-07-07 Thread Michael Droettboom
Finally had some time to play with this in detail.  First, it's very 
cool, and thanks for doing all this work.  I noticed a few things:


The path-clipping approach that simply removes negative-valued vertices 
doesn't always work, particularly if a line segment begins in the 
negative and ends up in the visible part of the plot, the entire line 
segment will disappear.  Instead, it would make more sense to make use 
of the clipping algorithm already in matplotlib (and implemented in fast 
C++) that will actually splice the line segments at the boundary.  I've 
attached a patch for this.


The display at the bottom that says "Cursor at: X, Y" is in pixels, not 
in data units.  It would be great if this could display data units, 
though being general enough to support custom scales (eg. log) and 
projections (eg. polar) may be tricky without making a round-trip to the 
server.


If I resize the plotting area (using either the "+" or "arrows" icon), 
the area where the mouse cursor can draw a zooming rectangle does not 
seem to be updated.


Minor point: I seem to get a traceback when "text.usetex" is True.

Thinking more broadly -- how difficult would it be to just use the 
plotting area part of the display, and not the plot selection and layout 
buttons along the top?  I think a really great use case of this backend 
would be to embed plots in a web page, and have an interactive plot 
inline in the document.  In that case, the extra layout features may be 
unnecessary.  Also, (and I'm getting a bit out of my depth here as I 
haven't done a lot of web development), how hard would it be to 
integrate this inside of a WSGI-based webapp, perhaps a Django app?  The 
standalone server this is nice for demos, but I can see this becoming 
very useful as part of a larger web application.


Mike

On 06/21/2010 09:19 AM, Simon Ratcliffe wrote:

Hello,

Our HTML5 based matplotlib backend is now available at:

http://code.google.com/p/mplh5canvas/

There are some basic installation instructions and included examples
to get going. Keep in mind that the weakest link at this stage is
browser support.

We recommend Chrome for the most hassle free experience.

This is very much a beta release and has not seen action outside of
our internal testing, so we expect some teething troubles :)

Please let us know what works for you, and what doesn't, and we will
try and fix things as they come up.

Cheers,

Simon and Ludwig

--
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
   



--
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA

Index: mplh5canvas/backend_h5canvas.py
===
--- mplh5canvas/backend_h5canvas.py (revision 7)
+++ mplh5canvas/backend_h5canvas.py (working copy)
@@ -247,9 +247,6 @@
 # This happens because HTML Canvas defines (0, 0) as the *top left* of a pixel instead of the center,
 # which causes all integer-valued coordinates to fall exactly between pixels
 points += 0.5
-# Ignore directives with negative coordinates (sanity check that gets rid of some drawing artifacts)
-if (points < 0).any():
-continue
 if code == Path.MOVETO:
 ctx.moveTo(points[0], points[1])
 current_point = (points[0], points[1])
@@ -298,7 +295,11 @@
 self._do_path_clip(ctx, clip)
 self._last_clip = clip
 if clip is None and clippath is None and (self._last_clip is not None or self._last_clip_path is not None): self._reset_clip()
-self._path_to_h5(ctx, path, transform, None, dashes=gc.get_dashes())
+if rgbFace is None and gc.get_hatch() is None:
+figure_clip = (0, 0, self.width, self.height)
+else:
+figure_clip = None
+self._path_to_h5(ctx, path, transform, figure_clip, dashes=gc.get_dashes())
 if rgbFace is not None:
 ctx.fill()
 ctx.fillStyle = '#00'
--
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] Adding more image format support...

2010-07-07 Thread Friedrich Romstedt
2010/7/6 Michael Droettboom :
> One solution to this may be to add an optional dependency on PIL, and if
> found save JPEG files (and maybe some of the other esoteric formats PIL
> supports).  The work done a couple of years back to manage the supported
> file types should make this pretty easy.

I wrote a backend for PIL, if there is interest, I can show the code.
But it's just so easy, and maybe I'm just interfering with the pyplot
internals, so fwiw.

Friedrich

--
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] Adding more image format support...

2010-07-07 Thread Michael Droettboom
Thanks for the offer.  In the meantime, I committed something myself for 
this.  (I should have written back to the list, sorry...)

I'd still be interested in seeing your patch in case there's something 
extra or better in it that mine doesn't do.

Mike

On 07/07/2010 02:43 PM, Friedrich Romstedt wrote:
> 2010/7/6 Michael Droettboom:
>
>> One solution to this may be to add an optional dependency on PIL, and if
>> found save JPEG files (and maybe some of the other esoteric formats PIL
>> supports).  The work done a couple of years back to manage the supported
>> file types should make this pretty easy.
>>  
> I wrote a backend for PIL, if there is interest, I can show the code.
> But it's just so easy, and maybe I'm just interfering with the pyplot
> internals, so fwiw.
>
> Friedrich
>


-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA


--
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] Adding more image format support...

2010-07-07 Thread Friedrich Romstedt
2010/7/7 Michael Droettboom :
> Thanks for the offer.  In the meantime, I committed something myself for
> this.  (I should have written back to the list, sorry...)
>
> I'd still be interested in seeing your patch in case there's something extra
> or better in it that mine doesn't do.

Ok, nice, here it is.  I'd be interested in your approach if it differs.

Friedrich


figure_canvas.py
Description: Binary data
--
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