Re: [matplotlib-devel] os x egg fubar?

2008-12-15 Thread Chris.Barker
John Hunter wrote:
> I think the src egg approach for os x is hopeless because too many
> people are having problems with architecture on png and zlib
> dependencies, and we don't have a lot of control over this because
> they are getting these dependencies from a variety of providers.

Maybe it's hopeless, but one solution is to try to standardize, in the 
MacPython community, on using William Kyngesburye's UnixImageIO and 
Freetype  Frameworks for the dependencies:

http://www.kyngchaos.com/wiki/doku.php?id=software:frameworks

They are Universal, Binary, and packaged as nice frameworks and also 
with traditional unix-style layouts for building against.

>  I
> think we need a binary installer, eg using bdist_mpkg, with the
> freetype, png and zlib dependencies built in, as we have on windows.

That's good route too, though it always feels a bit silly to have a 
different copy of libpng inside MPL, and PIL,and wxPython, and 

Why the heck Apple doesn't provide these really common libs is still 
beyond me!

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

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

chris.bar...@noaa.gov

--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Using the Agg renderer by itself

2011-11-23 Thread Chris.Barker
Hi Folks,

I've got some drawing to do (for a web app). I don't need all the MPL 
machinery, but I do need a high quality, fast, renderer.

Other options:

  - The python bindings to GD seem to not really being maintained

  - PyCairo is a pain to install, and not fast for Python (doesn't know 
about numpy arrays of points, for instance)

  - Kiva appears to be quite enmeshed with ETS, and thus a bit of trick 
to install (at least without EPD or PythonXY or something)


So I thought I'd give MPL's AGG wrappers a try. I've managed to get 
things working, but I do have a couple questions:

1) are there docs somewhere? What I've found is very sparse, and doc 
strings are minimal -- though I've got the source, so only so much or a 
complaint.

2) It looks like the AGG renderers take floats for almost everything -- 
makes sense, with anti-aliasing and sub-pixel rendering. But is it 
float32 or float64 internally? It seems either will work, but I'm going 
for maximum performance, so I'd like to use the native format.


Testing drawing a polygon, I'm a bit confused about GraphicsContext vs 
the renderer. If I do:

gc = GraphicsContextBase()
transform = Affine2D() # default unit transform

## draw the polygon:
## create a path for a polygon:
points = np.array(((10,10),(10,190),(150,100),(290,10),(10,10)),np.float64)

p = Path(points)

gc.set_linewidth(4)
gc.set_alpha(0.75)

fill_color = (0.0, 1.0, 0.0)
line_color = (1.0, 0.0, 0.0)

#gc._rgb = line_color
gc.set_foreground(line_color)

Canvas.draw_path(gc, p, transform, fill_color)

I get a green polygon with a red border, like I'd expect. However:

Why is the outline color set in the GraphicsContext, but the fill color 
passed in to the draw_path call? Or am I doing that wrong?


Thanks for input,

-Chris













-- 
Christopher Barker, Ph.D.
Oceanographer

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

chris.bar...@noaa.gov

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Using the Agg renderer by itself

2011-11-23 Thread Chris.Barker
On 11/23/11 9:52 AM, Chris.Barker wrote:
> I've got some drawing to do (for a web app). I don't need all the MPL
> machinery, but I do need a high quality, fast, renderer.

One more question. I see:

 def draw_markers(self, *kl, **kw):
 # for filtering to work with rastrization, methods needs to be 
wrapped.
 # maybe there is better way to do it.
 return self._renderer.draw_markers(*kl, **kw)

What do I pass in to this function?

Thanks,
   -Chris




> Other options:
>
>- The python bindings to GD seem to not really being maintained
>
>- PyCairo is a pain to install, and not fast for Python (doesn't know
> about numpy arrays of points, for instance)
>
>- Kiva appears to be quite enmeshed with ETS, and thus a bit of trick
> to install (at least without EPD or PythonXY or something)
>
>
> So I thought I'd give MPL's AGG wrappers a try. I've managed to get
> things working, but I do have a couple questions:
>
> 1) are there docs somewhere? What I've found is very sparse, and doc
> strings are minimal -- though I've got the source, so only so much or a
> complaint.
>
> 2) It looks like the AGG renderers take floats for almost everything --
> makes sense, with anti-aliasing and sub-pixel rendering. But is it
> float32 or float64 internally? It seems either will work, but I'm going
> for maximum performance, so I'd like to use the native format.
>
>
> Testing drawing a polygon, I'm a bit confused about GraphicsContext vs
> the renderer. If I do:
>
> gc = GraphicsContextBase()
> transform = Affine2D() # default unit transform
>
> ## draw the polygon:
> ## create a path for a polygon:
> points = np.array(((10,10),(10,190),(150,100),(290,10),(10,10)),np.float64)
>
> p = Path(points)
>
> gc.set_linewidth(4)
> gc.set_alpha(0.75)
>
> fill_color = (0.0, 1.0, 0.0)
> line_color = (1.0, 0.0, 0.0)
>
> #gc._rgb = line_color
> gc.set_foreground(line_color)
>
> Canvas.draw_path(gc, p, transform, fill_color)
>
> I get a green polygon with a red border, like I'd expect. However:
>
> Why is the outline color set in the GraphicsContext, but the fill color
> passed in to the draw_path call? Or am I doing that wrong?
>
>
> Thanks for input,
>
> -Chris
>
>
>
>
>
>
>
>
>
>
>
>
>


-- 
Christopher Barker, Ph.D.
Oceanographer

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

chris.bar...@noaa.gov

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Using the Agg renderer by itself

2011-11-23 Thread Chris.Barker
On 11/23/11 10:38 AM, Benjamin Root wrote:

> On Wednesday, November 23, 2011, Chris.Barker  <mailto:chris.bar...@noaa.gov>> wrote:
>  > Hi Folks,
>  >
>  > I've got some drawing to do (for a web app). I don't need all the MPL
>  > machinery, but I do need a high quality, fast, renderer.

> There is an HTML5 backend, supposedly.  Don't know how well documented
> it is, though.

Hmm -- coll idea -- I'll look into that at some point. However, as I 
don't need the MPL machinerey, but just the renderer, I'm not sure it 
would buy me much.

And I'm not sure I can:

a) count on html 5 on all browsers we need to support

or

b) get the drawing performance I want if I have to push all the data to 
the client to draw.

But something to keep an eye on, thanks.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

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

chris.bar...@noaa.gov

--
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel