[Matplotlib-users] can't get basemap working: undefined symbol: PyUnicodeUCS4_DecodeUTF8

2009-09-13 Thread nbv4

I was able to get it working on my home machine, but can't get it installed
on my webhost. I get this error when I try to import the module:

--

Python 2.6 (r26:66714, Apr 30 2009, 20:04:43) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type help, copyright, credits or license for more information.
(InteractiveConsole)
 from mpl_toolkits.basemap import Basemap
/home/nbv4/lib/python2.6/dbflib/dbflib.py:2: RuntimeWarning: Python C API
version mismatch for module dbflibc: This Python has API version 1013,
module dbflibc has version 1012.
  import dbflibc
/home/nbv4/lib/python2.6/shapelib/shapelib.py:2: RuntimeWarning: Python C
API version mismatch for module shapelibc: This Python has API version 1013,
module shapelibc has version 1012.
  import shapelibc
Traceback (most recent call last):
  File console, line 1, in module
  File /home/nbv4/lib/python2.6/mpl_toolkits/basemap/__init__.py, line 43,
in module
import _geoslib, netcdftime
ImportError: /home/nbv4/lib/python2.6/_geoslib.so: undefined symbol:
PyUnicodeUCS4_DecodeUTF8

---

Any ideas as to what may be causing this?
-- 
View this message in context: 
http://www.nabble.com/can%27t-get-basemap-working%3A-undefined-symbol%3A-PyUnicodeUCS4_DecodeUTF8-tp25420971p25420971.html
Sent from the matplotlib - users mailing list archive at Nabble.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


Re: [Matplotlib-users] plotting asymmetric error bars?

2009-09-13 Thread Gary Ruben
Hi Per,

You need 2*N, not N*2 arrays here. I think you're also trying to use 
absolute values so you probably need something like this:

plt.errorbar([1,2,3],[1,2,3],yerr=np.abs(a.T-[1,2,3]))

I hope this is what you're after,

Gary R.

per freem wrote:
 hi all,
 
 i am trying to plot asymmetric yaxis error bars. i have the following code:
 
 import matplotlib.pyplot as plt
 a = array([[ 0.5,  1.5],
[ 0.7,  2.2],
[ 2.8,  3.1]])
 plt.errorbar([1,2,3],[1,2,3],yerr=a)
snip

--
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] Problem in svn install

2009-09-13 Thread davide lasagna
Thanks,
I thougth that this could be the problem. Actually i fixed it by myself.
Thanks anyway.

Cheers

Davide
--
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] adjusting width of subplot columns

2009-09-13 Thread Neil Crighton
per freem perfr...@... writes:
 
 hi all,
 
 i have a 3x2 subplot figure, and i would like to adjust the relative
 width of the second column. in other words, if i have:
 

I set the axes positions by hand in these situations using add_axes(). So:

fig = plt.figure()
width1 = 0.3
width2 = 0.2
height = 0.75 / 3
left = 0.1
bottom = 0.15

axes_column0 = []
for i in range(3):
axes_column0.append(fig.add_axes([left, bottom + i*height, width1, 
  height]))
axes_column1 = []
for i in range(3):
axes_column1.append(fig.add_axes([left+width1, bottom + i*height, 
  width2, height]))
axes_column2 = []
for i in range(3):
axes_column2.append(fig.add_axes([left+width1+width2, bottom + i*height, 
  width1, height]))

You can adjust this slightly if you want to put gaps between the subplots, 
or otherwise use axes.set_yticklabels([]) (for example) to get rid of 
unwanted tick labels.

Plot to each of the subplots using something like:

axes_column0[1].plot(x,y)



Neil





--
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] quiver with angles

2009-09-13 Thread magnus_p

I tried the code you supplied and I didn't get it to work with the *angles*
keyword, I got:
ValueError: shape mismatch: objects cannot be broadcast to a single shape
I have matplotlib.__version__ = '0.98.5.2'.

Although after thinking about it for a while I did:

from scipy import *
import matplotlib.pyplot as plt

X,Y = meshgrid(arange(64),arange(64)) # a bit bigger just to see what it
looks like
angles = arange(0,4*pi,4.*pi/X.size) # just creating a set of angles

u = cos(angles)
v = sin(angles)

c = arange(u.size) # the colours!
c.shape = X.shape
plt.quiver(X, Y, u, v, c, pivot='middle',minlength=0.04, width=0.05,
headwidth=1,scale=50)

that is, the angles are converted to u and v parameters.

Anyway. That is how I got it working.



efiring wrote:
 
 
 Example with ipython -pylab:
 
 x = arange(4)
 y = arange(5)
 X, Y = meshgrid(x, y)
 u = ones_like(X)
 v = zeros_like(X)
 c = arange(u.size)  # values mapped to colors
 angles = (X * 20 + Y * 20).ravel()
 quiver(X, Y, u, v, c, angles=angles)
 axis([-1, 4, -1, 5])
 
 
 The .ravel() of the angles is to get around a bug that I fixed a few 
 minutes ago in svn.
 
 Eric
 
 
 --
 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
 
 

