Re: [Matplotlib-users] OT warning! Re: Plotting in C++ (Christopher Barker)

2008-03-26 Thread Tony Mannucci
At 10:03 AM -0700 3/25/08, 
[EMAIL PROTECTED] wrote:
>Message: 1
>Date: Tue, 25 Mar 2008 09:43:14 -0700
>From: Christopher Barker <[EMAIL PROTECTED]>
>Subject: [Matplotlib-users] OT warning! Re:  Plotting in C++
>To: 'matplotlib-users' 
>Cc: Francesco Biscani <[EMAIL PROTECTED]>
>Message-ID: <[EMAIL PROTECTED]>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>

I would add that the enhanced productivity of dynamic languages leads 
to fewer bugs in the code. I cannot prove that, but that's been my 
experience.

There is one clear advantage to statically-typed languages in my 
opinion: performance. That one reason can be very important.

-Tony

-- 
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
  Mail-Stop 138-308, Tel > (818) 354-1699
  Jet Propulsion Laboratory,  Fax > (818) 393-5115
  California Institute of Technology, Email > [EMAIL PROTECTED]
  4800 Oak Grove Drive,   http://genesis.jpl.nasa.gov
  Pasadena, CA 91109

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] basemap failure

2007-12-26 Thread Tony Mannucci
At 1:30 PM -0600 12/26/07, John Hunter wrote:
>On Dec 26, 2007 1:15 PM, Tony Mannucci 
><[EMAIL PROTECTED]> wrote:
>>  I tried to install basemap 0.9.8 on an OS X system (PPC, 10.4.10),
>>  after installing matplotlib from the latest binary package (0.91.1).
>>  I receive the following error:
>>
>>  >ImportError: No module named pkg_resources
>
>It looks like you need to install setuptools:
>
>http://peak.telecommunity.com/DevCenter/EasyInstall

John,

Yes, thank you. That did the trick. I did setuptools. I guess 
EasyInstall is another package build on that.

http://cheeseshop.python.org/pypi/setuptools

-Tony

-- 
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
  Mail-Stop 138-308, Tel > (818) 354-1699
  Jet Propulsion Laboratory,  Fax > (818) 393-5115
  California Institute of Technology, Email > [EMAIL PROTECTED]
  4800 Oak Grove Drive,   http://genesis.jpl.nasa.gov
  Pasadena, CA 91109

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] basemap failure

2007-12-26 Thread Tony Mannucci
I tried to install basemap 0.9.8 on an OS X system (PPC, 10.4.10), 
after installing matplotlib from the latest binary package (0.91.1). 
I receive the following error:

