[matplotlib-devel] Problem installing basemap

2010-09-22 Thread Jeremy Lounds
Hello,

I am new to python, matplotlib and basemap, but I _am_ familiar with Linux.

I have dome some searching on this but am still not sure where I am
going wrong. It looks like basemap is being installed as an "egg" even
though I used this command when installing:

python setup.py install

When I try an example, it won't run ... "ImportError: No module named basemap"

Here are some additional details:

~$ uname -r
2.6.28-15-server

~$ cat /etc/issue
Ubuntu 9.04

~$ python --version
Python 2.6.2

I installed matplotlib, numpy and other requirements via the package management

~$ sudo apt-get install python-numpy-ext
~$ sudo apt-get install python-matplotlib
~$ sudo aptitude update && sudo aptitude install g++
~$ sudo apt-get install build-essential
~$ sudo apt-get install python-dev

~$ ls /usr/local/lib/libgeos*
/usr/local/lib/libgeos-3.2.0.so
/usr/local/lib/libgeos_c.so.1
/usr/local/lib/libgeos.a
/usr/local/lib/libgeos_c.so.1.6.0
/usr/local/lib/libgeos_c.a
/usr/local/lib/libgeos.la
/usr/local/lib/libgeos_c.la
/usr/local/lib/libgeos.so
/usr/local/lib/libgeos_c.so

When installing, here is the command I have been running and the
subsequent output

~/Downloads/basemap-1.0$ sudo python setup.py install
checking for GEOS lib in /home/myusername 
checking for GEOS lib in /usr 
checking for GEOS lib in /usr/local 
GEOS lib (version 3.2.0) found in /usr/local
checking to see if required version of pydap installed ..
pydap installed, checking version ...
pydap version OK, will not be installed
checking to see if httplib2 installed ..
httplib2 installed
checking to see if pyshapelib installed ..
pyshapelib installed
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands
--compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands
--fcompiler options
running build_src
building extension "mpl_toolkits.basemap._proj" sources
building extension "mpl_toolkits.basemap._geod" sources
building extension "_geoslib" sources
running build_py
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
running scons
running install_lib
running install_egg_info
Writing /usr/local/lib/python2.6/dist-packages/basemap-1.0.egg-info

~$ ls /usr/local/lib/python2.6/dist-packages/basemap-1.0*
/usr/local/lib/python2.6/dist-packages/basemap-1.0.egg-info

~$ ls /usr/local/lib/python2.6/dist-packages/mpl_toolkits
basemap
__init__.py
__init__.pyc

Sorry if this is too much info!

Thanks for any pointers.

~ Jeremy

--
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Problem installing basemap

2010-09-22 Thread Jeremy Lounds
Nevermind, I think I solved it...

$ cd /usr/local/lib/python2.6/dist-packages
$ sudo cp -R * /usr/lib/python2.6/dist-packages/

Maybe worth a note somewhere? Or maybe it is there, I just completely missed
the right configuration/installation step.

~ Jeremy


On Wed, Sep 22, 2010 at 2:00 PM, Jeremy Lounds  wrote:
> Hello,
>
> I am new to python, matplotlib and basemap, but I _am_ familiar with Linux.
>
> I have dome some searching on this but am still not sure where I am
> going wrong. It looks like basemap is being installed as an "egg" even
> though I used this command when installing:
>
> python setup.py install
>
> When I try an example, it won't run ... "ImportError: No module named basemap"
>
> Here are some additional details:
>
> ~$ uname -r
> 2.6.28-15-server
>
> ~$ cat /etc/issue
> Ubuntu 9.04
>
> ~$ python --version
> Python 2.6.2
>
> I installed matplotlib, numpy and other requirements via the package 
> management
>
> ~$ sudo apt-get install python-numpy-ext
> ~$ sudo apt-get install python-matplotlib
> ~$ sudo aptitude update && sudo aptitude install g++
> ~$ sudo apt-get install build-essential
> ~$ sudo apt-get install python-dev
>
> ~$ ls /usr/local/lib/libgeos*
> /usr/local/lib/libgeos-3.2.0.so
> /usr/local/lib/libgeos_c.so.1
> /usr/local/lib/libgeos.a
> /usr/local/lib/libgeos_c.so.1.6.0
> /usr/local/lib/libgeos_c.a
> /usr/local/lib/libgeos.la
> /usr/local/lib/libgeos_c.la
> /usr/local/lib/libgeos.so
> /usr/local/lib/libgeos_c.so
>
> When installing, here is the command I have been running and the
> subsequent output
>
> ~/Downloads/basemap-1.0$ sudo python setup.py install
> checking for GEOS lib in /home/myusername 
> checking for GEOS lib in /usr 
> checking for GEOS lib in /usr/local 
> GEOS lib (version 3.2.0) found in /usr/local
> checking to see if required version of pydap installed ..
> pydap installed, checking version ...
> pydap version OK, will not be installed
> checking to see if httplib2 installed ..
> httplib2 installed
> checking to see if pyshapelib installed ..
> pyshapelib installed
> running install
> running build
> running config_cc
> unifing config_cc, config, build_clib, build_ext, build commands
> --compiler options
> running config_fc
> unifing config_fc, config, build_clib, build_ext, build commands
> --fcompiler options
> running build_src
> building extension "mpl_toolkits.basemap._proj" sources
> building extension "mpl_toolkits.basemap._geod" sources
> building extension "_geoslib" sources
> running build_py
> running build_ext
> customize UnixCCompiler
> customize UnixCCompiler using build_ext
> running scons
> running install_lib
> running install_egg_info
> Writing /usr/local/lib/python2.6/dist-packages/basemap-1.0.egg-info
>
> ~$ ls /usr/local/lib/python2.6/dist-packages/basemap-1.0*
> /usr/local/lib/python2.6/dist-packages/basemap-1.0.egg-info
>
> ~$ ls /usr/local/lib/python2.6/dist-packages/mpl_toolkits
> basemap
> __init__.py
> __init__.pyc
>
> Sorry if this is too much info!
>
> Thanks for any pointers.
>
> ~ Jeremy
>

