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(...));
}
}
}
Instead of having isolines with different colors, you could have a key part with the background colors and a number corresponding to the locations of the isolines and keep the single colored isolines. Too many colors could be disturbing.
Something like this, where each number and horizontal line corresponds to a isoline position:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With