help-octave
[Top][All Lists]
Advanced

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

Re: imagesc y coordinate problem and contour question


From: Søren Hauberg
Subject: Re: imagesc y coordinate problem and contour question
Date: Fri, 09 Apr 2010 08:56:50 -0700

fre, 09 04 2010 kl. 15:57 +0200, skrev Lidia Bressan:
> 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')  ?

I don't know if this is a bug or not.

I would just stick to the interpolation approach you suggested.

Søren



reply via email to

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