Path: news.mathworks.com!not-for-mail
From: "Stephen " <kuhn.s.r@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Overlay image on a plot, with transparent background on image
Date: Tue, 27 Jan 2009 17:45:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 11
Message-ID: <glnh6v$oao$1@fred.mathworks.com>
Reply-To: "Stephen " <kuhn.s.r@gmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1233078304 24920 172.30.248.35 (27 Jan 2009 17:45:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 27 Jan 2009 17:45:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1430877
Xref: news.mathworks.com comp.soft-sys.matlab:514314


Hello,

I've got an outline map of the US I need to overlay on a patch plot.  The map was created in Photoshop and is a 300dpi .png with black lines for the state borders, etc, and everything else transparent.  I want to create the patch plot, then overlay the map such that the colors of the patch plot show through the transparent parts of the map.

I have tried doing this according to the two procedures laid out here:

http://www.mathworks.com/support/solutions/data/1-1AK7N.html

However, the transparency of the image read in using imread always seems to default to black, even if I try changing it to something else using whitebg.  It also seems to wipe out the patch plot, no matter what.  

Does anyone have any suggestions?  I would greatly appreciate it, as I've been beating my head going over the same threads again and again.  Thanks.