Good everyone,
I'm contouring a 5x5 points grid of data. The Y axis is non-equal
interval as follows,
YArray[5] = { 21,
18,
15,
10,
5 }
that is, in Y axis, the interval from 5 to 15 is 5, while the interval from
15 to 21 is 3.
The X axis is equal interval as follows,
XArray[5] = { 0, 10, 20, 30, 40}
My data is data[5][5] = { 10, 10, 10, 10, 10,
20, 20, 20, 20, 20,
30, 30, 30, 30, 30,
40, 40, 40, 40, 40,
50, 50, 50, 50, 50 };
I want the contour as follows, in which the interval is not equal,
(1)
50 50 50 50 50
.
.
.
40 40 40 40 40
.
.
.
30 30 30 30 30
.
.
.
.
.
20 20 20 20 20
.
.
.
.
.
10 10 10 10 10
but I get the unwanted contour from my code as follows, in which the
interval is equal,
(2)
50 50 50 50 50
.
.
.
.
40 40 40 40 40
.
.
.
.
30 30 30 30 30
.
.
.
.
20 20 20 20 20
.
.
.
.
10 10 10 10 10
How to get the non-equal interval of Y axis?
I get the unwanted (2) contour from blow code, but how can I get the (1)
contour?
NhlRLSetFloat(srlist,NhlNsfYCStartV, 5);
NhlRLSetFloat(srlist,NhlNsfYCEndV, 21);
NhlRLSetFloat(srlist,NhlNsfXCStartV, 0);
NhlRLSetFloat(srlist,NhlNsfXCEndV, 40);
NhlRLSetIntegerArray(srlist,NhlNsfXArray, XArray, 5);
NhlRLSetIntegerArray(srlist,NhlNsfYArray, YArray, 5);
int icount[2];
icount[0] = 5;
icount[1] = 5;
NhlRLSetMDFloatArray(srlist,NhlNsfDataArray,&data[0][0],2, icount);
NhlCreate(&cndata,"cndata",NhlscalarFieldClass,appid,srlist);
_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn
_______________________________________________
ncarg-talk mailing list
ncarg-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
This archive was generated by hypermail 2b29 : Sun Mar 20 2005 - 13:30:39 MST