-- 
View this message in context: 
http://www.nabble.com/quiver-with-angles-tp25397027p25422103.html
Sent from the matplotlib - users mailing list archive at Nabble.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


[Matplotlib-users] [job] top-flight graphicist needed for climate science media group

2009-09-13 Thread Andrew Straw
I am posting this for a friend of mine. Please respond to the email 
address in the ad if you are interested.


-- Forwarded message --
From: *Ben Strauss* bstra...@climatecentral.org 
mailto:bstra...@climatecentral.org

Date: Fri, Sep 11, 2009 at 4:56 PM
Subject: [job] top-flight graphicist needed for climate science  media 
group
To: matplotlib-users@lists.sourceforge.net 
mailto:matplotlib-users@lists.sourceforge.net



Please apply if interested--or forward to any associates you believe 
would be good!  Much appreciated; this is a very important position for 
us and we're looking for a real star.  Many thanks--


Ben Strauss
Associate Director, Strategic Initiatives
Climate Central


 Seeking Immediately:


   Experienced Graphic Designer for Climate Science  Media Group's TV,
   Web Productions


 Objective

Climate Central seeks an experienced, inspired and technically 
proficient graphic designer or data visualization expert--ideally versed 
in both art and science--to develop conceptual and data-driven 
visualizations from climate science research for broadcast TV and 
Internet.  A group of internationally recognized scientists and 
communicators, Climate Central is dedicated to producing vivid media 
based on sound climate change science, and has within its first 18 
months already appeared on PBS's The NewsHour with Jim Lehrer, 
nytimes.com http://nytimes.com/, bloomberg.com 
http://bloomberg.com/, TIME.com, Newsweek and Scientific American.  We 
will begin this Princeton, NJ position as a 90-day contract; successful 
performance will lead to full-time hire.



 Description

Climate change presents one of the greatest communications challenges of 
all time.  Many words have been printed, but Climate Central aims to 
develop an unmatched collection of clear, compelling, and science-based 
graphics and animations to tell the story visually.  We are currently 
expanding capacity in this area.


The Designer will collaborate with staff scientists and producers, as 
well as design colleagues, to produce static graphics and end-to-end 
broadcast-quality animated visualizations tailored for a general 
audience.  Each product must be accessible and understandable, yet vivid 
and scientifically rigorous.


The position will involve the development, maintenance, and application 
of a wide variety of tools for analyzing data and production, with some 
emphasis on tools for geographical display of information (GIS, Google 
Earth, Google Maps, generic maps).  An important dimension of this 
position will be working with NASA scientists and satellite data to 
develop an Earth-from-space “sky witness” collection of climate change 
visualizations.


For a sample of Climate Central's designs and animations to date, see 
the static graphics and videos at climatecentral.org 
http://climatecentral.org/.



 Qualifications

Significant experience (5+ years best) in scripting, data conversion, 
modeling, rendering and compositing, and handling large datasets, is 
required.  Candidate should show initiative and be a self-starter and 
self-teacher able to work well from high-level direction.  We are 
looking for someone with commitment to excellence, attention to detail, 
and passion for work and the subject.


Applicants should be proficient with the following tools, languages and 
data formats we regularly use:


•Maya, After Effects, Illustrator, Photoshop, Google Earth/Maps
•Python, Javascript
•ESRI Shapefile, KML

...and it would also be helpful if you are familiar with:

•MATLAB/Octave, VTK, Blender, Imagemagick, Gimp, QGIS, GDAL/OGR, 
NCAR NCL

•C/C++
•NetCDF, CSV, HDF


 To Apply

To apply, please send a cover letter, resume and link to your portfolio. 
We are looking for thoughtful, personalized cover letters that 
demonstrate applicants' qualifications and work style. Send materials as 
text in the body of an email message to j...@climatecentral.org 
mailto:j...@climatecentral.org; please put graphics in the subject 
line. If you send attachments, they must be in pdf format.


No phone calls, please.

Salary is competitive and will depend on experience. Climate Central 
offers excellent benefits, a delightful workplace, and the opportunity 
to play a crucial role in an organization with a mission.


Climate Central is an equal-opportunity employer and does not 
discriminate based on anything except how good you are at your work. 
People of color and individuals from other underrepresented groups are 
strongly encouraged to apply.



 About Climate Central:

Climate Central combines sound science and vivid media to increase 
public understanding and attention to the climate challenge.  In less 
than two years of operation, our work has already appeared on PBS 
NewsHour, nytimes.com http://nytimes.com/, bloomberg.com 
http://bloomberg.com/, time.com http://time.com/, newsweek.com 
http://newsweek.com/, Scientific American, and beyond.  Our staff