- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我编写了一个代码来在我的颜色图结果图片上绘制等值线。我在考虑如何改进它以更好地呈现信息。显示每个等值线值将很有趣。与此图片相同:
您对在我的代码中应用有什么建议吗?还是您认为使用不同颜色的等值线并为每种等值线颜色设置一个关键部分更好?
这是我完美运行的代码。
double[] isoLineValueArray = new double[this.isoLineNumber];
double dVal = (valueMax - valueMin) / (this.isoLineNumber + 1);
double currentVal = valueMin;
for (int i = 0; i < this.isoLineNumber; i++)
{
currentVal += dVal;
isoLineValueArray[i] = currentVal;
}
for (int v = 0; v < isoLineValueArray.Length; v++)
{
// cycle though all nodes
for (int i = 0; i < nx-1 ; i++)
{
for (int j = 0; j < ny-1 ; j++)
{
dxSum4 = dxSum4 + nx;
dySum4 = dySum4 + ny;
// nodal position
centerPoint.X = (dxSum4 - startXPos) / (endXPos - startXPos) *
(double)(xAxisPosition[this.nTicks - 1] - xAxisPosition[0]) +
(double)xAxisPosition[0];
centerPoint.Y = -theSpace.TheCells[i, j, 0].YCellDimension +
(dySum4 - startYPos) / (endYPos - startYPos) *
(double)(yAxisPosition[this.nTicks - 1] - yAxisPosition[0]) +
(double)yAxisPosition[0];
// reset
dxSum4 = 0.0;
dySum4 = 0.0;
// add to line list
lineList.AddRange(myLineGenerator.DetermineLines(...));
}
}
}
最佳答案
除了具有不同颜色的等值线之外,您还可以使用具有背景颜色的关键部分和与等值线位置对应的数字,并保留单色等值线。太多的颜色可能会令人不安。
像这样,每个数字和水平线对应一个等值线位置:
关于c# - 关于绘制等值线(C#)的任何想法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22185355/
我已经上传了一个 shapefile here . #First, read it in library(rgdal) pols % mutate(id = as.numeric(id)) #some
我正在尝试制作分区统计图,但如何设置 map 的大小?现在我有了这张 map : 我想将 map 扩展到所有空间,我阅读了文档,但没有找到解决方案。 这是我的代码: var data = [{
我有一张美国各州的分区统计图,使用分位数比例显示总人口。我还设置了一个下拉菜单,允许用户使用 colorbrewer 定义的配色方案来选择自己选择的配色方案。选择后, map 将填充新的配色方案。 我
我正在使用 d3(更像是学习使用)来创建等值线图。我已经设法加载我的数据和 geojson 对象并获得要显示的 map ,但我想添加一些转换和用户选择数据的能力。 这是我目前所拥有的示例(感谢 git
我已经包含了下面的 html 代码,其中导入了 dc.js 的 javascript 和 css。当我加载页面时,所有元素都位于正确的位置。当我选择一个县路径元素并取消选择 fill:none css
我是一名优秀的程序员,十分优秀!