[Matplotlib-users] Scientific Software developer wanted in Seattle.

2011-03-11 Thread Christopher Barker
Scientific Software Developer
NOAA Emergency Response Division

Help us develop our next-generation oil spill transport model.

Background:
The Emergency Response Division (ERD) of NOAA's Office of Response and 
Restoration (ORR) provides scientific expertise to support the response 
to oil and chemical spills in the coastal environment. We played a major 
role in the recent Deepwater Horizon oil spill in the Gulf of Mexico. 
In order to fulfill our mission, we develop many of the software tools 
and models required to support a response to hazardous material spills. 
  In the wake of the Deepwater horizon incident, we are embarking on a 
program to develop our next-generation oil spill transport model, taking 
into account lessons learned from years of response and this major incident.

General Characteristics:
The incumbent of this position will provide software development 
services to support the mission of the Emergency Response Division of 
NOAA's Office of Response and Restoration. As part of his/her efforts, 
independent evaluation and application of development techniques, 
algorithms, software architecture, and programming patterns will be 
required.  The incumbent will work with the staff of ERD to provide 
analysis on user needs and software, GUI, and library design. He/she 
will be expect to work primarily on site at NOAA's facility in Seattle.

Knowledge:
The incumbent must be able to apply modern concepts of software 
engineering and design to the development of computational code, desktop 
applications, web applications, and libraries. The incumbent will need 
to be able to design, write, refactor, and implement code for a complex 
desktop and/or web application and computational library.  The incumbent 
will work with a multi-disciplinary team including scientists, users, 
and other developers, utilizing software development practices such as 
usability design, version control, bug and issue tracking, and unit 
testing.  Good communication skills and the knowledge of working as part 
of a team are required.

Direction received:
The incumbent will participate on various research and development 
teams.  While endpoints will be identified through Division management 
and some direct supervision will be provided, the incumbent will be 
responsible for progressively being able to take input from team 
meetings and design objectives and propose strategies for reaching 
endpoints.

Typical duties and responsibilities:
The incumbent will work with the oil and chemical spill modeling team to 
improve and develop new tools and models used in fate and transport 
forecasting.  Different components of the project will be written in 
C++, Python, and Javascript.

Education requirement, minimum:
Bachelor's degree in a technical discipline.

Experience requirement, minimum:
One to five years experience in development of complex software systems 
in one or more full-featured programming languages (C, C++, Java, 
Python, Ruby,  Fortran, etc.)

The team requires experience in the following languages/disciplines. 
Each incumbent will need experience in some subset:

  * Computational/Scientific programming
  * Numerical Analysis/Methods
  * Parallel processing
  * Desktop GUI
  * Web services
  * Web clients: HTML/CSS/Javascript
  * Python
  * wxPython
  * OpenGL
  * C/C++
  * Python--C/C++ integration
  * Software development team leadership


While the incumbent will work on-site at NOAA, directly with the NOAA 
team, this is a contract position with General Dynamics Information 
Technology:

http://www.gdit.com/default.aspx

For more information and to apply, use the GDIT web site:
https://secure.resumeware.net/gdns_rw/gdns_web/job_detail.cfm?key=59436show_cart=0referredId=20

if that long url doesn't work, try:

http://www.resumeware.net/gdns_rw/gdns_web/job_search.cfm

and search for job ID: 179178


NOTE: This is a potion being hired by GDIT to work with NOAA, so any 
questions about salary, benefits, etc, etc should go to GDIT. However, 
feel free to send me questions about our organization, working 
conditions, more detail about the nature of the projects etc.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] edit EPS

2010-12-28 Thread Christopher Barker
On 12/28/10 4:14 PM, crwe crwe wrote:
 I need your help! I have an image, saved in .eps (vector) format.

 Now the image is just a couple of plots with a legend, saved in colour, but 
 without special tick marks to differentiate the plots. What I need to do now 
 is *add the tick marks*. A diamond to one plot, a little cross for another 
 etc. The original data that produced the plots is gone, I only have the .eps 
 to work with.

darn!

 I tried editing the image with PIL, but as soon as I load the image it 
 becomes rasterized (=a small matrix of pixels, unusably ugly).

right, PIL is a raster tool. There is some hope that you could have PIL 
rasterize it with much higher resolution for better quality, but it's 
really not what you are looking for.

 Is there any way to edit the EPS in matplotlib?

no -- that is not at all what MPL is about.

 Or maybe some other, easier way to add the plot marks ex post? I am no expert 
 on vector graphic formats.

I'd use a vector graphics program. EPS is almost the same as Adobe 
Illustrator's format, for instance.

InkScape is a really nice cross platform open source vector graphics 
tool. It's native format is SVG. I'll bet you could find a way to 
convert the EPS to svg, or, if you're lucky, InkScape can read EPS.

The nice thing about SVG is that being XML, you may be able to 
manipulate it directly with a python script or something, if you have 
many similar plots to do, so you don't have to point and click on each one.

Inkscape can be used as a command line SVG renderer, too.

Good luck!

-Chris

-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Taylor diagram (mdekauwe)

2010-12-10 Thread Christopher Barker
On 12/10/10 10:00 AM, Virgil Stokes wrote:
 Thanks for this link. I tried to use this code but could not load Numeric; 
 i.e.
 import Numeric fails.
 Where does one get the necessary modules to execute this code?

Numeric is quite outdated now. You can probably find it somewhere, but 
it won't be compatible with new mpl, scipy, etc.

Try replacing the calls to Numeric with numpy. You'll probably need 
to tweak a few other things, too, but it shouldn't be too much.

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Simple animation with Qt4 backend

2010-11-22 Thread Christopher Barker
On 11/21/10 9:43 AM, Gael Varoquaux wrote:

 Yes, I can confirm that adding processEvents in places to facilitate
 redraws is a good way to lead to segfaults. I have seen this in many
 places other than matplotlib. The reason Tk does not have this problem is
 that it deals with event loops in a fundementally different way that Wx
 or Qt.

wx has Yield() which sounds a lot like QT's processEvents. But it also 
has SafeYield() which can (in theory, anyway) be called safetly within 
an event handler.

Does QT have anything similar?

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] recipes in the docs

2010-11-04 Thread Christopher Barker
On 11/4/10 2:29 PM, John Hunter wrote:
 I added a new section of the docs users/recipes.rst.  This is meant to
 be a cookbook style place to place short tutorials, annotated
 examples, idioms and snippets.

http://matplotlib.sourceforge.net/users/recipes.html

Nice!

Once you get past twenty or so of these, it would be nice to have them 
categorized -- is that possible with the current system?

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Best way to use Excel Data

2010-10-15 Thread Christopher Barker
On 10/14/10 9:52 PM, Alessio Civ wrote:
 Let' put things this way: if you have to work with many records, it is
 better if you have a database.

pyTables is worth a look, too

http://www.pytables.org/moin

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] New Mac binary installer for Python 2.6; do we bother with Python 2.5?

2010-10-06 Thread Christopher Barker
Russell E. Owen wrote:
 For now it is available here:
 http://www.astro.washington.edu/users/rowen/python/
 though I hope it will end up on the official site at some point.
 
 I have not tested the wx back end and would be grateful if somebody had 
 time to do so.

It seems to work for me on OS-X 10.5(PPC), Python.org2.6, wxPython2.8.10

 I propose not having a matplotlib binary installer for Python 2.5 and 
 getting a pair for Python 2.7 32-bit (10.3.9 and later) and 64-bit (10.5 
 and later).
 
 What do others think?

I think that's fine -- look to the future -- 2.6 is now getting pretty 
old, and there is 2.7 and 3.1 to work with.

Thanks for all your work on this.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] ImportError: No module named _path

2010-09-23 Thread Christopher Barker
Justin Park wrote:
 Hello,
 
 I am using Mac 10.5.8.
 
 I have been trying to install Matplotlib, and succeeded to do so.

How did you install it?

What python are you using?

-Chris


 But when I try to import matplotlib.pyplot, I got the following error:
 
 import matplotlib.pyplot
 Traceback (most recent call last):
   File stdin, line 1, in module
   File
 /Users/hp6/RESEARCH/TOOL/pythons/matplotlib/lib/matplotlib/pyplot.py,
 line 23, in module
 from matplotlib.figure import Figure, figaspect
   File
 /Users/hp6/RESEARCH/TOOL/pythons/matplotlib/lib/matplotlib/figure.py,
 line 16, in module
 import artist
   File
 /Users/hp6/RESEARCH/TOOL/pythons/matplotlib/lib/matplotlib/artist.py,
 line 6, in module
 from transforms import Bbox, IdentityTransform, TransformedBbox,
 TransformedPath
   File
 /Users/hp6/RESEARCH/TOOL/pythons/matplotlib/lib/matplotlib/transforms.py,
 line 34, in module
 from matplotlib._path import affine_transform
 ImportError: No module named _path
 
 Could you please let me know how I can fix this problem?
 I tried several ways of reinstalling it(after cleaning as described in
 many web-sites), but all the ways returned the same error.
 
 Thanks,
 Justin.
 
 --
 Nokia and ATT 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-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Nokia and ATT 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-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] another incorrectly clipped PNG in the gallery

2010-09-22 Thread Christopher Barker
Benjamin Root wrote:
 On Wed, Sep 22, 2010 at 12:04 PM, Russell E. Owen ro...@uw.edu 
  I'd be much happier with a

 Ditto on this.  In addition, it would be useful to prevent axes labels 
 from spilling over into another axes' area.

Someone was working on a wxSizer-like layout tool for MPL -- anyone know 
what happened to that?

Also -- do all MPL artists (text, etc) know enough about how big they 
are to do this at all? I recall trying to do a bit myself, and had a 
hard time finding out how big a label was, and thus didn't know where to 
put an axis so the label wouldn't be chopped off.

-Chris







-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
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-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] py2exe and matplotlib - Fonts: do I need them all?

2010-09-16 Thread Christopher Barker
Carlos Grohmann wrote:
 One thing that is still bothering me is the mpl_data directory that
 holds about 3.5 Mb of fonts.

yup - that's a lot.

 Is it OK to remove the fonts I don't use? (I use only sans-serif) By
 Ok I mean not only from the practical poin tof view (that is, will the
 app run?)

yes, it will, as long as no extra fonts get introduced at run time that 
you didn't test for.

 but also from the _legal_ point of view (am I obliged to
 distribute all those fonts?)

I can't see why. Strip away. That's what I've done.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
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-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] remove matplotlib an OS X

2010-09-01 Thread Christopher Barker
vbkhp wrote:
 Hi,
 
 Could anyone tell me how can I remove matplotlib completely on Mac? 

 I  was on version 0.99 and I wanted to upgrade to version 1.0 so i removed
 the matplotlib directory and the egg file (besides the pylab.py,
 pylab.pyo, and pylab.pyc files),

That should have done it -- except perhaps for your matplotlibrc 
file(s), but you may want to keep that anyway.

 and installed the new version using
 .dmg file matplotlib-1.0.0-python.org-py2.6-macosx10.4. Now, I can
 import and work with pylab when I call it from the terminal, but I can
 not import it other places like IDLE. I get the following error.

If it's different from IDLE than the command line, that indicates that 
you may be running two different versions of Python. You have at least 
two -- the one that Apple supplied and the python.org one.

 Process: Python [922]
 Path:
 /Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python

This is the python.org one -- which is where that dmg file should have 
put the new matplotlib. So which are you running when you use the 
command line?

one way to tell is with by checking the __file__ attribute on an 
arbitrary module:

In [10]: import numpy

In [11]: numpy.__file__
Out[11]: 
'/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/__init__.pyc'

So mine is the python.org one -- the Apple one is in /System/

Once you've got that cleared up, at least you can know where your 
problem is -- sorry I can't help you with that crash report.

One more thought -- IDLE uses TK, ans so does (optionally) MPL -- 
perhaps there is a version conflict there? (I'm not a IDLE or Tk user, 
so I don't know if that's likely). You might try testing other back ends:

