Changeset 9450
- Timestamp:
- 05/06/13 16:18:04 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis.Views/3.3/ScatterPlotView.cs
r8907 r9450 431 431 432 432 #region Helpers 433 public static IEnumerable<double> DoubleRange(double min, double max, double step) {434 double i;435 for (i = min; i <= max; i += step)436 yield return i;437 438 if (i != max + step)439 yield return i;440 }441 442 private double HumanRoundRange(double range) {443 double base10 = Math.Pow(10.0, Math.Floor(Math.Log10(range)));444 double rounding = range / base10;445 if (rounding <= 1.5) rounding = 1;446 else if (rounding <= 2.25) rounding = 2;447 else if (rounding <= 3.75) rounding = 2.5;448 else if (rounding <= 7.5) rounding = 5;449 else rounding = 10;450 return rounding * base10;451 }452 453 private double HumanRoundMax(double max) {454 double base10;455 if (max > 0) base10 = Math.Pow(10.0, Math.Floor(Math.Log10(max)));456 else base10 = Math.Pow(10.0, Math.Ceiling(Math.Log10(-max)));457 double rounding = (max > 0) ? base10 : -base10;458 while (rounding < max) rounding += base10;459 return rounding;460 }461 462 433 private MarkerStyle ConvertPointStyle(ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle pointStyle) { 463 434 switch (pointStyle) {
Note: See TracChangeset
for help on using the changeset viewer.