In article <ae902fd4.0309161203.125f6b7b@posting.google.com>, "Nate Doyle"
<doyle@lasp.colorado.edu> wrote:
> I'm trying to plot a contour and am getting an error that tells me my
> points are co-linear. I'm not exactly sure what's going on so I figured
> I'd appeal to you people. I've tried lots of different things
> (including searching through the archives, but to no avail) but here's
> the current version of the code. The darkinfo structures contain
> latitudes and longitudes and the g_flux is what I'm trying to map
> (electron count rates). The order here is that which everything gets
> plotted in my code. I left out some stuff in between so as to not bog
> things down with too much code.
> map_set,/goodes,/continents,title='Dark Area Count Rates For Mapping The
> SAA'
> plots,darkinfo.sc_lon,darkinfo.sc_lat,psym=3,$
> color=fix(alog10(darkinfo.g_flux))+1
> z=darkinfo.g_flux
> x=darkinfo.sc_lon
> y=darkinfo.sc_lat
> contour,z,x,y,/irregular,/overplot
> Thanks in advance
> Nate
It usually means that you probably don't have irregularly gridded data.
The error is being generated by the TRIANGULATE procedure, from the IDL
help file...
"
Setting IRREGULAR is the same as performing an explicit triangulation. That is:
CONTOUR, Z, X, Y, /IRREGULAR
is the same as
TRIANGULATE, X, Y, tri ;Get triangulation
CONTOUR, Z, X, Y, TRIANGULATION=tri
"
If you try TRIANGULATE(ing) the data yourself it will complain that the
data is co-linear, this mean that the data points are regularly spaced
(at least, that's the only way I can get the error), if you have
x=[1,2,3,4,5,6,7,8]
y=[1,2,3,4,5,6,7,8]
triangulate, x,y, tri=tri
;...points are co-linear error
x=[1,2,3,4,5,6,7,8]
y=[1,2,3,4,5,6,7,9] ;note the _9_
triangulate, x,y, tri=tri
;no error.
;;;;;;;;;;;;
The IRREGULAR keyword is used if you have (say) 50
measurements at 50 different x and y values. Not when you have 2500
measurements (with 50 measurements at each of 50 different latitudes
etc.)
You should check the dimensionality of z,x and y. My guess is that
z=z(n_x,n_y), x=x(n_x), y=y(n_y)
and not
z=z(n), x=x(n), y=y(n)
Chris.
|