Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!r36g2000prf.googlegroups.com!not-for-mail
From: Rune Allnor <allnor@tele.ntnu.no>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Can I use a JPEG as background to Matlab plot ?
Date: Tue, 11 Nov 2008 02:03:33 -0800 (PST)
Organization: http://groups.google.com
Lines: 25
Message-ID: <274a8a9d-1ca0-4e32-93e7-c98dc1b869a6@r36g2000prf.googlegroups.com>
References: <gfbipu$c3e$1@fred.mathworks.com>
NNTP-Posting-Host: 77.17.109.232
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1226397813 19527 127.0.0.1 (11 Nov 2008 10:03:33 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 11 Nov 2008 10:03:33 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: r36g2000prf.googlegroups.com; posting-host=77.17.109.232; 
	posting-account=VAp5gAkAAAAmkCze5hvZtMeedpZWNthI
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET 
	CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022),gzip(gfe),gzip(gfe)
Bytes: 1984
Xref: news.mathworks.com comp.soft-sys.matlab:500167


On 11 Nov, 10:21, "Claus " <il_consigli...@excite.com> wrote:

> can you tell me if I can use an image as background to a Matlab plot? How?

It *can* be done, but it can be very cumbersome, depending
on what you want to do. To demonstrate:

load clown    % Stand-in for your JPEG
imagesc(X)    % Stand-in for your JPEG
colormap(map) % Specific for the clown example

hold on;      % Prepare to plot on top of the image
plot([100 200],[50,150],'g','linewidth',3)  % plot a line

Now, try and see what happens if you want to change the
AXIS settings:

axis([1 500 1 1000])

Both the image and the line is still there, but the image
is distorted. It is up to you to implement all the stuff
that is necessary to handle the image, preserve the scales
and so on.

Rune