--
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Better to compile Python and libraries from source? If so, what version?

2010-09-22 Thread Jeremy Lounds
Hi,

I have another question for the group...

I saw in the archives someone else who was getting the error I am now
running in to now. He said he solved it by recompiling from sources. I
was wondering what version of Python is optimal for matplotlib and
basemap?

Or maybe somebody knows how I can fix this without compiling? I prefer
to use the package management for easier upgrades in the future.

In case anyone was curious about the error, it is "AttributeError:
'AxesSubplot' object has no attribute 'get_autoscalex_on'".

I was attempting to take one of the examples (simpletest.py) and use
"agg" to output to a image file, as outlined in the matplotlib
tutorial here:

http://matplotlib.sourceforge.net/faq/howto_faq.html?highlight=web#matplotlib-in-a-web-application-server

Thanks again,

~ Jeremy

--
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] County boundaries for mid-west (or all of USA)

2010-09-24 Thread Jeremy Lounds
Hello,

Sorry, its me again! I am not sure where else to ask this, so please
bear with me.

Does anyone know of a tutorial or source on how I could get county
boundaries ready to be plotted on my basemap output? I have
"drawstates" working wonderfully, and need something like
"drawcounties"

Thanks in advance!

~ Jeremy

--
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] County boundaries for mid-west (or all of USA)

2010-09-24 Thread Jeremy Lounds
Thanks, I was able to find the files I needed from here:

http://www.census.gov/geo/www/cob/co2000.html#shp

~ Jeremy


On Fri, Sep 24, 2010 at 6:13 PM, Benjamin Root  wrote:
> On Fri, Sep 24, 2010 at 4:27 PM, Jeremy Lounds  wrote:
>>
>> Hello,
>>
>> Sorry, its me again! I am not sure where else to ask this, so please
>> bear with me.
>>
>> Does anyone know of a tutorial or source on how I could get county
>> boundaries ready to be plotted on my basemap output? I have
>> "drawstates" working wonderfully, and need something like
>> "drawcounties"
>>
>> Thanks in advance!
>>
>> ~ Jeremy
>>
>
> Jeremy,
>
> If you have access to the shapefile for county boundaries, you can call
> basemap's readshapefile() function to draw the counties.  You can specify
> line properties just like you would for a call to plotting the state
> boundaries.
>
> As a matter of fact, drawstates() is, essentially, a call to
> readshapefile(), but it refers to a file that came packaged with basemap for
> convenience.
>
> I hope that helps,
> Ben Root
>
>

--
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Turning off the frame/border

2010-09-29 Thread Jeremy Lounds
Hello again,

I am not sure if this is a matplotlib question, or a basemap one. The
sample code I found on Google for this either broke my script or
didn't change the end result.

I am attempting to turn the border (frame?) off altogether. Here is
the script, with some sections kept out for brevity:



import sys
import matplotlib
matplotlib.use('agg')

from mpl_toolkits.basemap import Basemap
import numpy as np
import matplotlib.pyplot as plt

fig = plt.figure(figsize=(2.56,2.56),dpi=70,frameon=False,linewidth=0)
fig.set_frameon(False)

# as you can see, above are some of attempts at turning the border off

plt.subplots_adjust(left=0, bottom=0, right=1, top=1, wspace=None, hspace=None)

m = Basemap()

m.drawcoastlines()
fig.savefig("test.png")

-

Thank you in advance once again!

~ Jeremy

--
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Turning off the frame/border

2010-09-29 Thread Jeremy Lounds
On Wed, Sep 29, 2010 at 1:21 PM, Tony S Yu  wrote:
>
> On Sep 29, 2010, at 1:06 PM, Jeremy Lounds wrote:
>
>> I am attempting to turn the border (frame?) off altogether. Here is
>> the script, with some sections kept out for brevity:
>
>
> I'm assuming you're talking about turning off the frame around each axes (but 
> maybe you're talking about something else?). The "frameon" attribute in your 
> example code alters the background of the figure canvas, not the borders 
> surrounding each axes.
>
> There's probably a shorter way, but I have a small function that I use to 
> turn off the frame or border around an axes.
>
> def clear_frame(ax=None):
>    if ax is None:
>        ax = plt.gca()
>    ax.xaxis.set_visible(False)
>    ax.yaxis.set_visible(False)
>    for spine in ax.spines.itervalues():
>        spine.set_visible(False)
>
> Best,
> -T

Hi Tony,

Thanks, that works pretty good!

However... it seems that "drawcoastlines" creates a border if I am not
"zoomed out" far enough. (i.e., the coastline is out of bounds).

Do you know how I could turn that off?

Thanks again!

~ Jeremy

--
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Matplotlib/basemap consultant for hire?

2010-10-06 Thread Jeremy Lounds
Hello,

I apologize in advance if this is not an appropriate question for the list.

I have relatively small project that I am stuck on a few (probably
small) points. Is anyone here is interested in earning a modest
consultation fee to "hold my hand" through the rough patches?

If so, please e-mail me directly -- lounds { } gmail -- and I will
send you additional details.

Thank you,

Jeremy

--
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel