- 积分
- 769
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-7-6
- 最后登录
- 1970-1-1
|
发表于 2018-4-4 15:46:51
|
显示全部楼层
自己找出问题了,分享下方法,或许有人也遇到同样问题
参考帖子
http://bbs.06climate.com/forum.p ... id=51634&page=2
因为数据读取的方式是从左下角读取
示例
GridData temperData = new GridData();
double[,] newData = new double[8, 10]
{
{ 20.0,21.2,19.5,19.4,18.6,20.2,18.8,20.3,22.7,18.3},
{ 21.3,19.7,19.9,19.1,18.1,21.2,21.6,18.7,21.5,17.2},
{ 20.6,20.3,19.1,18.9,20.4,19.2,19.1,17.4,20.4,22.3},
{ 21.6,19.2,20.7,19.4,20.1,19.4,17.6,18.8,18.7,24.5},
{ 21.5,21.4,19.4,21.0,20.5,20.1,19.0,20.8,20.7,22.4},
{ 21.1,20.3,19.8,20.5,18.4,19.5,20.1,21.1,19.3,23.4},
{ 21.7,21.1,20.7,20.7,21.2,21.7,21.3,21.2,17.4,20.3},
{ 21.5,21.8,22.8,19.2,21.5,21.5,22.8,21.6,16.9,18.7}
};
double[] X = new double[10] { 104, 105, 106, 107, 108, 109, 110, 111, 112, 113 };
double[] Y = new double[8] { 20, 21, 22, 23, 24, 25, 26, 27 };
//double[] Y = new double[8] { 27, 26, 25, 24, 23, 22, 21, 20 };//这样不能通过
temperData.Data = newData;
temperData.X = X;
temperData.Y = Y;
temperData.MissingValue = -9999; |
|