Thread Subject: Can I use a JPEG as background to Matlab plot ?

Subject: Can I use a JPEG as background to Matlab plot ?

From: Claus

Date: 11 Nov, 2008 09:21:02

Message: 1 of 3

Dear experts,

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

Thanks,

Claus

Subject: Can I use a JPEG as background to Matlab plot ?

From: Rune Allnor

Date: 11 Nov, 2008 10:03:33

Message: 2 of 3

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

Subject: Can I use a JPEG as background to Matlab plot ?

From: Steven Lord

Date: 11 Nov, 2008 13:55:19

Message: 3 of 3


"Claus " <il_consigliere@excite.com> wrote in message
news:gfbipu$c3e$1@fred.mathworks.com...
> Dear experts,
>
> can you tell me if I can use an image as background to a Matlab plot? How?

It depends on what exactly you mean by "background to a MATLAB plot" -- if
you don't need the image on the same axes as the plot, read through this
document on the support website:

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

If you do need it on the same axes as the plot, see Rune's message.

--
Steve Lord
slord@mathworks.com

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
plot Claus 11 Nov, 2008 04:25:04
graph Claus 11 Nov, 2008 04:25:04
image Claus 11 Nov, 2008 04:25:04
rssFeed for this Thread

Contact us at files@mathworks.com