customizing Basemap

Hi
How easy is it to customize the Basemap class? I seem to remember an example where something is added to the toolbar but I can't remember which example it was. What if I want to add a menu at the top of the window?

Mathew

Mathew Yeates wrote:

Hi
How easy is it to customize the Basemap class? I seem to remember an example where something is added to the toolbar but I can't remember which example it was. What if I want to add a menu at the top of the window?

Mathew

Mathew:

Basemap doesn't handle any GUI stuff - this is all done by matplotlib proper. So, you'll need to look at the matplotlib docs to see how to customize the toolbar.

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg

Mathew,

To do stuff like adding menus and customizing the toolbar, you need to
embed mpl in the GUI of your choice. A good starting point are the
examples in http://matplotlib.sf.net/examples/user_interfaces

JDH

···

On Mon, Oct 6, 2008 at 11:23 AM, Jeff Whitaker <jswhit@...146...> wrote:

Basemap doesn't handle any GUI stuff - this is all done by matplotlib
proper. So, you'll need to look at the matplotlib docs to see how to
customize the toolbar.

I found example I wish to build on. It's embedding_in_gtk2.py under mpl_examples/user_interfaces. I'll put a menu at the top. But how can I add a Basemap instead of a Figure?

Mathew

Jeff Whitaker wrote:

···

Mathew Yeates wrote:

Hi
How easy is it to customize the Basemap class? I seem to remember an example where something is added to the toolbar but I can't remember which example it was. What if I want to add a menu at the top of the window?

Mathew

Mathew:

Basemap doesn't handle any GUI stuff - this is all done by matplotlib proper. So, you'll need to look at the matplotlib docs to see how to customize the toolbar.

-Jeff

Mathew Yeates wrote:

I found example I wish to build on. It's embedding_in_gtk2.py under mpl_examples/user_interfaces. I'll put a menu at the top. But how can I add a Basemap instead of a Figure?

Mathew

Mathew: A basemap plot is just like any other matplotlib plot, it's associated with a figure instance and an axes instance.

-Jeff

···

Jeff Whitaker wrote:

Mathew Yeates wrote:

Hi
How easy is it to customize the Basemap class? I seem to remember an example where something is added to the toolbar but I can't remember which example it was. What if I want to add a menu at the top of the window?

Mathew

Mathew:

Basemap doesn't handle any GUI stuff - this is all done by matplotlib proper. So, you'll need to look at the matplotlib docs to see how to customize the toolbar.

-Jeff

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg

Thanks for the help!!

Jeff Whitaker wrote:

···

Mathew Yeates wrote:

I found example I wish to build on. It's embedding_in_gtk2.py under mpl_examples/user_interfaces. I'll put a menu at the top. But how can I add a Basemap instead of a Figure?

Mathew

Mathew: A basemap plot is just like any other matplotlib plot, it's associated with a figure instance and an axes instance.

-Jeff

Jeff Whitaker wrote:

Mathew Yeates wrote:

Hi
How easy is it to customize the Basemap class? I seem to remember an example where something is added to the toolbar but I can't remember which example it was. What if I want to add a menu at the top of the window?

Mathew

Mathew:

Basemap doesn't handle any GUI stuff - this is all done by matplotlib proper. So, you'll need to look at the matplotlib docs to see how to customize the toolbar.

-Jeff

Dear Mathew, most of the basemap methods take an "ax=" keyword
(drawparallels, drawmeridians, drawmapboundary and so on). Furthermore,
you can transform your lat/long coordinates to projected coordinates
with the __call__ method and then simply plot those directly. You can
thus plot basemaps on any Axes instance. For an example of all this, I
can point you to my script
make_buchner_interommatidial_distance_figure.py in the most recent
release of http://code.astraw.com/drosophila_eye_map/ . There may be
good examples distributed with basemap, too -- I can't remember.

Hope that helps,
-Andrew

Mathew Yeates wrote:

···

I found example I wish to build on. It's embedding_in_gtk2.py under
mpl_examples/user_interfaces. I'll put a menu at the top. But how can I
add a Basemap instead of a Figure?

Mathew

Jeff Whitaker wrote:

Mathew Yeates wrote:

Hi
How easy is it to customize the Basemap class? I seem to remember an
example where something is added to the toolbar but I can't remember
which example it was. What if I want to add a menu at the top of the
window?

Mathew

Mathew:

Basemap doesn't handle any GUI stuff - this is all done by matplotlib
proper. So, you'll need to look at the matplotlib docs to see how to
customize the toolbar.

-Jeff

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users