import matplotlib
matplotlib.use('agg')

for instance.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] CMYK images

2010-08-26 Thread Christopher Barker
Fernando Perez wrote:
 http://www.littlecms.com/

PIL optionally uses littlecms -- so it may have what you need built in.

-Chris

NOTE: I haven't read the rest of this thread, to sorry if this is 
redundant information.



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Embedding matplotlib in wxPython embedded in wxGTK

2010-08-19 Thread Christopher Barker
Nicholas Kinar wrote:
 I've been following the sample code given in the wxPython distribution 
 to embed a wxPython window in wxGTK. 

As in embedding some wxPython in a C++ wxGTK program?

  What I would like to do is embed 
 matplotlib within a wxPanel of this wxPython script.

once you've got wxPython working, using MPL should be exactly t he same 
as with a pure wxPyton app -- take a look at the embedded_in_wx 
examples, and/or use wxMPL -- it provides a nice interactive MPL window 
out of the box:

http://agni.phys.iit.edu/~kmcivor/wxmpl/

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Embedding matplotlib in wxPython embedded in wxGTK

2010-08-19 Thread Christopher Barker
Nicholas Kinar wrote:
 Chris, thank you very much for your response, and for the link.  I've 
 taken a look at the wxMPL library and it looks extremely useful and 
 interesting.  But how would I work with the class MyPanel(wx.Panel), and 
 embed wxMPL directly into MyPanel?  Could you give an extremely simple 
 example (i.e. 2D plot of a sine wave)?

sorry -- very short on time -- look at the wxMPL examples, understand 
them with pure Python, and they it should be straightforward to transfer 
to your situation.

Note that you can put a wx.Panel in a wx.Panel, which is what you may 
want to do it your case.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] how to save pseudo-colorized images as 8-bit PNG files

2010-07-23 Thread Christopher Barker
j vickroy wrote:
 Thanks much for this information and also for taking the additional time 
 to try the optipng tool.  It is very helpful.
 
 Since the above mentioned PNG generation is one step in a near 
 real-time products generation system, I was hoping to avoid the addition 
 of another component (i.e., PNG compression) in the stream, but it 
 appears unavoidable.

yes, but you can build it into your python script. I'm sorry I don't 
have time to write a sample for you, but:

You can get the RGBA buffer from MPL
You can convert that to a PIL RGBA image.
You can use PIL's quantize method to make a palletted image.
You can save that palleted image as a PNG.

I think that will all run pretty fast.


By the way, I'm pretty sure there are a few functions in MPL already 
that use PIL if it is installed -- so if you get this working, it may be 
worth adding to MPL -- or maybe not, it's pretty specialized.

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
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-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] how to save pseudo-colorized images as 8-bit PNG files

2010-07-22 Thread Christopher Barker
Jim Vickroy wrote:
 The attachment is a simple script that creates a 2D array of unsigned, 
 8-bit integers and uses matplotlib to save it as a PNG file.
 
 Unfortunately, the PNG file is much larger than expected -- apparently 
 because it is True-Color; on my MS Windows machine, bit depth, for the 
 file, is listed as 32 rather than the expected 8.

 Can matplotlib  be used to accomplish this?  If so, could someone direct 
 me to where this is discussed?

I don't think so directly. MPL uses a 32 bit image buffer internally, 
and that's what gets saved out in the PNG.

You can post-process the image with something like ImageMagick.

Another alternative is to use PIL -- you can grab the matplotlib buffer, 
make a PIL image out of it, and use PIL to convert to an 8-bit palleted 
image.

For that matter, you could probably bypass MPL, and use numpy to create 
the 8-bit image you want, and PIL to save it as a PNG.

-Chris





-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
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-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplotlib Mac binary that works with python.org python and older MacOS X?

2010-07-01 Thread Christopher Barker
Russell E. Owen wrote:
 I made binaries (on Mac OS X 10.5) using my instructions:
 http://www.astro.washington.edu/users/rowen/BuildingMatplotlibForMac.htm
 l
 
 They are available from here, for now:
 http://www.astro.washington.edu/users/rowen/python/
 
 please test them.

Thanks Russell, this looks great -- it seems to be working on my OS-X 
10.5 PPC box.

 If they work then I hope the matplotlib folks will 
 consider serving them as official for 3rd-party Python binaries
 (as opposed to the current ones they are serving, which are for Apple's 
 Python).

+1 -- these really should be the official ones (nothing wring with 
serving up the 10.6 ones too, if they are well labeled)

-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
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-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplotlib Mac binary that works with python.org python and older MacOS X?

2010-07-01 Thread Christopher Barker
Russell E. Owen wrote:
 However, at present I don't know if there is a Python 2.6 that is both 
 compatible with older versions of Mac OS X and is built with 64-bit 
 support.

FWIW, I think the official 2.7 builds will be Intel32+Intel64+PPC32

I don't know if Ronald is going to back=port any of that for 2.6, but I 
kind of doubt it.

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
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-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Mac OS X 10.6 dmg install

2010-06-25 Thread Christopher Barker
Tim Gray wrote:
 The 0.99.1.1 installer places 
 files in the appropriate location for python.org 2.6.5.  The 0.99.3 
 installer places files in the appropriate location for the OS X bundled 
 version of python (2.6.1) that we have been warned not to use.

Well, it's not the worst thing in the world to use Apple's python, but I 
still don't think that it's the best either:
   - The Apple python has never been updated
   - Anything built for it will only work on 10.6
   - you can't use py2app and get a fully self-contained binary
   - I can't remember the others.

Anyway, it's been common practice to build binaries for the python.org 
python -- it's the way to reach the widest audience. MPL used to do 
this. I suspect the latest binary is a mistake, but if not, it should be 
Clearly labeled as for the ApplePython2.6-osx-10.6, and ideally, a 
python.org compatible binary provided as well. I'm sorry I can't find 
the time to do that myself right now.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
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-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Installation for MAC OS 10.5

2010-06-19 Thread Christopher Barker
R. Padraic Springuel wrote:
 Has anyone created installation package for matplotlib 0.99.3 that is 
 compatible with MAC OS 10.5 and Python 2.6? 

Which 2.6?

 One one on the download 
 site for MAC OS 10.6 doesn't work on my system (presumably because I'm 
 still working with Leopard because everything else is up to date).

I think that needs the 2.6 from Python.org -- I'd try that if it's not 
what you're using already -- if you are, then what errors, etc do you get?

-CHB


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
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-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Mac backend problems for nearly all backends.

2010-05-26 Thread Christopher Barker
Daniel Welling wrote:
 A quick update on Mac backends:

 While I don't want to drag this thread on forever, I feel like some of 
 this info is useful for the Mac/MPL community.  I would love to hear 
 from anyone else who has the OSX backend problem; it seems to be 
 isolated to Fink. 

I'm still a bit confused -- are you having MPL problems or GUI toolkit 
problems? i.e. do wx, gtk, qt, etc work just fine for non-MPL 
applications. If so then there is an MPL issue which it would be nice to 
resolve. If not, then you have GUI toolkit issues, which should be 
addressed by the fink and/or GUI toolkit developers.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--

___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Mac backend problems for nearly all backends.

2010-05-25 Thread Christopher Barker
Jonathan Stickel wrote:
 I've experienced many of the same problems on Mac OS X 10.6.3 (Snow 
 Leopard).  I have python/scipy/numpy/matplotlib/ipython all installed 
 via Macports.

Just to be clear -- this sounds like a MacPorts problem, not necessarily 
an OS-X problem.


  I finally have the WXagg backend 
 working, but that required installed WXPython with the gtk/X11 backend.

Does MacPorts not allow a native wx? Maybe becasue you're running 64 bit?

Anyway, I guess that's why I don't use macports for python.


 In any case, I have been having royal problems with GUI backends and
 matplotlib.
 Some background on where I've been having these problems:
 Machine 1: OSX 10.5.8 G5 PPC

That's what I've been running, and I've had no real issues (Haven't 
tried the OS-X back-end) -- but I'm using the python.org python.

 Machine 2: OSX 10.5.7 Macbook pro/Intel
 Code versions: python 2.5.4, Numpy 1.3.0, Scipy 0.7.0 (all obtained through
 fink.)

OK -- then a fink issue, rather than a Macports one -- same idea, though.

My impression is that neither fink nor macports do well with Mac GUI 
stuff -- unless you're talking X11.


-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--

___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [matplotlib-devel] basemap domain changes on pyplot call

2010-05-24 Thread Christopher Barker
Benjamin Root wrote:
 On Fri, May 21, 2010 at 5:16 PM, Jeff Whitaker jsw...@fastmail.fm 
 Ben:  That's why you should use the basemap methods where possible
 (they handle these things for you).
 
 
 Yeah, that wasn't possible in my case.  In addition, not all pyplot 
 plotting functions are available (nor do I expect Basemap to have all of 
 them available).

Though it would be nice to add more as we need them. I assume Jeff will 
take contributions.

I need to be able to draw a filled polygon from coordinates in memory, 
for instance, but didn't see a way to do this directly. If I get a 
chance, I will look into .drawshapefile(), and figure I can see how to 
do it from there.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--

___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [matplotlib-devel] basemap domain changes on pyplot call

2010-05-24 Thread Christopher Barker
Jeff Whitaker wrote:
 On 5/24/10 10:24 AM, Christopher Barker wrote:
 I need to be able to draw a filled polygon from coordinates in memory,
 for instance, but didn't see a way to do this directly.


 Chris:  If you have the map projection coordinates of the polygon,

nope -- we've got lat-long

 you 
 can just use the pyplot commands or axes methods, and then use the 
 Basemap set_axes_limits method to make sure the aspect ratio and axes 
 limits get reset correctly.

I'll look into that too -- if I have time.

Thanks,
   -Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--

___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] show() at the end of each function of an ensemble of scripts

2010-04-20 Thread Christopher Barker
Antony Lee wrote:
 Well, the problem isn't there (I believe). The workflow I'd like to 
 implement is that, for example the user does some data processing (in 
 ipython), plots some data (I need a show() here), closes the plot 
 window, does some other data processing (in ipython),

I'm  bit confused -- does ipython pylab mode not work for this? That's 
what it's for.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] where's superpack?

2010-03-24 Thread Christopher Barker
David Kremer wrote:
 Does anybody know where I could get a
 copy of superpack?

I don't know of the status of that, but this is what I recommend:

install the python2.6 from python.org
install the numpy1.3 binary from scipy.org
install the matplotlib binary (*.dmg) from matplotlib.org

(optional)
install the scipy binary from scipy.org

and there you go -- I suppose it would be nice to have it all in one 
install, but that's not too hard.

(if you really want all in one -- check out Python(x,y) or EPD)


-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Why the name Axes?

2010-03-23 Thread Christopher Barker
David Carmean wrote:
 How was the name Axes chosen for the Axes component?  :)

Much of the MPL API was modeled after the Matlab API, so you may have to 
ask Mathworks.

However: an axis is a single thing -- the x axis. axes is the 
plural of axis, so when you have a thing with both an x and y axis, is 
is an axes.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Problem saving a plot in OSX

2010-03-23 Thread Christopher Barker
 I am using the enthought distribution, I would hope that it was done 
 right but maybe not.

Then it may be an EPD bug, you might as on the EPD list.

 As a possible temporary fix, when I had this problem, I was able to 
 copy and paste the name of a file into the OSX save box from another 
 window/terminal etc, and so could still make new names for the files.

You also might try a different back-end. I'm not sure what EPD sets as 
the default but there are sometimes odd Tk issues. EPD should support 
wxPython (wxAgg), and maybe the macosx back-end.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] basemap and py2exe

2010-03-23 Thread Christopher Barker
Yagua Rovi wrote:
 I identify  the problem.
 There is no basemap data directory and the app search those datas in
 [MY_DIR]\dist\library.zip\mpl_toolkits\basemap\data
 
 But I don't know how to add it at the compilation

You can add those to data_files, or you may need to copy them with a 
little custom code at the end of your setup.py file.

-CHB


 
 
 2010/3/22 Friedrich Romstedt friedrichromst...@gmail.com:
 I'm not shure whether the following suggestion solves your problem,
 but it would simplify your script anyway.

 import matplotlib
 ...
 setup(..., data_files = matplotlib.get_py2exe_datafiles())

 And maybe don't forget to exclude 'libgdk_pixbuf-2.0-0.dll' (on my
 system) in 'dll_excludes'.  But I actually don't remember for what
 reason I had to exclude it.

 hth,
 Friedrich

 
 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] installation question

2010-03-22 Thread Christopher Barker
Mathes, Gary C wrote:
 Installation question:
 
  
 
 The *import pylab* command reports an error.  See bold below for 
 details.  What installation step(s) am I missing?

it looks like you've got GTK set as your default back-end, but are not 
running and X-server on this box.

If you want to use MPL without a GUI, you need to set your default 
backend to AGG, but you probably shouldn't use pylab for that anyway, 
but rather use the OO API -- some googling will tell you about that.

-Chris



  
 
 Thanks!
 
  
 
 *# uname -a*
 
 Linux SESB01-RE01 2.6.18-92.el5 #1 SMP Tue Jun 10 18:51:06 EDT 2008 
 x86_64 x86_64 x86_64 GNU/Linux
 
  
 
 #!/usr/bin/python
 
  
 
 # File: *mp_versions.py*
 
  
 
 import matplotlib
 
 import numpy
 
 import matplotlib as mpl
 
  
 
 print matplotlib version =  + matplotlib.__version__
 
 print matplotlib file =  + matplotlib.__file__
 
 print numpy version =  + numpy.__version__
 
 print mpl.get_configdir =  + mpl.get_configdir()
 
  
 
 *import pylab*
 
  
 
 *# mp_versions.py*
 
 matplotlib version = 0.99.1.1
 
 matplotlib file = /usr/lib64/python2.4/site-packages/matplotlib/__init__.pyc
 
 numpy version = 1.2.1
 
 mpl.get_configdir = /root/.matplotlib
 
 *Traceback (most recent call last):*
 
 *  File ./mp_versions.py, line 12, in ?*
 
 *import pylab*
 
 *  File /usr/lib64/python2.4/site-packages/pylab.py, line 1, in ?*
 
 *from matplotlib.pylab import **
 
 *  File /usr/lib64/python2.4/site-packages/matplotlib/pylab.py, line 
 247, in ?*
 
 *from matplotlib.pyplot import **
 
 *  File /usr/lib64/python2.4/site-packages/matplotlib/pyplot.py, line 
 78, in ?*
 
 *new_figure_manager, draw_if_interactive, show = pylab_setup()*
 
 *  File 
 /usr/lib64/python2.4/site-packages/matplotlib/backends/__init__.py, 
 line 25, in pylab_setup*
 
 *globals(),locals(),[backend_name])*
 
 *  File 
 /usr/lib64/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py, 
 line 10, in ?*
 
 *from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, 
 FigureCanvasGTK,\*
 
 *  File 
 /usr/lib64/python2.4/site-packages/matplotlib/backends/backend_gtk.py, 
 line 8, in ?*
 
 *import gtk; gdk = gtk.gdk*
 
 *  File /usr/lib64/python2.4/site-packages/gtk-2.0/gtk/__init__.py, 
 line 76, in ?*
 
 *_init()*
 
 *  File /usr/lib64/python2.4/site-packages/gtk-2.0/gtk/__init__.py, 
 line 64, in _init*
 
 *_gtk.init_check()*
 
 *RuntimeError: could not open display*
 
  
 
 # *ipython*
 
 Python 2.4.3 (#1, May 24 2008, 13:57:05)
 
 Type copyright, credits or license for more information.
 
  
 
 IPython 0.8.4 -- An enhanced Interactive Python.
 
 ? - Introduction and overview of IPython's features.
 
 %quickref - Quick reference.
 
 help  - Python's own help system.
 
 object?   - Details about 'object'. ?object also works, ?? prints more.
 
  
 
 *Installation steps:*
 
 # rpm -ivh refblas3-3.0-11.2.x86_64.rpm lapack3-3.0-19.2.x86_64.rpm
 
 # rpm –ivh python-dateutil-1.2-1.el5.noarch.rpm pytz-2006p-1.el5.noarch.rpm
 
 # rpm -ivh python-setuptools-0.6c5-2.el5.noarch.rpm
 
 # rpm -ivh python-nose-0.10.4-1.el5.noarch.rpm
 
 # rpm -ivh atlas-3.8.3-1.el5.x86_64.rpm
 
 # rpm -ivh numpy-1.2.1-2.el5.x86_64.rpm
 
 # rpm -ivh python-matplotlib-0.99.1.2-1.el5.x86_64.rpm
 
 # rpm -ivh ipython-0.8.4-1.el5.noarch.rpm
 
  
 
 *Location of RPMs:*
 
 http://download.opensuse.org/repositories/home:/ashigabou/CentOS_5/x86_64/
 
 http://www.rpmfind.net/linux/rpm2html/search.php?query=python-dateutil
 
 http://www.rpmfind.net/linux/RPM/epel/5/ppc/pytz-2006p-1.el5.noarch.html
 
 http://fr2.rpmfind.net/linux/RPM/epel/testing/5/ppc/python-nose-0.10.4-1.el5.noarch.html
 
 http://rpm.pbone.net/index.php3/stat/4/idpl/12391980/com/atlas-3.8.3-1.el5.x86_64.rpm.html
 
 http://www.rpmfind.net/linux/rpm2html/search.php?query=numpy
 
 http://www.rpmfind.net/linux/rpm2html/search.php?query=python-matplotlib
 
 http://rpm.pbone.net/index.php3/stat/4/idpl/9548551/com/ipython-0.8.4-1.el5.noarch.rpm.html
 
  
 
  
 
 **/Gary/**
 
  
 
 
 
 
 --
 Download Intel#174; Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 
 
 
 
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

Re: [Matplotlib-users] savefig 0.91

2010-03-16 Thread Christopher Barker
Samuel Teixeira Santos wrote:
 I fix it.
 
 It was a dumb error
 
 I using '\' on windows
 and on ubuntu-linux I must use '/'...


note that '\' works in Windows for the most part. Or, better yet, use 
os.path.join() and friends.

-Chris

-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Contour Plotting of Varied Data on a Shape

2010-03-08 Thread Christopher Barker
gely wrote:
 As I think about it, I'm going to have to write code to do this (contour 
 an unstructured triangular mesh) sometime soon, so please let me know if 
 it does exist already -- if not I'll try to remember to contribute it 
 when I get around to it.

 -Chris

 
 Chris, I found this old thread. Did you ever find code to directly
 interpolate a triangulation?

sorry, no, not yet.

Do you already have the triangulation? if so, it's pretty easy to contour.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] py2exe message RuntimeError: Could not find the matplotlib data files?

2010-02-20 Thread Christopher Barker


Wayne Watson wrote:
 Thank you. That last link probably enlightened about six people.

Are you one of those six? That page is unfortunate -- some folks don't 
quite get that a Wiki is supposed to be edited -- not just added to, 
like a forum. So that page could really use some clean up -- but if you 
read the whole page, you can see that it's gotten pretty easy.

Are you still confused?

-Chris

 On 2/19/2010 8:28 PM, Christoph Gohlke wrote:
 http://lmgtfy.com/?q=py2exe+matplotlib+data+filesl=1  leads me to
 http://www.py2exe.org/index.cgi/MatPlotLib.
-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Looking for a Compiled Demo of MPL Graphics

2010-02-19 Thread Christopher Barker
Wayne Watson wrote:
 Strange that there wouldn't be any such demos. ;-) 

I've got a small prototype app that embeds MPL in wxPython, bundled up 
with py2exe (and py2app for the Mac). It's 11.7MB, if you want me to 
mail it to you.

Bundled up python apps tend to be big, they have to include all of:

-Your code (not usually very big)

-Python itself (fairly big)

-The gui toolkit (wxPython is very big)

-Any other packages you are using.

Bandwidth and disk space, and memory are cheaper than they used to be, 
so it's not that big a deal, really.


  However, I'm now  rolling my own.

always a good lesson, anyway.

-Chris



 On 2/15/2010 6:55 AM, Wayne Watson wrote:
 Does anyone know where I can find a compiled demo that uses MPL grphics?
 I'd like, if possible, a Win version whose size is less than 10M, so
 that I can send it via e-mail, if necessary. It should use plot, so that
 someone can manipulate the plot with the navigation controls. At this
 point, I have no idea if that method is the fundamental graph tool or
 not. I suspect it is.

 If a mailable demo isn't available, maybe there's a web site that one
 can download such examples from?

 


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] 0.99.1 crashes python on Windows XP [SEC=UNCLASSIFIED]

2010-02-18 Thread Christopher Barker
Werner F. Bruhin wrote:
 Using numpy with /arch nosse solved the issue.
 
 Probably OT here, but does anyone know if numpy will in the future be 
 able to dynamically switch on/off the SSEx support?

not unless atlas grows that capability. atlas has to be built with 
particular features turned on or off at compile time.

Intel has a lapack that can dynamically select processors, but it's not 
open-source, and there are licensing issues to re-distributing it.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Finding the Supposed MPL show() bug.

2010-02-11 Thread Christopher Barker
Wayne Watson wrote:
 The developer stated this in a msg this morning.
 Either way should work.  Double clicking the py file is probably more 
 convenient, but you can more easily see error messages if  you open it 
 with IDLE

option 3:
   Start it up in a command window (DOS box on Windows), and then you 
won't have the mainloop interaction issues, and you'll see the output.

open a dos box, cd to the directory where your script is, and type:

python name_of_script.

If it can't find python, then you need to tell it where to look by 
adding it to your PATH or typing the whole thing:

C:\Python25\bin\python.exe

or something like that (not on Windows at the moment)

Note that this is not an MPL issue it is an IDLE (and many other IDEs) 
issue -- any Python IDE that runs your code in the same process as the 
IDE itself is going to have these issues.

IPython has gone to great pains to make interactive use with GUI 
programs work -- I don't any other tool that has.

Wayne Watson wrote:
 That link has no reference to tkinter.  tk and tk2, plus a few others 
 with tk in their names, but nothing else.A search in the box produced 
 nothing.

tkinter is the python binding to the Tk GUI toolkit -- so tkiniter and 
tk mean about the same thing when talking about Python.

Wayne Watson wrote:
 Thanks for the info. I'm semi-resistant to ipython. I tried if for a few 
 hours, and it seemed a bit too much like linux.

ipython is an interactive command line interface to Python -- it is much 
nicer than the raw interpreter, but it is what it is, and it is very 
good at it. It can be very helpful to experiment with stuff in an 
interactive environment, but once you go beyond tiny stuff, you need to 
write a program. To do that you need an editor, and a wya to run and 
debug it. An IDE integrates these functions, and there are many of them.

Personally, I use an editor to edit the code, the commend line (or 
IPython) to run the code, and do most of my debugging with print statements.

I suggest you take a bit of a break from the problem at hand, and go 
through a couple intro tutoroal sit python, write a couple small 
programs (tkinter-based, if that's what you're going to need), and get a 
handle on how to do it.

 lot, and enjoyed it. I'll consider it. Windows is the game now.

frankly, not all that different from a programming in Python point of view.

 Yes, actual use is good, but the needed imports seem a bit baffling. 
 scipy, pylab, matplotlib, ...? What components do  I only need for a 
 particular use?

you need what you need -- you need numpy for amost eveything you'll ever 
do if you work with numbers. You need matplotlib if you need to plot, 
you need scipy if you need any of the more complicated numerical 
routines it provides. pyplot dumps a bunch of these into the same 
namespace, which is nice for interactive use, but Id stay away from it 
for writing programs.

Wayne Watson wrote:
  I'm assuming that I don't
 want to use import matplotlib a lot, but something selectively like from 
 matplotlib.image import AxesImage, or from matplotlib.plot import 
 figure, show. What did I miss in my Python upbringing?

It's really a matter of taste. YOu either do:

import matplotlib

fig = matplotlib.figure

or from matplotlib import figure

fig = figure.

You'll need a lot of things in matplotlib if you're doing much of 
anything, and namespaces are one honking great idea, so I do:

import matplotlib as mpl

fig = mpl.figure()

etc..

HTH,

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Plotting multiline graph with large dataset (6 lines, about 30, 000, 000 points total

2010-02-10 Thread Christopher Barker
Oz Nahum wrote:
 Here's a quick and dirty solution how to sample every nth element in a
 vector - there's probably a faster way, with out loops,

there sure is:

In [8]: orig
Out[8]:
array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19])

In [9]: orig[0:-1:4] # every 4th element
Out[9]: array([ 0,  4,  8, 12, 16])

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Does Matplotlib have Image Processing?

2010-02-10 Thread Christopher Barker
Wayne Watson wrote:
 See Subject.

not really. Try:

http://www.scipy.org/doc/api_docs/SciPy.ndimage.html

for that. I think there are other IP libs wrapped for python use, too.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib Online: HOW TO?

2010-02-08 Thread Christopher Barker
Adolfo Aguirre wrote:
 He´s answer was that Zope awas not an straightforward stable 
 environment but a work-in-progress,

Zope has been around a long time, it' s fine environment, particularly 
when used as the core of Plone. Zope does have its own way of doing 
things that are not to everyone's taste. If your admin folks don't like 
it, there are MANY other ways to build a web app with Python.

MPL should work with any Python web application framework that allows 
arbitrary python packages, which is probably every one.

I'd take a look at Django, Pylons and Turbogears, at least.

  and that he did not find a single
 straight way to put matyplotlib online.

He was not looking very hard.

On the other had, if you have a well established set of web services 
built on PHP, they may not want to build something new, but I'll bet you 
could still use MPL to do your plotting by calling Python as a separate 
process. You could even get fancy and build a web service that does the 
plotting, and have your web apps call that (Pylons would be good for 
that, it's very flexible)


 in case we are missing something.

I think you are -- MPL is a fine choice for putting plots on the web. 
PHPlot may be also -- I know nothing of it.

HTH,

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib conflicts with IDLE

2010-02-05 Thread Christopher Barker
David MacQuigg wrote:
 I can't get Matplotlib to work with IDLE. 

Sorry, I don't know anything about IDLE, but...

 I'm running on Mac OS-X, so it looks like IPython is not an option.

Why not? I use Ipython on OS-X all the time, and it is fabulous, really 
fabulous.

  Also, I
 would rather stick with IDLE.  It is the perfect IDE for non-CS students who
 shouldn't be spending their time on the complexities of a plotting package.

Spyder:

http://packages.python.org/spyder/

Looks really promising, but I don't think they've got OS-X packages yet.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Draggable matplotlib legend

2010-01-28 Thread Christopher Barker
 On Thu, Jan 28, 2010 at 3:48 PM, John Hunter jdh2...@gmail.com 
 Cool -- nice example.  I added the code to legend.py.  Now you can do
 
 leg = ax.legend()
 leg.draggable()
 
 to enable draggable mode.  You can repeatedly call this func to toggle
 the draggable state.

Might I suggest that that be made:

leg.draggable(True)
leg.draggable(False)

or

leg.draggable('on')
leg.draggable('off')

or even a property:

leg.draggable = True

or some such. I'd be nice not to have to keep track of the current state.

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

NOAA/ORR/HAZMAT (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] position a wxPython frame near to a matplotlib point

2010-01-22 Thread Christopher Barker
C M wrote:
 For those who you wxPython with matplotlib, does anyone know how to do
 this or can point me in the right direction?
 
 I would like to pick a point (that part is fine) and then place a
 wxFrame near to that point.  I'm using something like:
 
 #Note: self is a wxPanel that contains the matplotlib plot.
 mouseLocation = wx.GetMousePosition()
 pos = self.ScreenToClient(mouseLocation)
 self.popup.Move(pos)
 
 but this results in the frame being completely displaced from the
 picked point.

just thinking out loud here, but when you call self.popup.Move(), I 
think that's screen coordinates, but you called self.ScreenToClient().

I think you want something like:

mouseLocation = wx.GetMousePosition()
self.popup.Move(pos)

Or you could get the coords from the mouse event instead, which will be 
in client coords.

I'd print out some of those coords, so can make sense of them

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Printing Graphs and Image Processing Operations

2010-01-19 Thread Christopher Barker
 Wayne Watson wrote:
 I've used MPL a bit, and am wondering if there's a facility for sending 
 graphic images to a printer, or putting them in some format like png?   

you've already gotten an answer to the png part, but as for printing 
directly:

I suspect you could make a pdf and send that to the printer with a 
system call, though it would be different on each system, and I don't 
know how any of those work any more (you used to be able to do print 
filename on Windows (or DOS, anyway!), and, of course, on *nix systems, 
lpr filename used to work.

Another option is to use a GUI back end, but never bring up a window. 
You can use wxPython this way -- you need to create a wx.App(), and you 
may need to create a wx.Frame to put the MPL plot in (or you may not), 
but you don't have to Show() it. You an then call the wx printing code 
to print. I imagine it's similar for QT and GTK and TK. Note that for wx 
at least, you do need access to a Windowing system, even if you aren't 
displaying anything.

HTH,

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] bezier curve through set of 2D points

2010-01-14 Thread Christopher Barker
Jae-Joon Lee wrote:
 On Thu, Jan 14, 2010 at 4:38 AM, Mark Bakker mark...@gmail.com wrote:
 Does matplotlib have a routine that can fit a cubic Bezier curve through an
 array of 2D points?

This looks like a pretty nice algorithm:

http://www.antigrain.com/research/bezier_interpolation/index.html

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] newbie question: type check?

2010-01-12 Thread Christopher Barker

 As for not being able to do isinstance(gca(), 
 matplotlib.axes.SubplotAxes) -- I'm not sure that's a problem.  It 
 would help to understand the use case, but I suspect you either want 
 isinstance(gca(), matplotlib.axes.Axes) or isinstance(gca(), 
 matplotlib.axes.SubplotBase).

You may also want to use:

issubclass(an_appropriate_superclass)

instead.

However, given the python's duck-typing semantics, you usually don't 
need to know exactly what class something is -- that's kind of the point 
of dynamic typing.

So what is it you're trying to accomplish? Maybe there is a better way.

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Best practices for organizing plotting code? (Greg Novak)

2009-12-22 Thread Christopher Barker
A couple more thoughts on this:

 4) Don't put clf() and cla() all over the place. 

absolutely --

my addition to this is to use the OO API more than the pylab one. Put 
all your plotting code into functions that take an axes object as a 
parameter, then go from there. That way you have separated the 
generation of figures (collections os axes) from the plotting itself.

you can do the same at a higher level too -- put your code that creates 
the figures in a function that take a figure as an argument -- then you 
can use the same code to generate PDFs, embed in a GUI, etc.


HTH,

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Plotting Hex grid

2009-12-17 Thread Christopher Barker
iCy-fLaME wrote:
 I am aware of Hexbin, which is a kind of histogram with hexagonal
 cells. But what if my data comes in a Hex grid to start with?

 What would be a good way to plot such data?

Use the source, Luke!

Take a look at the source of Hexbin -- the answer must be there.

With luck, it's been factored in a way that you can use the drawing code 
without the binning code.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Installing matplotlib with Mac OS 10.6

2009-12-02 Thread Christopher Barker
Lisa M Winter wrote:
 1) The diskimage installation: When I open the installer, I am told  
 that I can not install matplotlib on my disk because I do not have a  
 system version of python 2.6.  I do not understand this error since I  
 am running the default version (which is 2.6.1).

The diskimage is usually built for the python binary supplied by 
python.org -- that is what the message means by the system version. I 
tried to submit a patch to change that message a year or two ago, but I 
guess it never got applied -- maybe I'll try again.

A note to developers/distributors:

Robin Dunn figured out a way to install a binary wxPython that will work 
with both the Apple and the python.org binaries. What it does it put it 
in /usr/local, and then put a pth file in both of the pythons so that it 
can be found. A bit of a hack, but it works, and I've never heard anyone 
have a problem with it.

Perhaps we should do the same thing with MPL -- I'm sure he'd be glad to 
share his scripts for building it.


-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Installing matplotlib with Mac OS 10.6

2009-12-02 Thread Christopher Barker
Christopher Barker wrote:

 The diskimage is usually built for the python binary supplied by 
 python.org -- that is what the message means by the system version. I 
 tried to submit a patch to change that message a year or two ago, but I 
 guess it never got applied -- maybe I'll try again.

I took a look at the source for the latest bdist_mpkg -- it looks like 
it should now give a message like:

This package requires MacPython to be installed

though It's all a bit complicated -- did whoever built the dmg use the 
latest bdist_mpkg?

But maybe should still do:

 A note to developers/distributors:
 
 Robin Dunn figured out a way to install a binary wxPython that will work 
 with both the Apple and the python.org binaries. What it does it put it 
 in /usr/local, and then put a pth file in both of the pythons so that it 
 can be found. A bit of a hack, but it works, and I've never heard anyone 
 have a problem with it.
 
 Perhaps we should do the same thing with MPL -- I'm sure he'd be glad to 
 share his scripts for building it.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] bug in run_all.py

2009-11-23 Thread Christopher Barker
Dr. Phillip M. Feldman wrote:
 Running C:\Program Files\Python25\python.exe C:\Program
 Files\Python25\Examples\basemap-0.99.4\barb_
 demo.py
 C:\Program: can't open file 'Files\Python25\python.exe': [Errno 2] No such
 file or directory
 TEST FAILURE (status=2)

This looks like an issue with white space in the file path -- Windows 
can be weird about that.

That's why Python is usually installed directly into:

C:\python25

Rather than in Program Files, though you're right, that's where it 
should be put.

what does that Running message come from -- it doesn't look like it's 
written to accommodate white space.

-Chris






-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] set figure position

2009-11-22 Thread Christopher Barker
Laurent Dufrechou wrote:
 You can define exactly the size and position of your plot like this:
 
 fig = Figure()
 axe = fig.add_axes([pos_x,pos_y,size_x,size_y])

I believe the OP was asking how to position the entire figure Window (or 
frame in wx parlance) on the screen, rather than the axis within the figure.

If you are using the wx back-end, you should be able to get a reference 
to the wx.Frame, and do what you like with it. (sorry, I don't remember 
how to do that off the top of my head, though if need be a few calls to 
GetParent should get you there).

If you are using another back-end there should be a similar calls available.

However, given your description, I suspect that you'd be better off 
managing the frames with your code anyway. Take a look at wxMPL 
(http://agni.phys.iit.edu/~kmcivor/wxmpl/) and/or the embedded_in_wx 
examples.


-Chris
 axe.plot(x, y, 'b')
 
 where pos_x,pos_y is a number (0n1) and 0,0 is bottom left
 size_x, size_x is a number (0n1)
 1 is full figure size.
 
 Ex: axe = fig.add_axes([0.1,0.1,0.8,0.2])
 
 Plot @10% x,10% y from bottom left
 And size is 80% of figure x size and 20% of figure y size.
 
 
 Laurent
 
 -Message d'origine-
 De : Marie De La Fontaine [mailto:marie.delafonta...@yahoo.com] 
 Envoyé : dimanche 22 novembre 2009 18:05
 À : matplotlib-users@lists.sourceforge.net
 Objet : [Matplotlib-users] set figure position
 
 We have recently switched to matplotlib after having done all plotting with
 pure wxPython for years.
 
 There is one problem we cannot solve. With wxPython we are free to set the
 geometry (position and size) of each Frame anywhere on the screen. We have
 developed a heuristic solution which packs the Frames automatically
 according to a pattern that can be recognized after a user has manually
 repositioned a few Frames on the screen. For example, some users tend to
 align their figures in a row, others subdivide the available space for
 different groups of figures, and so on. Please let us know if anyone is
 interested to integrate this heuristic packing into matplotlib.
 
 The important question is:
 How can we set the position of a Figure on the screen using matplotlib?
 There is a function Figure.set_size_inches, but no function to move the
 Figure to a new position. Please help.
 
 Regards,
 Marie
 
 
 __
 Do You Yahoo!?
 Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz
 gegen Massenmails. 
 http://mail.yahoo.com 
 
 
 
 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
 trial. Simplify your report design, integration and deployment - and focus
 on 
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 
 
 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
 trial. Simplify your report design, integration and deployment - and focus on 
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] line thicknes in axes

2009-11-17 Thread Christopher Barker
Pavlo Shchelokovskyy wrote:
  is there is a consistent
 way to scale at once thickness of everything drawn on figure, i.e.
 axis, plots, fonts?..

I think what you want is to set a dpi that works for you:

http://www.scipy.org/Cookbook/Matplotlib/AdjustingImageSize

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] 'remote control' matplotlib window

2009-11-17 Thread Christopher Barker
Peter McGregor wrote:
 The problem with those examples is, when I comment the following line (for 
 example in 
 http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_wx2.html):
 
 self.add_toolbar() # comment this out for no toolbar
 
 then I have no possibility to make the window react to mouse events.

Give wxMPL a try:

http://agni.phys.iit.edu/~kmcivor/wxmpl/

It handles some, if not all, of this for you.

However, you bring up a good point, unless you have missed something -- 
the code for the various interactive modes really should be separate 
from the toolbar that activates those modes.

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] close-event

2009-11-16 Thread Christopher Barker
 On Fri, Nov 13, 2009 at 10:39 AM, Gregor Thalhammer
 gregor.thalham...@i-med.ac.at wrote:

 1) I would like to stay independent of the backend, therefore I would
 prefer a approach like in idle_and_timeout
 http://matplotlib.sourceforge.net/examples/event_handling/idle_and_timeout.html
 However, with my default backend WXAgg I do not continuously idle
 events, but only once e.g. after each mouse movement. Can someone give
 me more information about the intended behaviour, current status and
 support of idle events?

Well,  yes, that is how wx idle events work. I have no idea how any 
other toolkits do idle events. As a result, I've found that I never use 
EVT_IDLE with wx -- it just isn't useful, you get a whole bunch of them 
when someone is doing something like moving the mouse slowly, and none 
when the user is doing nothing.

What I have done is use a wx.Timer instead -- if you want something to 
happen when the user isn't doing anything, you can start a timer, and 
have it fire whenever you want. You can also have the timer started by 
an IDLE event, and have each subsequent IDLE event

I don't know if MPL has a Timer that wraps the GUI toolkit timers, but 
that may be a good idea.

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Docked/tabbed figures in one window?

2009-11-13 Thread Christopher Barker
qu...@gmx.at wrote:
 I would like to be able to dock some figures into one window
 and be able to look at them by tabs or something similar.
 
 Is something like that already implemented or does someone know
 of a widget that can do that?

This should be support on with any of the GUI toolkits -- Id pick which 
one you want depending on other reasons:
  - which one you are familiar with
  - which one you're using for other projects
  - etc, etc,

With wx, for instance, you'd put each MPL plot on a wxNoteBook page. 
Also, if you use wx, I'd check out wxMPL -- it's a nice wrapper for MPL 
on wx that will save you a bit of work.

-Chris






-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] rasterizing a figure

2009-11-12 Thread Christopher Barker
Geoffrey Ely wrote:
 Hi, What is the best way to rasterize a figure into a numpy array for  
 further image processing?

untested, but I suspect:
 image = numpy.frombuffer( fig.canvas.renderer.buffer_rgba).reshape( shape )


might work -- something like that, anyway.

-CHB


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Py2app application with matplotlib fails on OS X 10.6

2009-11-10 Thread Christopher Barker
Emanuele Santos wrote:
 It should load /usr/lib/libgcc_s.1.dylib. The problem is that the binary 
 package of matplotlib for mac is linked 
 against /usr/local/lib/libgcc_s.1.dylib.

ouch -- it shouldn't be. Did you build it yourself or is that the 
official one?

Also, it seems that Py2app really should include libs that are in 
/usr/local with the bundle, so that may be a py2app bug/feature.

Boy, this is a pain!

oh well,

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Building basemap on OS X 10.6

2009-11-09 Thread Christopher Barker
Tim Burgess wrote:
 Sodecided to go down the MacPorts path. Many automated downloads 
 later, I now have a successful Basemap install (yay!)
 Many thanks to the folks who have contributed to MacPorts and 
 interestingly geos 3.1.1 is installed.

Is it 64 bit now. If so...


 Only present worry is that wxWidgets port is not building on 10.6 - yet 
 to resolve that.

wxWidgets/wxPython can not be built (for the Mac) 64 bit. It is built on 
Carbon, which Apple has not and will not port to 64 bit. There is a 
Cocoa version of wxMac, but it's not done yet, and has not been wrapped 
for Python.

You may be able to get a 64bit GTK/X11 wxPython working with MacPorts -- 
I've never tried that.


 And FYI, to check whether you have a 64bit Python install:
   import sys; print sys.maxint
 9223372036854775807

So it looks like you are running 64 bit -- what a pain this all is.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Installing problems

2009-11-02 Thread Christopher Barker
Does the egg at:

http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.1/



matplotlib-0.99.1.1-py2.5-macosx-10.3-i386.egg


not work for you? the 10.3 means 10.3 or greater, and I'm pretty sure 
it is Universal, rather than just i386 as well. It should work with the 
python.org Python 2.5

there is:

matplotlib-0.99.1.1-py2.6-macosx-10.3-fat.egg

for Python 2.6

I haven't had to compiled MPL is a good while.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] contribution offer: griddata with gaussian average

2009-10-05 Thread Christopher Barker
VáclavŠmilauer wrote:
 I checked the official terminology, it is a kernel average smoother
 (in the sense of [1]) with special weight function exp(-(x-x0)^2/const),
 operating on irregularly-spaced data in 2d.
 
 I am not sure if that is the same as what scipy.stats.kde.gaussian_kde does,
 the documentation is terse. Can I be enlightened here?

It looks like they are both part of a similar class of methods:

http://en.wikipedia.org/wiki/Kernel_%28statistics%29

As such, it makes sense to me to have them all in SciPy, sharing code 
and API.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] contribution offer: griddata with gaussian average

2009-10-04 Thread Christopher Barker
Václav Šmilauer wrote:

 about a year ago I developed for my own purposes a routine for averaging
 irregularly-sampled data using gaussian average.

is this similar to Kernel Density estimation?

http://www.scipy.org/doc/api_docs/SciPy.stats.kde.gaussian_kde.html

In any case, it sounds more like an appropriate contribution to scipy 
than MPL.

 First it stores all data points in a (regular) grid.

What if your data points are not on a regular grid? Wouldn't this be a 
way to interpolate onto such a grid?

 Storing data in grid avoids searching all data points every
 time, only those within certain grid-range will be used.

another option would be to store the points in some sort of spatial 
index, like an r-tree.

 I should be able to convert it to accept numpy arrays,

key.

 wrap using Python
 API instead of boost::python

I'd consider Cython for that.

sounds like a useful module,

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] scaling arrows in quiver

2009-10-01 Thread Christopher Barker
Eric Firing wrote:
 I have committed a change to svn trunk, so that if you change the
 above to
 
 q = plt.quiver([0],[0], [1], [1], scale_units='xy', angles='xy', scale=1)

Eric,

You might recall that I spent a bit of time making a stick plot with 
quiver. I go to work OK, but I couldn't do exactly what I wanted. I 
think gets closer, but Im not sure it quite gets there:

How exactly are the arrows scaled with scale_units='xy'? What I'd like 
is for the length of the arrow to the the y scale only -- the x scale it 
irrelevant (x is time, y is velocity). Can I do that with this?

 (Maybe I should add width_units, identical to units, and deprecate 
 the latter; this might make the meanings of the kwargs clearer.)

+1

But if you're doing that, you may want to make more changes, also -- you 
might as well do them all at once.

-Chris

-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] glumpy: fast OpenGL numpy visualization + matplotlib integration

2009-09-29 Thread Christopher Barker
Gökhan Sever wrote:
 This is technically called OpenGL backend, isn't it?

well, I think it's different -- he's not really using the standard 
backend API.

The trick with doing a real OpenGL back-end, is that a lot of 
computation time is spend doing transforms, and that can't be fully 
pushed to the back-end, because MPL provided arbitrary transforms.

There is also a fair bi tof time spent pushing data to the back-end.

I think to really get the benefit of OpenGL, you'd need the back-end to 
be semi-perstent -- you'd pass data in, and teh back-end would render it 
without having to pass the data in again. This would only support 
transforms that the back-end supports (linear only?). However, I think 
there could still be areal performance benefit bey breaking the 
transform pipeline into two parts -- one from arbitrary coordinates to 
something orthogonal and linear, and then a final one from that to 
screen coordinates (zooming and panning). Then you'd at least get full 
hardware accelerated performance for zooming and panning

We're doing this for a high-performance interactive mapping app, and 
it's working pretty well. However, OpenGL is pretty darn low-level, so 
there's a lot of code to write!

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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


--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] python script

2009-09-28 Thread Christopher Barker
felix meyenhofer wrote:
 The package is installed. In the interpreter the 'import matplotlib'  
 does not throw an error. On the other hand I tried to use matplotlib  
 in a python script and here the very same command provokes the  
 following error message:

how are you running that script? I supect you are getting a different 
python.

try:

$ python TheNameOfTheScript

that should get you the same python as you get typig python

If you run the script directly:

$ ./TheNameOfTheScript

it will use the #! line at the top to tell it where to find python. If 
that line says

#!/usr/bin/python

you'll probably get a different one. the usual convention is:

#!/usr/bin/env python

which should get you the same one that you get when you start python at 
the command line.

a few things to try to test all this:

$ which python

$ python -c import sys; print sys.path
$ python -c import sys; print sys.executable

putting import sys and print sys.path or print sys.executable at 
the top of your troublesome script.

HTH,

-Chris

 Traceback (most recent call last):
File ./account3.py, line 13, in module
  import matplotlib
 ImportError: No module named matplotlib
 
 I would be greatful for any help/explanaiton.
 Cheers,
 Felix
 
 $ uname -aDarwin mac-screening-1 9.8.0 Darwin Kernel Version 9.8.0:  
 Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
 
 $ python
 Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27)
 [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
 
 $ python -c 'import matplotlib; print matplotlib.__version__,  
 matplotlib.__file__'
 0.99.0 /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ 
 site-packages/matplotlib/__init__.pyc
 
 The Package was downloaded from the link:
 http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.1/matplotlib-0.99.1.1-py2.5-macosx10.5.dmg/download
 
 --
 Come build with us! The BlackBerryreg; Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay 
 ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
 http://p.sf.net/sfu/devconf
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] interactive python session with matplotlib

2009-09-25 Thread Christopher Barker
Andre Walker-Loud wrote:
 IPython can remedy all your wonderings :)

I second that!

 What I have in mind is writing code that I can call from a terminal, as 
 opposed to interactively as with iPython.

you can call ipython with a script as a command line parameter:

ipython TheScriptToRun.py

so you can make an alias, or a little shell r batch script that calls 
ipython with your script.

  However, in iPython, can you 
 have a module/script running, and asking me as the user for input?

sure -- either with simple raw_input and friends, or with the GUI 
toolkit of your choice (GTK, wxPython, etc), jsut use the same one as 
you use for MPL.

The key here is that GUI toolkits run a Mainloop() to process user 
input, and once you've started that, they block python until it's done.

What Ipython does is (optionally) start up the GUI toolkit in another 
thread, so that the main interactive prompt is not blocked. It's handy 
for mixing an interactive prompt and GUI stuff, even if you aren't using 
MPL. Plus you get all the other nifty iPython features.

Give it try -- it's wonderful.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Contouring on triangular grids

2009-09-18 Thread Christopher Barker
Andrew Straw wrote:
 Thanks for this.

Yes, indeed. It looks like nice stuff!

I do encourage you to keep up the good work on this (the only thing I 
notice is the need for some more docs). I also encourage you to keep the 
contour generating code separate from anything matplotlib specific. I, 
for one, would like to use it outside of MPL.

Unfortunately, it will probably be a month or two before I can spend any 
time digging into this for my stuff, but it looks great so far.

 I haven't had a chance to look at your code -- can you elaborate on the
 approach you took versus natural neighbors interpolation, as available
 through the mlab.griddata function?

I think I can answer that a bit: this is contouring directly on the 
triangular mesh, rather than interpolating to a rectangular grid, then 
contouring. It should be a little more accurate, as well as saving 
processing time and memory. In particular, it should work better around 
the edges of a non-rectangular domain.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Come build with us! The BlackBerryreg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9#45;12, 2009. Register now#33;
http://p.sf.net/sfu/devconf
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] installing matplotlib 0.99 for pyhton 2.6 mac osx 10.5

2009-09-10 Thread Christopher Barker
Farhan Sheikh wrote:
 i have python 2.6 running on my mac osx 10.5, however when installing  
 the binary file provided, it says i need to have python 2.6 on my  
 machine. i dont understand why this is happening as when open a new  
 terminal and type 'python', python version 2.6.2 is the version that  
 is run. My supervisor also had a look at this and could not figure it  
 out. He linked python 2.6 with the python command but the install file  
 still did not recognise python 2.6.
 
 anybody have the same issue? or know of how to fix this issue?

How did you install 2.6? The binary MPL installer is probably looking 
for the python.org 2.6, which would be in /Library/Frameworks/

If you are using a macports python, for instance, the installer wouldn't 
find it.

which python at the command line might help clear this up.

or:

python -c import sys; print sys.path

That will spew out a bunch of dirs, and where there are should tell you 
where your python is installed.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] installing matplotlib 0.99 for pyhton 2.6 mac osx 10.5

2009-09-10 Thread Christopher Barker
Farhan Sheikh wrote:
 when i installed python 2.6, i installed it into the /usr/local/lib 
 folder

maybe I wasn't clear -- the MPL installer it meant to be used with the 
binary from python.org. You want use the installer you get here:

http://www.python.org/download/

 python -c import sys; print sys.path
 
 the results i got were:
 
 ['', '/usr/local/lib/python26.zip', '/usr/local/lib/python2.6', 
 '/usr/local/lib/python2.6/plat-darwin', 
 '/usr/local/lib/python2.6/plat-mac', 
 '/usr/local/lib/python2.6/plat-mac/lib-scriptpackages', 
 '/usr/local/lib/python2.6/lib-tk', '/usr/local/lib/python2.6/lib-old', 
 '/usr/local/lib/python2.6/lib-dynload', 
 '/usr/local/lib/python2.6/site-packages']
 
 it seems like everything was downloaded to the correct directory.

for a unix-style install into /usr/local. yes. But it is not the kind of 
install that the MPL binary is expecting.

There are WAY TOO MANY ways to install python on OS-X, but the 
standard way is the one used by the installers found on python.org: It 
is called a Framework Build, and is the Mac way to do things.

People have their reasons for doing it other ways, but package 
distributors can only support so much, so the python.org way is the one 
generally supported.

You can build MPL for your install it you want, it should be easy, 
except for the dependencies -- I'm not sure what those are anymore, but 
a little reading of the docs should tell you.

Oh, and you'll end up having to build every other extension, too - 
wxPython, QT, PIL, ???

Without good reason, I'd just go with the python,org build.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] best format for MS word?

2009-09-02 Thread Christopher Barker
MS simply doesn't lay well with open vector formats, I think PNG with 
the right DPI, etc is still probably your best bet.

Shixin Zeng wrote:
 I'm attaching a file that converts svg to emf, which is based on
 librsvg and cairo.

 I've spent the all night working on this, but the result is still not
 satisfying. The converted emf file is even worse than the png file
 produced from matplotlib. I'm not sure if it's because I did something
 wrong or it's because of the limitation of this method itself.

I suspect you are getting a raster embedded in the emf, rather than 
proper vector graphics, but that's just a guess. This message is a 
couple years old, but does seem to indicate the vector emf is not 
supported (or wasn't then):

http://lists.cairographics.org/archives/cairo/2007-February/009805.html

However, if Cairo does support verctor emf, than you might be able to 
use the MPL Cairo back-end, rather than trying to go to SVG-emf.

good luck!

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Piecewise Cubic Hermite Interpolating Polynomial in python

2009-09-02 Thread Christopher Barker
Chris Michalski wrote:
 Thanks for the inputs...  perhaps it will provide the impetus for  
 future postings as well...

I think this would be a great addition to scipy.interpolate. I encourage 
you to massage your code to fit the API and scipy standards and 
contribute it.

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Pareto diagram - align cumulative percentage marker in the middle of the bars

2009-08-25 Thread Christopher Barker
Werner F. Bruhin wrote:
 The other problem I have is that the xtick_labels are cut off at the 
 bottom when the frame is resized below a certain size.  How can I 
 prevent this?

I don't think MPL yet has a system for making things fit, so you need to 
change the size/position of your axes object:

axes.set_position(pos, which='both')


 Set the axes position with:

 pos = [left, bottom, width, height]


these are in figure units which are relative to figure size, from 0 to 
1. Unfortunately, what this means is that the amount of space for the 
axis labels varies with the size of the figure, as you've discovered.


The default for a single axes in a figure is:

(0.125,  0.1,  0.9,  0.9)

so you might try something like:

axes.set_position((0.125,  0.15,  0.9,  0.85) )

what is best depends on what size you want your figure to look good at.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Contour Plotting of Varied Data on a Shape

2009-08-21 Thread Christopher Barker
Erik Schweller wrote:
 My overall goal is to generate contour plots for a wide range of input
 data.  The data points are not regularly spaced and do not align to
 any grid.  The data points represent measurements taken from a model
 that can take on a variety of shapes.  To make matters more difficult,
 I'd prefer not to interpolate around corners of the model.

It strikes me that when you are working with unstructured data like 
this, it may be better to keep it unstrucured -- do the delanauy 
triangulation and directly contour from that. It's actually prety easy 
to contour a triangular mesh.

Unfortunately, I haven't see code to do it in scipy or MPL. Am I wrong? 
Is there something there. If not, there really should be it seems a bit 
silly to shoehorn your data to a rectangular grid just to contour it.

I suppose NN interpolation is essentially doing this already, but it 
introduces issues with a boundary that doesnt' line up to a rectangular 
grid.

As I think about it, I'm going to have to write code to do this (contour 
an unstructured triangular mesh) sometime soon, so please let me know if 
it does exist already -- if not I'll try to remember to contribute it 
when I get around to it.

-Chris

-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] wx and matplotlib

2009-08-16 Thread Christopher Barker
Werner F. Bruhin wrote:
 I am trying to put together a wxPython frame using py.aui to show 
 multiple matplotlib.figures/canvas.

I'd recommend you take a look at wxMPL -- it's a nice way to embed MPL 
in wx.

 Would like that each figure takes x percentage of available screen 
 estate.  I.e. would like e.g. to have 2 rows with 3 columns of 
 figures/statistics, i.e. 6 graphics.

To be clear with the vocabulary -- in MPL, a figure would be one 
wxWindow. In that you can put multiple axes which show the actual 
plots (sometimes referred to as subplots). In this case, I'm not sure if 
you want more than one MPL figure.

 If the total screen estate is too small then there should be scrollbars 
 per figure/canvas.

If you want multiple figures, than this isn't really an MPL question. 
You'd do that layout the same way you would with any other set of 
wxWindows -- probably putting them all on a wxScrolledWindow, in Sizers, 
and giving them a minimum size.

With a single MPL Figure, it would be similar, put it on 
wxScrolledWindows, with a minimum size set.

 Hopefully some samples code (in the example files which existed in 
 0.90.x)
Is this what you are looking for?

http://matplotlib.sourceforge.net/examples/index.html

in particular, you might want to look at the wx examples here:

http://matplotlib.sourceforge.net/examples/user_interfaces/index.html

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

NOAA/ORR/HAZMAT (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] re grid non regular data, then mask for continents / artifacts

2009-08-12 Thread Christopher Barker
John [H2O] wrote:
 Impatiently I somewhat double posted (though, actually, I thought this was a
 better list than scipy for the question). Regardless... the conversation is
 mostly here:
 http://www.nabble.com/2d-interpolation%2C-non-regular-lat-lon-grid-td24909685.html

One comment:

mgrid() is designed to interpolate form unstructured data to a regular grid.

Given  that your data is, in fact, quite structured, I suspect you may 
get better results from a a custom-written interpolator -- simple 
bi-linear (or bspline) interpolation would be pretty easy to write, and 
may give you a cleaner result. You may even be able to grab code 
straight from scipy.interpolate, an apply it on the different portions 
of your grid separately.

HTH,

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplotlib, build from source on osx 10.5.8

2009-08-07 Thread Christopher Barker
John Hunter wrote:
 No, you have troubles with libpng -- check the first instance of
 error in your gcc output:
 
   src/backend_agg.cpp:3:17: error: png.h: No such file or directory
 
 Either you do not have libpng installed, or it is in a place where the
 build cannot find it. 

Note that the UnixImageIO Framework from Kyng Chaos should give you a 
good libpng (and freetype), you just have to make sure that MPL can find 
it.

Another easy option is to use Macports to build it, with the universal 
variant.

HTH,

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplotlib, build from source on osx 10.5.8

2009-08-07 Thread Christopher Barker
sasha wrote:
 Ok i fixed insytalling in usr local lib from source (both png and freetype)
 i tried to tell matplotlib to find the frameworks but i don't know how.

for the record, William's Frameworks all have a unix dir in them, 
which have lib and include dirs. You need to add those to MPL's 
search paths, by editing setup_ext.py. Look for the basedir dict.

-CHB




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Backend neutral idle event won't repeat

2009-08-03 Thread Christopher Barker
John Hunter wrote:
 Wriing a GUI neutal idle event handler is not easy -- I've spent some
 time on it but crashed and burned on tk

   I think
 it would be great if we could abstract the idle handler and timeout
 handler across the GUIs so that mpl animation would be easier, but to
 date this has eluded me.

Maybe getting away from the Idle event approach would be the way to go. 
I've done a lot of (non-MPL) wx work, including animations, and NEVER 
found a use for the idle event. For animation work in wx, using a 
wx.Timer, and often a call to wx.Yield seems to generally be the way to 
go. Perhaps this same approach could be done on the other back ends as well.

As for idle events, I've found them to be useless because you get lots 
of them when you don't need it, and may not get them when you do. In wx 
at least, an Idle event is triggered when the event loop _becomes_ 
empty. That means that when the user is moving the mouse and there is no 
mouse_move event handler, you get this huge string of idle events. 
However, if the user is doing nothing for a bit, you get one event, then 
nothing until the user does something again.

I can see the appeal of an Idle event -- there are all sorts of things 
you might want to do when the app is idle, but the reality is that 
what you really want to know is when the app is _going to be_ idle for a 
bit, and there is no way to know that (at least not without Guido's time 
machine, anyway...).

I've lost track of what problems you're trying to solve with idle 
events, but maybe an abstraction of a timer system would be a more 
robust approach, for animations, anyway.

-Chris






-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] ipython --pylab without namespace pollution?

2009-07-27 Thread Christopher Barker
Ryan May wrote:
   Put this in your ~/.ipython/ipythonrc:
  
   pylab_import_all 0

I finally got around to doing this, and found:

# ===
# Deprecation note: you should look into modifying ipy_user_conf.py 
(located
# in ~/.ipython or ~/_ipython, depending on your platform) instead, it's a
# more flexible and robust (and better supported!) configuration
# method.
# ===

So I took that to heart, and added:

 o.pylab_import_all = 0


to my ipy_user_conf.py file, and that had the same effect.

thanks,

-Chris





-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Turning off the timezone (and more) in AutoDateFormatter

2009-07-22 Thread Christopher Barker
Hi all,

I'm passing in None for the timezone in AutoDateFormatter.

What I am getting is UTC, but what I want is nothing.

Looking at the code, I see lines like:

 self._formatter = DateFormatter(%H:%M:%S %Z, self._tz)

so my None is getting passed through. Then in DateFormatter, I see:

 if tz is None: tz = _get_rc_timezone()

Which looks like it's getting a timezone from an rc parameter. This
strikes me as not such a good idea. Far too easy to get the timezone
wrong -- I'm not sure there should be such a thing as a default time zone.

However, the issue at hand is that I want to not show the timezone at
all. I would have thought that None would be a good way to spell that,
but it's taken already to mean default.

So that means editing/overriding AutoDateFormatter. The way it's
written, I pretty much have to re-write the entire thing, which isn't so
bad, but it might be nicer if we could make it easier to override just
part of it.

One idea:

Some say that the right way to spell case/switch in Python is a 
dict, rather than a collection of if--elifs. So in this case, we could 
make a dict of format strings, something like below.

I've tried this, and I can now easily override the formatting for a 
particular time range, like so:

 Formatter = mpl.dates.AutoDateFormatter(locator, tz=None)
 # edit the format strings to remove the TZ spec
 # this only works with my custom version of AutoDateLocator
 Formatter.format_strings[1.0/24.0] = %H:%M:%S

I do agree with the comments that there are other ways to improve this,
but maybe this is a start.

-Chris


class AutoDateFormatter(ticker.Formatter):
 
 This class attempts to figure out the best format to use.  This is
 most useful when used with the :class:`AutoDateLocator`.
 

 # This can be improved by providing some user-level direction on
 # how to choose the best format (precedence, etc...)

 # Perhaps a 'struct' that has a field for each time-type where a
 # zero would indicate don't show and a number would indicate
 # show with some sort of priority.  Same priorities could mean
 # show all with the same priority.

 # Or more simply, perhaps just a format string for each
 # possibility...

 def __init__(self, locator, tz=None):
 self._locator = locator
 self._formatter = DateFormatter(%b %d %Y %H:%M:%S %Z, tz)
 self._tz = tz


 self.format_strings = { 365.0 : %Y,
  30.0 : %b %Y,
   1.0 : %b %d %Y,
   7.0 : %b %d %Y,
1.0/24.0  : %H:%M:%S %Z,
1.0/(24*60)   : %H:%M:%S %Z,
1.0/(24*3600) : %H:%M:%S %Z,
}
 self.fallback_format = %b %d %Y %H:%M:%S %Z

 def __call__(self, x, pos=0):
 scale = float( self._locator._get_unit() )

 f_string = self.format_strings.get(scale, self.fallback_format)

 self._formatter = DateFormatter(f_string, self._tz)


 return self._formatter(x, pos)



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] dynamically add subplots to figure

2009-06-02 Thread Christopher Barker
Tom Vaughan wrote:
 post some code

 
 I thought this might be required...
 
 So the whole thing is excessively complex.

It can be very instructive to write a little app that just tests the 
issue at hand -- it may help you figure out what's wrong, and if not, 
you will have a self-contained sample that you can post here for feedback.

 I think the relevant parts are:
 
 from matplotlib.figure import Figure

 self.__axl = self.figure.gca()

I don't know what your issue is, but I thin you will be ell served to 
use the OO interface, rather than pylab to write a complex app like this 
-- pylab is designed for simple interactive use and quick scripts. In an 
app, you want full control.


-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Non-X11 fallback on import

2009-06-01 Thread Christopher Barker
Alexander Lamaison wrote:
 I would like it to work
 is to use the default backend if X is available and, otherwise, fall
 back to using the Agg backend.  How can I do this?

I had a similar need a good while back with wxPython. I found some C 
code on the net that tries to connect to an X server and fails 
gracefully if it can't. I also wrote a Python wrapper around it. I 
haven't used it for years, and can't even find it on  my machine, but 
thanks to the glory of archives and google, here it is:

http://osdir.com/ml/python.wxpython/2004-03/msg00294.html

You'd use it like:

import matplotlib
import isX

if isX.isX:
 matplotlib.use(wxGTK) or whatever..
else:
 matplotlib.use(AGG)


note that you can also just check and see if the DISPLAY environment 
variable is set, but that won't be as reliable.

However, as the whole user interaction has to be totally different, I 
wonder if you can't just have a different start-up script depending on 
whether they want to run the GUI version or not.


-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA,  Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] free'ing the plotted data?

2009-05-27 Thread Christopher Barker
guillaume ranquet wrote:
 this is how I convert the xml into plottable arrays:
 
 def getnamefrom(name,src,what):
 extracts timestamps and 'what' from 'src' for 'name'
 buffwhat = []
 bufftime = []
 sortedbyname = []
 [sortedbyname.append(element) for
 element in src if
 element[name] == name]
 for i in sortedbyname[:-1]:
 if i['name'] == name:
 bufftime.append(i[timestamp]/1e9)
 buffwhat.append(i[what])
 return buffwhat,bufftime
 
 x,y = getnamefrom(cpu0,cpustat,usage)
 plt.plot(x,y)
 del cpustat
 
 
 (yes, it's a hardware monitor :D)
 basically, it seems cpustat is still refcounted somewhere.

what is cpustat? ans elementtree? Anyway, it sure looks like x and y 
should be full of copies of the data, so you don't have any references 
that would keep cpustat alive.

Also, it looks like x and y are lists -- when you pass those into MPL, 
they will be copied to numpy arrays, so you can delete them too, jsut in 
case they are keeping references to cpustat items.

  I wonder if I should append(copy.copy(i[...])) instead?

rather than that, I'd copy to numpy arrays explicitly:

return np.array(buffwhat), np.array(bufftime)

That's what MPL uses internally anyway, and you'll be clear what you 
want. If you know how many items you'll have to begin with, you can put 
the data into np.arrays directly (np.arrays do not support appending).

 or If I'm mis-interpreting what I see with top.

you could be -- Python does not necessarily give memory back to the 
system when it's done with it -- but it should be able to re-use it.

  I'm trying  to get infos directly from the gc atm.

you could use sys.getrefcount() (note that it creates a reference 
itself, so it's always at least 2), but that may nothelp, as it may not 
be the elementree that has multiple references, but rather something 
inside itThis is very tricky business -- Python frees you from 
worrying about memory management almost all the time, but it does mean 
that you give up control.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA,  Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Printing in wx

2009-05-27 Thread Christopher Barker
Stefanie Lück wrote:
 I'm trying to print my plots in a wxScrolledPanel under Windows XP but 
 it dosen't work. I only can print / preview the start of the plot on the 
 left upper site, the rest of page is empty:

I wonder if that has to do with how you are using the scolledpanel, and 
DCs. Post a sample (as a as-small-as-possible-running-app, if you can), 
and we can take a look.


 I used printing according the example of matplotlib printing_in_wx.py.

 BTW if I want to run this demo, Python crashes.

it works fine for me on OS-X

What messages to you get with your crash? What versions of Python, 
wxPython and MPL are you running?

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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


--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA,  Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] repeated GUI generation generates crash

2009-05-21 Thread Christopher Barker
Todd Pataky wrote:
 I'm using the Enthought Python Distribution (EPD_Py25) and I enter  
 IPython with the command: ipython.



 This problem does not occur if I use EPD's PyLab (i.e. ipython - 
 pylab). Does anyone know why?

because the whole point of the pylab flag to ipython is to tell 
ipython to start up the MPL plotting stuff in separate thread so that it 
can work like you want it to. If you don't' use that flag, then each 
call to pyplot tries to start up a new app, ,but the old one is still 
running, hence you problems.

ipython itself can be used for all sort of things that have nothing to 
do with matplotlib, so that's not its default behavior.

Just use ipython -pylab if you want to do interactive plotting, that's 
what it's for.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers  brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing,  
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA,  Big Spaceship. http://www.creativitycat.com 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] quiver questions/issues (bug?)

2009-05-18 Thread Christopher Barker
Eric Firing wrote:
 No, you hit a bug.  Thanks for the report and test script.  It is fixed 
 in r7103.
 
 If you are not running from svn, a workaround may be to specify the 
 angles as an ndarray or masked array with the shape set to (N,1) where N 
 is the number of arrows.

Yes, that seems to work. Thanks!

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Where are AutoDateLocator and AutoDateFormatter?

2009-05-18 Thread Christopher Barker

John Hunter wrote:

chris.bar...@noaa.gov wrote:
I updated the plot_dates docstring in svn to point to matplotlib.dates


great, thanks!


Not all of the methods currently support direct date/unit plotting,
but we do try to extend support when we have reported failures, so if
you post a script which exposes the problem I'll try and fix it.


OK. Enclosed. If you uncomment the date2num call, it works fine, but 
it crashes as it is.


Thanks,
-Chris



--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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


quiver_date_test.py
Description: application/python
--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] ANN: matplotlib-0.98.5.3

2009-05-18 Thread Christopher Barker
John Hunter wrote:
 I have uploaded the source and OSX binaries for the bugfix release of
 matplotlib-0.98.5.3 to
 
   
 http://sourceforge.net/project/showfiles.php?group_id=80706package_id=278194

great, thanks!

Note that the Mac binaries are kind of mis-named:

matplotlib-0.98.5.3-py2.5-macosx10.5.zip

That implies that they only work on 10.5, but AFAICT, it is built for 
the python.org python, which works on 10.3.9 and above. In any case, it 
seems to work for me on 10.4

something like:

matplotlib-0.98.5.3-python.org-2.5-macosx.mpkg.zip

might be better.

But it works, which is the bigger deal!

Thanks to all that contributed.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Where are AutoDateLocator and AutoDateFormatter?

2009-05-15 Thread Christopher Barker
Hey folks,

IN old mailing list messages, I see reference to:

mpl.ticker.AutoDateLocator
mpl.ticker.AutoDateFormatter


Where might I find these now? They don't seem to be in matplotlib.ticker 
or matplotlib.date. do they have a new name? Is there a new way to get 
automatic date tic location and formating?

note: I'm trying to do this for the x axis of a quiver plot, which 
doesn't seem to support passing in dates directly.

Thanks,

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Stick Plot?

2009-05-13 Thread Christopher Barker

Eric Firing wrote:

Christopher Barker wrote:

Has anyone used MPL to make stick plots? If so, can I borrow your code?


If no one volunteers anything, then I suggest using quiver(..., 
headlength=0, headwidth=0, headaxislength=0), together with 
quiverkey(...).  This will effectively give you a stick plot, with lots 
of flexibility.


I've got a start enclosed. I'm having trouble with a few issues:

1) I'd like to be able to pass in datetime objects for the x axis, but 
that doesn't seem to be supported -- is that a bug? (uncomment the 
datetime list comp to see the error)


2) I'm a little confused about what to put on the y axis -- stick plots 
often use the y axis to provide a scale for the velocites, but I can't 
figure out what units I'd use there -- quiver is scaling the arrows, 
so I don't know what units they are in.


3) it seemed like I should be able to use angles=array to pass in the 
angles directly, but that didn't work for me.


 It could be implemented more efficiently in any of 
several ways, but it would take work to do it well.


yup -- and the whole LineCollection/transforms thing confuses me anyway...

Any suggestions to improve this?

-Chris


--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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


StickPlot.py
Description: application/python
--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] copied text

2009-05-08 Thread Christopher Barker
Michael Droettboom wrote:
 examples of embedding matplotlib inside of a wxPython GUI here:
 
 http://matplotlib.sourceforge.net/examples/user_interfaces/index.html

I'd also check out wxMPL, it's a nice way to embedMPL in a GUI:

http://agni.phys.iit.edu/~kmcivor/wxmpl/

-CHB






-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Stick Plot?

2009-05-06 Thread Christopher Barker
Hi folks,

Has anyone used MPL to make stick plots? If so, can I borrow your code?

http://tabs.gerg.tamu.edu/Tglo/RTA/N/Oceanographic_CurrentStick_30.html

Thanks,

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

NOAA/ORR/HAZMAT (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Stick Plot?

2009-05-06 Thread Christopher Barker
Eric Firing wrote:
 Christopher Barker wrote:
 Has anyone used MPL to make stick plots? If so, can I borrow your code?
 If no one volunteers anything, then I suggest using quiver(..., 
 headlength=0, headwidth=0, headaxislength=0), together with 
 quiverkey(...).  This will effectively give you a stick plot, with lots 
 of flexibility.

Thanks, I was thinking that quiver() would get direction wrong, as the x 
and y scales are in totally different units, but it looks like that's 
not the case if you use the angles keyword:

angles: [‘uv’ | ‘xy’ | array]
 With the default ‘uv’, the arrow aspect ratio is 1, so that if 
U*==*V the angle of the arrow on the plot is 45 degrees CCW from the 
x-axis. With ‘xy’, the arrow points from (x,y) to (x+u, y+v). 
Alternatively, arbitrary angles may be specified as an array of values 
in degrees, CCW from the x-axis.

   It could be implemented more efficiently in any of
 several ways, but it would take work to do it well.

I hope I'll get time to do that, but I don't really like quiver stick 
plots anyway. I prefer plots (that I don't know the name of) that:


Time is on the x axis

Magnitude of the velocity is the x axis

At each data point, there is a dot, and the direction is given with a 
unit-length arrow originating at that dot, in the direction of the 
observation.

I wrote a version of this a while back with the old MPL transforms 
mechanism, but haven't taken the time to translate it.

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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


--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] O pylab why do you refuse to import?

2009-05-06 Thread Christopher Barker
John Seales wrote:
 Hi- I'm writing again. 
 
 I managed to switch my python version to 2.5, and reloaded numpy and 
 matplotlib.

how did you install matplotlib?

  Unfortunately, pylab still will not load:
 ImportError: 
 dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so,
  2): Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
   Referenced from: 
 /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so
   Reason: image not found
 
 What is going on? Is ft2font.so broken?

does that file exist?

If so, try running:

$ file ft2font.so

and see what it says -- it may be a PPC- only binary.


 I'm using python 2.5.2 on a macbook, intel microprocessor, mac os 10.4.11

-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] using MPL and ipython run command

2009-05-06 Thread Christopher Barker
Hi all

I'm sure this is documented somewhere, but I can't find it.

I'm finally getting around to learning ipython, which is pathetic as it 
sure seems like a great tool.

Anyway, I want to be able to have a simple script that does some 
plotting with MPL, and run it with python's run. Then change the 
script and run again, and have the plot updated -- this does not seem to 
happen. It appears to work if I close th figure by clicking on the 
Window close button, then run, but that's kind of a pain.

What am I missing?

example script:


import matplotlib.pyplot as plt
import numpy as np

x = (1,2,3,4,5,6,7,8)
y = (6,2,6,4,6,4,7,5)

plt.plot(x, y)
plt.grid('on')
plt.show()


the I want to be able to do:


In [32]: run test_ipython.py

get a plot, then change some of the numbers in the script and:

In [33]: run test_ipython.py

then get an updated plot.

It's not doing that now.


what am I missing?

thanks,
-Chris






-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] using MPL and ipython run command

2009-05-06 Thread Christopher Barker
Eric Firing wrote:
 What am I missing?
 
 Try ipython -pylab.

oops, sorry -- I'm already doing that. If I don't do that, then the 
show() command blocks ipython -- that's not happening, I'm just not 
getting new plots when it's called again.

thanks,
-Chris



 Eric
 

 example script:


 import matplotlib.pyplot as plt
 import numpy as np

 x = (1,2,3,4,5,6,7,8)
 y = (6,2,6,4,6,4,7,5)

 plt.plot(x, y)
 plt.grid('on')
 plt.show()


 the I want to be able to do:


 In [32]: run test_ipython.py

 get a plot, then change some of the numbers in the script and:

 In [33]: run test_ipython.py

 then get an updated plot.

 It's not doing that now.


 what am I missing?

 thanks,
 -Chris






 


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] O pylab why do you refuse to import?

2009-05-06 Thread Christopher Barker
note: make sure to include the list, it doesn't look like you did.

John Seales wrote:
 Here's what it says:
 
 $ file ft2font.so
 ft2font.so: Mach-O universal binary with 2 architectures
 ft2font.so (for architecture i386): Mach-O bundle i386
 ft2font.so (for architecture ppc):  Mach-O bundle ppc

that's right, but now I see that that wasn't the issue anyway:

ImportError: 
 dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so,
  
 2): Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
Referenced from: 
 /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ft2font.so

ft2font is relying on libfreetype. I think that's the one that Apple 
delivers with their X11 (I know I have it, anyway), but I think X11 is 
an optional install, so you may not have it.

Is that file there? ON my system:

$ file /usr/X11R6/lib/libfreetype.6.dylib
/usr/X11R6/lib/libfreetype.6.dylib: symbolic link to `libfreetype.6.3.dylib'

and

$ file /usr/X11R6/lib/libfreetype.6.3.dylib
/usr/X11R6/lib/libfreetype.6.3.dylib: Mach-O dynamically linked shared 
library ppc

so I have it, and it's a ppc lib, which makes sense, as I'm running on a 
ppc machine.


If you don't have it, probably the easiest thing to do is install 
Apple's X11 -- otherwise, perhaps MPL should be built against a static 
libfreetype.

-Chris





-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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

--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] using MPL and ipython run command

2009-05-06 Thread Christopher Barker
Gökhan SEVER wrote:
 You may add these two lines:
 
 fig = plt.figure()
 fig.clear()

I thought I'd tried that (at least I'd tries plt.clf() ), but indeed, 
that takes care of it. I'm a bit confused as to why that is necessary, 
but at least it's working for me.

thanks,
-Chris



 It should give what you want to see.
 
 Gökhan
 
 
 
 On Wed, May 6, 2009 at 6:09 PM, Christopher Barker
 chris.bar...@noaa.gov wrote:
 Hi all

 I'm sure this is documented somewhere, but I can't find it.

 I'm finally getting around to learning ipython, which is pathetic as it
 sure seems like a great tool.

 Anyway, I want to be able to have a simple script that does some
 plotting with MPL, and run it with python's run. Then change the
 script and run again, and have the plot updated -- this does not seem to
 happen. It appears to work if I close th figure by clicking on the
 Window close button, then run, but that's kind of a pain.

 What am I missing?

 example script:


 import matplotlib.pyplot as plt
 import numpy as np

 x = (1,2,3,4,5,6,7,8)
 y = (6,2,6,4,6,4,7,5)

 plt.plot(x, y)
 plt.grid('on')
 plt.show()


 the I want to be able to do:


 In [32]: run test_ipython.py

 get a plot, then change some of the numbers in the script and:

 In [33]: run test_ipython.py

 then get an updated plot.

 It's not doing that now.


 what am I missing?

 thanks,
 -Chris






 --
 Christopher Barker, Ph.D.
 Oceanographer

 Emergency Response Division
 NOAA/NOS/ORR(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

 --
 The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
 production scanning environment may not be a perfect world - but thanks to
 Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
 Series Scanner you'll get full speed at 300 dpi even with all image
 processing features enabled. http://p.sf.net/sfu/kodak-com
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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


--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] using MPL and ipython run command

2009-05-06 Thread Christopher Barker
Christopher Barker wrote:
 Gökhan SEVER wrote:
 You may add these two lines:

 fig = plt.figure()
 fig.clear()
 
 I thought I'd tried that (at least I'd tries plt.clf() ), but indeed, 
 that takes care of it. I'm a bit confused as to why that is necessary, 
 but at least it's working for me.

oops, no it doesn't -- what that does is give me a new figure each time, 
so I get a big stack of them. So I tried:

fig = plt.figure(1)
fig.clear()

then I didn't get a new figure, but I didn't get the figure updated, 
either -- could this be a back-end bug? I'm using wxAgg, and IIRC, the 
refreshing code is pretty messed up..

Off to try TK

-Chris

-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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


--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Stick Plot?

2009-05-06 Thread Christopher Barker
Gökhan SEVER wrote:
 Mayavi has a quiver3d function
 (http://code.enthought.com/projects/mayavi/docs/development/html/mayavi/auto/mlab_helper_functions.html#quiver3d)
 if you want to go a fancier way :)

which is cool, but Im looking to plot a time series of a (2d) vector 
quantity at a single point.

 Also what
 you showed in your original post seem a little like wind-barbs, well
 except without notches.

yup -- stick plots are commonly used for wind data.

-Chris


 Gökhan
 
 
 
 On Wed, May 6, 2009 at 4:46 PM, Christopher Barker
 chris.bar...@noaa.gov wrote:
 Eric Firing wrote:
 Christopher Barker wrote:
 Has anyone used MPL to make stick plots? If so, can I borrow your code?
 If no one volunteers anything, then I suggest using quiver(...,
 headlength=0, headwidth=0, headaxislength=0), together with
 quiverkey(...).  This will effectively give you a stick plot, with lots
 of flexibility.
 Thanks, I was thinking that quiver() would get direction wrong, as the x
 and y scales are in totally different units, but it looks like that's
 not the case if you use the angles keyword:

 angles: [‘uv’ | ‘xy’ | array]
 With the default ‘uv’, the arrow aspect ratio is 1, so that if
 U*==*V the angle of the arrow on the plot is 45 degrees CCW from the
 x-axis. With ‘xy’, the arrow points from (x,y) to (x+u, y+v).
 Alternatively, arbitrary angles may be specified as an array of values
 in degrees, CCW from the x-axis.

It could be implemented more efficiently in any of
 several ways, but it would take work to do it well.
 I hope I'll get time to do that, but I don't really like quiver stick
 plots anyway. I prefer plots (that I don't know the name of) that:


 Time is on the x axis

 Magnitude of the velocity is the x axis

 At each data point, there is a dot, and the direction is given with a
 unit-length arrow originating at that dot, in the direction of the
 observation.

 I wrote a version of this a while back with the old MPL transforms
 mechanism, but haven't taken the time to translate it.

 -Chris




 --
 Christopher Barker, Ph.D.
 Oceanographer

 Emergency Response Division
 NOAA/NOS/ORR(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


 --
 The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
 production scanning environment may not be a perfect world - but thanks to
 Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
 Series Scanner you'll get full speed at 300 dpi even with all image
 processing features enabled. http://p.sf.net/sfu/kodak-com
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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


--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] using MPL and ipython run command

2009-05-06 Thread Christopher Barker
Gökhan SEVER wrote:
 I am playing with some other commands to achieve updating on the same
 figure, no luck yet.
 
 I guess that is what you actually been trying to see? Update the
 figure content without opening another one?

right.

Christopher Barker wrote:

 oops, no it doesn't -- what that does is give me a new figure each time, 
 so I get a big stack of them. So I tried:
 
 fig = plt.figure(1)
 fig.clear()
 
 then I didn't get a new figure, but I didn't get the figure updated, 
 either -- could this be a back-end bug? I'm using wxAgg, and IIRC, the 
 refreshing code is pretty messed up..
 
 Off to try TK

OK, with TK, it does refresh when I expect it to. So now to write a new 
thread, on a wxAgg refresh bug.

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(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


--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


  1   2   3   >