I have written a code to draw isolines on my colormap result pictures. I was thinking how I can improve it to have better presentation of information. Showing every isoline value will be interesting. Same as this picture :
Do you have any suggestions about applying in my code? Or do you think it is better to have isolines with different colors and have a key part for each isoline color?
This is my code that works perfectly.
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(...));
}
}
}