Plotting basemap on top of other data

I am working with (geostationary)
satellite data, and one of the things I want to do is plot a map (coastlines)
on top of the satellite image. As an IDL user I know how to do this in IDL (although
in IDL it is a bit of a hassle), but I don’t seem to be able to figure
out how this could be done in python.

The satellite data consists
of a rectangular field of N by N pixels. The data is already converted to
bitmap RGB values. I have figured out how this can be written to a bitmap image
like PNG or JPG.

I further figured out how to
do the satellite projection in Basemap, and how to plot Basemap coastlines. However,
the Basemap appears to have a non-transparent background, which overplots all
bitmap data if I plot the Bitmap data first. I had hoped that there would be
some transparency setting in Basemap, but alas.

(ps. Keep in mind that I do not want to use some
contour filling routine for plotting the satellite data. I want to retain the
original N x N pixels and image size)

What commands are you using to plot the data? drawcoastlines() should only draw lines. Maybe “hold” is being set to false in your matplotlibrc file or in your code?

Ben Root

···

On Friday, December 9, 2011, Laat de, Jos (KNMI) <jos.de.laat@…3329…> wrote:

I am working with (geostationary) satellite data, and one of the things I want to do is plot a map (coastlines) on top of the satellite image. As an IDL user I know how to do this in IDL (although in IDL it is a bit of a hassle), but I don’t seem to be able to figure out how this could be done in python.

The satellite data consists of a rectangular field of N by N pixels. The data is already converted to bitmap RGB values. I have figured out how this can be written to a bitmap image like PNG or JPG.

I further figured out how to do the satellite projection in Basemap, and how to plot Basemap coastlines. However, the Basemap appears to have a non-transparent background, which overplots all bitmap data if I plot the Bitmap data first. I had hoped that there would be some transparency setting in Basemap, but alas.

(ps. Keep in mind that I do not want to use some contour filling routine for plotting the satellite data. I want to retain the original N x N pixels and image size)

HI,

My initial thought was that you need to use the "zorder" keyword
argument and set the zorder to a large value. However, the more I
thought about it, I'm not really sure how you are plotting the
satellite data. Can you provide a code snippet?

PTM

···

---
Patrick Marsh
Ph.D. Student / Liaison to the HWT
School of Meteorology / University of Oklahoma
Cooperative Institute for Mesoscale Meteorological Studies
National Severe Storms Laboratory
http://www.patricktmarsh.com

On Fri, Dec 9, 2011 at 6:58 AM, Laat de, Jos (KNMI) <jos.de.laat@...3329...> wrote:

I am working with (geostationary) satellite data, and one of the things I
want to do is plot a map (coastlines) on top of the satellite image. As an
IDL user I know how to do this in IDL (although in IDL it is a bit of a
hassle), but I don’t seem to be able to figure out how this could be done in
python.

The satellite data consists of a rectangular field of N by N pixels. The
data is already converted to bitmap RGB values. I have figured out how this
can be written to a bitmap image like PNG or JPG.

I further figured out how to do the satellite projection in Basemap, and how
to plot Basemap coastlines. However, the Basemap appears to have a
non-transparent background, which overplots all bitmap data if I plot the
Bitmap data first. I had hoped that there would be some transparency setting
in Basemap, but alas.

(ps. Keep in mind that I do not want to use some contour filling routine for
plotting the satellite data. I want to retain the original N x N pixels and
image size)

------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users