3

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 :

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(...));
        }
    }
}

1 Answer 1

2

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:

suggested look of isolines

4
  • That's true. Actually, I have that output but for scientific application and simplicity I would like to have isolines instead of colormap. Sometimes colormap is not suitable for scientific evaluation. For instance the following picture is my code output. Before having isoline I didn't know there is some disturbs near left wall. output: s30.postimg.org/3t5z63xoh/Fluid_FD_Temperature0038.png
    – Mehdi
    Commented Mar 5, 2014 at 0:09
  • My idea is to keep the single colored isolines and to include a color key for the background colors. Add a number for each isoline position in the key. Commented Mar 5, 2014 at 0:13
  • Do you mean something like this picture? s27.postimg.org/9rju9u55v/Fluid_FD_Temperature0038.png
    – Mehdi
    Commented Mar 5, 2014 at 0:29
  • Thank you very much. I did it. Sample: s29.postimg.org/wpbnqi1c7/Fluid_FD_Temperature0018.png I think this way of presentation is much better although finding corresponding isoline from key is challenging.
    – Mehdi
    Commented Mar 5, 2014 at 1:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.