示例#1
0
private static string GenerateParameterScriptCode(QuadDirections keyPosition, string xLabel, string yLabel, bool logX, bool logY, double xMin, double xMax, double yMin, double yMax)
{
    string keyPositionParam = "right bottom Right";

    switch (keyPosition)
    {
    case QuadDirections.NW:
        keyPositionParam = "left top Left";
        break;

    case QuadDirections.NE:
        keyPositionParam = "right top Right";
        break;

    case QuadDirections.SW:
        keyPositionParam = "left bottom Left";
        break;

    case QuadDirections.SE:             // Do nothing - default
    default:
        break;
    }

    return("# Parameters" + ExportationConstants.LINE_TERMINATOR +
           "set key " + keyPositionParam + ExportationConstants.LINE_TERMINATOR +
           "set xlabel \"" + xLabel + "\"" + ExportationConstants.LINE_TERMINATOR +
           "set ylabel \"" + yLabel + "\"" + ExportationConstants.LINE_TERMINATOR +
           (logX ? "set log x" + ExportationConstants.LINE_TERMINATOR : "") +
           (logY ? "set log y" + ExportationConstants.LINE_TERMINATOR : "") +
           ((double.IsNaN(xMin) || double.IsNaN(xMax)) ? "" : "set xrange [" + xMin + ":" + xMax + "]" + ExportationConstants.LINE_TERMINATOR) +
           ((double.IsNaN(yMin) || double.IsNaN(yMax)) ? "" : "set yrange [" + yMin + ":" + yMax + "]" + ExportationConstants.LINE_TERMINATOR) +
           "set grid" + ExportationConstants.LINE_TERMINATOR +
           "set style fill solid 0.25");
}
示例#2
0
        /// <summary>
        /// Returns the <code>QuadNode</code> belonging to the specified direction.
        /// </summary>
        /// <param name="direction">The direction of the child.</param>
        /// <returns>The desired <code>QuadNode</code> object.</returns>
        public QuadNode <T> this[QuadDirections direction]
        {
            get
            {
                switch (direction)
                {
                case QuadDirections.SW: return(Children[0]);

                case QuadDirections.SE: return(Children[1]);

                case QuadDirections.NW: return(Children[2]);

                case QuadDirections.NE: return(Children[3]);

                default: return(null);
                }
            }
        }