[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plot on a figure generated with imagesc()
From: |
Søren Hauberg |
Subject: |
Re: Plot on a figure generated with imagesc() |
Date: |
Tue, 21 Dec 2010 18:23:20 +0100 |
Hi
tir, 21 12 2010 kl. 18:13 +0100, skrev José Luis García Pallero:
> I have a digital elevation model as a matrix that I plot via imagesc()
> function. Later I need to plot some coastlines on the previous plot.
> As the axis of coordinates generated with imagesc() account for the
> pixel index I don't know how can I plot the coastline without
> transform the coordinates to the limits defines by the rows and
> columns of the image. Exists any function to plot with imagesc and
> produce a "referenced" (other coordinates different of the rows and
> columns) image?
I am a bit unsure of what you want, but it sounds like you could just do
something like
I = rand (100);
imagesc ([1, 10], [1, 10], I);
hold on, plot ([5, 10], [5, 10], '*-', 'linewidth', 2), hold off
(adapt to your situation). Basically, 'imagesc' allows you to pass
minimum and maximum values of the axes.
Søren