>[matplotlib/basemap-0.9.8]|2> import matplotlib.toolkits.basemap
>---
>ImportError   Traceback (most recent call last)
>
>/Users/mannucci/Documents/python/matplotlib/basemap-0.9.8/console> in ()
>
>/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/toolkits/basemap/__init__.py
> 
>in ()
>> 1 from basemap import __doc__, __version__
>   2 from basemap import *
>
>/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/toolkits/basemap/basemap.py
> 
>in ()
>  29 from matplotlib.cbook import is_scalar, dedent
>  30 from shapelib import ShapeFile
>---> 31 import _geos, pupynere
>  32
>  33 # basemap data files now installed in 
>lib/matplotlib/toolkits/basemap/data
>
>/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/toolkits/basemap/pupynere.py
> 
>in ()
>  34 from numpy import ndarray, empty, array, ma, squeeze
>  35
>---> 36 from dap.client import open as open_remote
>  37 from dap.dtypes import ArrayType, GridType, typemap
>  38
>
>/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/dap/__init__.py
> 
>in ()
>   8
>   9 For more information about the protocol, please check 
>http://opendap.org.
>  10 """
>  11
>---> 12 __import__('pkg_resources').declare_namespace(__name__)
>
>ImportError: No module named pkg_resources

It seems that the dap package did not completely install. Is there a 
directory I should add to my sys.path? Thanks for your help!

-Tony

-- 
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
  Mail-Stop 138-308, Tel > (818) 354-1699
  Jet Propulsion Laboratory,  Fax > (818) 393-5115
  California Institute of Technology, Email > [EMAIL PROTECTED]
  4800 Oak Grove Drive,   http://genesis.jpl.nasa.gov
  Pasadena, CA 91109

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] multiple (>2) y-axes

2007-10-05 Thread Tony Mannucci
Here's some (incomplete) code snippets I used to place an extra 
x-axis below the normal one. I hope this helps. I agree that more 
axes can always be added at an arbitrary offset, although I did not 
try that.

import numpy as N
import matplotlib
matplotlib.use("TkAgg")
import pylab as PLT
from matplotlib.font_manager import FontProperties # For setting 
legend font props.


 f1 = PLT.figure(1, figsize=(7.5,4.0))
 ax1 = f1.add_axes([0.2, 0.25, 0.6, 0.6]) # This is "normal" axis
 PLT.hold(False)
 ax1.set_autoscale_on(False) # So that I can turn off autoscaling
 PLT.plot(lt, drift, '-', linewidth=3, label=legtext)

 # This axis is LT. Set the ticks manually.
 xticks = N.array([5.0, 8.0, 11.0, 14.0, 17.0, 20.0])
 ax1.set_xticks(xticks.tolist())
 ax1.set_autoscale_on(False) # So that I can turn off autoscaling

 # Now manually create the second axis (UT) slightly below
 PLT.hold(False)
 ax2 = f1.add_axes([0.2, 0.15, 0.6, 0.6], frameon=False)
 ax2.set_yticks([])
 # Apply offset to get UT scale for second axis
 ax2.set_xlim([xticks[0]+offset, xticks[len(xticks)-1]+offset])
 ax2.set_xticks((xticks+offset).tolist())
 # Make tick lines invisible
 xtl = PLT.getp(ax2, 'xticklines')
 PLT.setp(xtl, 'visible', False)
 # Label the X ticks for first (LT) and second (UT) axes
 PLT.text(1.1, -0.1, 'LT', transform=ax1.transAxes)
 PLT.text(1.1, -0.25, 'UT', transform=ax1.transAxes)

-Tony

-- 
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
  Mail-Stop 138-308, Tel > (818) 354-1699
  Jet Propulsion Laboratory,  Fax > (818) 393-5115
  California Institute of Technology, Email > [EMAIL PROTECTED]
  4800 Oak Grove Drive,   http://genesis.jpl.nasa.gov
  Pasadena, CA 91109

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] OS X: upgrade to X11 1.1.3 breaks mpl FIX

2006-11-25 Thread Tony Mannucci
Chris,

Yes, well I probably installed libfreetype myself, as part of the 
source installs. I know very little about these internals, so I did 
nothing "on purpose." It's disconcerting that the X11 update 
overwrote things in this way. Luckily, it appears there are no other 
side effects. The fix was possible because of good error reporting 
from mpl.

Thanks for your comments.

-Tony

At 7:53 AM -0800 11/22/06, Christopher Barker wrote:
>Tony Mannucci wrote:
>>If you saw my previous post about upgrading to XDarwin 1.1.3, and 
>>breaking matplotlib, the following seems to work:
>>
>>Soft-linking to libfreetype.6.3.8.dylib rather than 
>>libfreetype.6.3.dylib (see below, copied from previous email).
>
>That's interesting. I don't have a 6.3.8, only 6.3 (and 6, linked to 
>6.3). I did just install the latest Apple X11 update.
>
>Also, in the past, MPL has been know not to work with Apple's X11 
>libfreetype. I wonder if you had installed 6.3.8 yourself. That 
>would have explained it, in that usually if you install, for 
>instance, 6.3.8, there would be a link from 6.3 to 6.3.8, which may 
>have been what you linked to originally. Then, if Apple provided a 
>new 6.3 with their X11, it overwrote yours.
>
>I do note that your 6.3.8 is MUCH larger than 6.3, which is a bit curious.
>
>Anyway, most of us end up linking MPL statically against a 
>self-installed libfreetype, just for these reasons.
>
>-Chris
>
>
>
>--
>Christopher Barker, Ph.D.
>Oceanographer
>
>Emergency Response Division
>NOAA/NOS/OR&R(206) 526-6959   voice
>7600 Sand Point Way NE   (206) 526-6329   fax
>Seattle, WA  98115   (206) 526-6317   main reception
>
>[EMAIL PROTECTED]


-- 
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
  Mail-Stop 138-308, Tel > (818) 354-1699
  Jet Propulsion Laboratory,  Fax > (818) 393-5115
  California Institute of Technology, Email > [EMAIL PROTECTED]
  4800 Oak Grove Drive,   http://genesis.jpl.nasa.gov
  Pasadena, CA 91109

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] OS X: upgrade to X11 1.1.3 breaks mpl FIX

2006-11-21 Thread Tony Mannucci
If you saw my previous post about upgrading to XDarwin 1.1.3, and 
breaking matplotlib, the following seems to work:

Soft-linking to libfreetype.6.3.8.dylib rather than 
libfreetype.6.3.dylib (see below, copied from previous email).

Thanks for that Apple!

-Tony


>  >>> import numpy as N
>>>>  N.__version__
>'0.9.6'
>>>>  import matplotlib
>>>>  matplotlib.__version__
>'0.87.2'
>>>>  import pylab as PLT
>Traceback (most recent call last):
>   File "", line 1, in ?
>   File 
>"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/pylab.py",
> 
>line 1, in ?
> from matplotlib.pylab import *
>   File 
>"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py",
> 
>line 200, in ?
> from axes import Axes, PolarAxes
>   File 
>"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py",
> 
>line 15, in ?
> from axis import XAxis, YAxis
>   File 
>"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axis.py",
> 
>line 25, in ?
> from font_manager import FontProperties
>   File 
>"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/font_manager.py",
> 
>line 39, in ?
> from matplotlib import ft2font
>ImportError: Failure linking new module: 
>/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/ft2font.so:
> 
>Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib
>   Referenced from: 
>/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/ft2font.so
>   Reason: Incompatible library version: ft2font.so requires version 
>10.0.0 or later, but libfreetype.6.dylib provides version 6.3.0

I note that in /usr/X11R6/lib that softlinks to the libraries 
mentioned above were recently changed:

>/usr/X11R6/lib
>jplajm:8:lib $ ll libfree*
>-rwxr-xr-x   1 root  wheel  1786588 Apr 28  2006 libfreetype.6.3.8.dylib
>-rw-r--r--   1 root  wheel   683560 Nov  6 17:31 libfreetype.6.3.dylib
>lrwxr-xr-x   1 root  wheel   21 Nov 21 09:07 libfreetype.6.dylib 
>-> libfreetype.6.3.dylib
>-rw-r--r--   1 root  wheel  1907688 Apr 28  2006 libfreetype.a
>lrwxr-xr-x   1 root  wheel   21 Nov 21 09:07 libfreetype.dylib 
>-> libfreetype.6.3.dylib
>-rwxr-xr-x   1 root  wheel  836 Apr 28  2006 libfreetype.la


-- 
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
  Mail-Stop 138-308, Tel > (818) 354-1699
  Jet Propulsion Laboratory,  Fax > (818) 393-5115
  California Institute of Technology, Email > [EMAIL PROTECTED]
  4800 Oak Grove Drive,   http://genesis.jpl.nasa.gov
  Pasadena, CA 91109

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bug report

2006-06-29 Thread Tony Mannucci
John,

They do behave independently. This is about default behavior. Here 
are some examples (unverified), that assume some standard matplotlib 
rc file.

Ex 1:
No color specified.
MPL and matlab result: both line and marker edge have same default color.

Ex 2:
Set the color with the plot command, e.g. 'r+-' string.
matlab result: both marker and line are red.
MPL result: line is red, marker remains default blue.

Ex 3:
Set colors explicitly, e.g. 'ro-', 'markerfacecolor'=[0,1,0]
matlab and MPL result: line is red, marker face is green.  I 
**believe** that in MPL the marker edge will remain default blue, 
since it is not set explicitly. In matlab, the marker edge will pick 
up the red line color.

Both approaches are reasonable, one simply has to know what to 
expect. In my case, being somewhat new to MPL, I was quite confused 
by how Ex 2 worked in MPL. Now I know better. The matlab approach 
requires somewhat less typing typically.

-Tony

At 8:23 AM -0500 6/29/06, John Hunter wrote:
>  >>>>> "Tony" == Tony Mannucci <[EMAIL PROTECTED]> writes:
>
> Tony> John, Thanks for the answer.
>
> Tony> My prime mistake was to assume that matlab behavior is
> Tony> mimicked in matplotlib. (I am not saying it should
> Tony> be!). matlab has a Line object and this includes the
> Tony> markers. So, what I called "bugs" was based on a false
> Tony> expectation. The matlab version of the code will produce
> Tony> lines and symbols of the same color.
>
> Tony> I will spend more time with the matplotlib manual and learn
> Tony> the differences with matlab, and make progress that way.
>
>Hmm, I didn't know matlab behaved this way.  I know matlab does have
>color, markerfacecolor and margeredgecolor, so I assumed that they
>would be controlled independently.  So the behavior is
>
>   set(l, 'color', 'red')
>
>and both the linestyle and markercolor are changed?
>
>
>JDH


-- 
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
  Mail-Stop 138-308, Tel > (818) 354-1699
  Jet Propulsion Laboratory,  Fax > (818) 393-5115
  California Institute of Technology, Email > [EMAIL PROTECTED]
  4800 Oak Grove Drive,   http://genesis.jpl.nasa.gov
  Pasadena, CA 91109

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bug report

2006-06-28 Thread Tony Mannucci
John,

Thanks for the answer.

My prime mistake was to assume that matlab behavior is mimicked in 
matplotlib. (I am not saying it should be!). matlab has a Line object 
and this includes the markers. So, what I called "bugs" was based on 
a false expectation. The matlab version of the code will produce 
lines and symbols of the same color.

I will spend more time with the matplotlib manual and learn the 
differences with matlab, and make progress that way.

Thanks again,

-Tony


>PLT.hold(False)
>PLT.plot(x,y,'+',color='k',linestyle='--')
>
> Tony> ***Symbol is blue (wrong), line is dashed and black (right)
>
>A single line object can have a linestyle and a marker and their
>colors are independent.  The "color" kwarg applies to the linestyle.
>The markerfacecolor and markeredgecolor kwargs control the marker
>color.
>


-- 
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
  Mail-Stop 138-308, Tel > (818) 354-1699
  Jet Propulsion Laboratory,  Fax > (818) 393-5115
  California Institute of Technology, Email > [EMAIL PROTECTED]
  4800 Oak Grove Drive,   http://genesis.jpl.nasa.gov
  Pasadena, CA 91109

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Bug report

2006-06-26 Thread Tony Mannucci
Let me know if this is not the appropriate way to report bugs.

Here is the example code:

import numpy as N
import matplotlib
matplotlib.use("TkAgg")
import pylab as PLT

x = N.array([1.,2.,3.,4.,5.])
y = N.array([2.2,3.3,4.4,5.5,6.6])
PLT.figure(1)
PLT.clf()
PLT.hold(False)
PLT.plot(x,y,'+',color='k',linestyle='--')

***Symbol is blue (wrong), line is dashed and black (right)

PLT.plot(x,y,'+',color=[0,0,0],linestyle='--')

***Same error as above

PLT.plot(x,y,'+r',linestyle='--')

***Works correctly (symbol and line are red)

PLT.axis([0.0,6.0,0.0,7.0])
PLT.xlabel('X Label',fontsize=18)
PLT.ylabel('Y label',fontsize=18)
PLT.title('TITLE',fontsize=24)
PLT.hold(True)

PLT.plot(x+0.1,y-0.2,'+r')

***ERROR: resets axis limits (is this an error? Note hold is on)

PLT.axis([0.0,6.0,0.0,7.0])

***Restores manual axes limits

>>>  matplotlib.__version__
'0.87.2'
>>>  N.__version__
'0.9.6'

-Tony

-- 
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
  Mail-Stop 138-308, Tel > (818) 354-1699
  Jet Propulsion Laboratory,  Fax > (818) 393-5115
  California Institute of Technology, Email > [EMAIL PROTECTED]
  4800 Oak Grove Drive,   http://genesis.jpl.nasa.gov
  Pasadena, CA 91109

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Possible bug in axvline

2006-06-15 Thread Tony Mannucci
axvline does not appear to work correctly. It appears to change the plot axes.

For example:

import matplotlib
import pylab as PLT
>>>  x
array([ 0.,  1.,  2.,  3.])
>>>  y
array([ 2.,  3.,  5.,  6.])
>>>  PLT.plot(x,y)
[]
>>>  PLT.axis([0.0,3.0,0.0,5.0])
[0.0, 3.0, 0.0, 5.0]
>>>  PLT.axvline(1.5)

>>>  PLT.axis()
[0.0, 3.0, 0.0, 6.0]

***NOTE changed plot axes!

>>>  matplotlib.__version__
'0.87.2'

The call to axvline changes the axis values. Seems to me it should not do that.

-Tony

-- 
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
  Mail-Stop 138-308, Tel > (818) 354-1699
  Jet Propulsion Laboratory,  Fax > (818) 393-5115
  California Institute of Technology, Email > [EMAIL PROTECTED]
  4800 Oak Grove Drive,   http://genesis.jpl.nasa.gov
  Pasadena, CA 91109


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