help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

imagesc y coordinate problem and contour question


From: Lidia Bressan
Subject: imagesc y coordinate problem and contour question
Date: Fri, 9 Apr 2010 15:57:34 +0200

Hi

I use octave 3.2.2 on Ubuntu 9.10 Karmic Koala, with gnuplot 4.2,
patchlevel 5.

I am trying to picture an image map with time in x, period in y and
spectral values on z, with imagesc(XX,YY,ZZ).

The function imagesc seems not able to handle the fact that the YY
coordinates are not equally spaced. The function works, but the image
that I get is wrong. The y axis labels are placed correctly, but the
colors (ZZ values) do not correspond to the y coordinates. It seems that
the imagemap is drawn with YY values equally spaced, and the bottom of
the picture is filled in order to get to the right y data limit.
Is there a way to go around this problem?

At the same time, contourf(XX,YY,ZZ) with the same XX, YY and ZZ
matrices gives the right image with the right coordinates, which
confirmed me that the ZZ data are not wrong. With this method however, I
get some extreme values in the contour map, outside the range of the ZZ
values. I think that this is an interpolation issue. Which interpolation
is used by contour? Is it possible to use a linear interpolation?

Do I need to interpolate YY with an equally spaced y vector, and XX and
ZZ, in order to use imagesc?
Znew=interp2(XX,YY,ZZ,xnew,ynew,'linear')  ?

Thanks


Lidia Bressan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]