コード例 #1
0
        public static PlotModel StandardCategoryColorAxis()
        {
            var plotModel1 = new PlotModel {
                Title = "CategoryColorAxis"
            };
            var catAxis = new CategoryColorAxis {
                Key = "ccc", Palette = OxyPalettes.BlackWhiteRed(12)
            };

            catAxis.Labels.AddRange(new[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" });
            plotModel1.Axes.Add(catAxis);
            var linearAxis = new LinearAxis {
                Position = AxisPosition.Left
            };
            var ss = new ScatterSeries {
                ColorAxisKey = catAxis.Key
            };

            ss.Points.Add(new ScatterPoint(0, 0)
            {
                Value = 0
            });
            ss.Points.Add(new ScatterPoint(3, 0)
            {
                Value = 3
            });
            plotModel1.Series.Add(ss);
            plotModel1.Axes.Add(linearAxis);
            return(plotModel1);
        }
コード例 #2
0
 /// <summary>
 /// Create the palette list.
 /// </summary>
 private void CreatePaletteList()
 {
     PaletteList = new BindingList <OxyPalette>();
     PaletteList.Add(OxyPalettes.BlackWhiteRed(64));
     PaletteList.Add(OxyPalettes.BlueWhiteRed(64));
     PaletteList.Add(OxyPalettes.BlueWhiteRed31);
     PaletteList.Add(OxyPalettes.Cool(64));
     PaletteList.Add(OxyPalettes.Gray(64));
     PaletteList.Add(OxyPalettes.Hot(64));
     PaletteList.Add(OxyPalettes.Hue64);
     PaletteList.Add(OxyPalettes.HueDistinct(64));
     PaletteList.Add(OxyPalettes.Jet(64));
     PaletteList.Add(OxyPalettes.Rainbow(64));
 }
コード例 #3
0
        public static PlotModel MajorStep4()
        {
            var plotModel1 = new PlotModel {
                Title = "Major Step = 4, IsTickCentered = true"
            };
            var catAxis = new CategoryColorAxis
            {
                Palette        = OxyPalettes.BlackWhiteRed(3),
                IsTickCentered = true,
                MajorStep      = 4
            };

            catAxis.Labels.AddRange(new[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" });
            plotModel1.Axes.Add(catAxis);
            var linearAxis = new LinearAxis {
                Position = AxisPosition.Left
            };

            plotModel1.Axes.Add(linearAxis);
            return(plotModel1);
        }
コード例 #4
0
 public static PlotModel BlackWhiteRed3()
 {
     return(HeatMapSeriesExamples.CreatePeaks(OxyPalettes.BlackWhiteRed(3), false));
 }
コード例 #5
0
ファイル: OxyPaletteMap.cs プロジェクト: picowatt/Atreyu
        public static OxyPaletteMap CreateFromName(string name)
        {
            OxyPalette palette   = null;
            var        numPoints = 2;

            switch (name)
            {
            case "BlackWhiteRed":
            {
                numPoints = 3;
                palette   = OxyPalettes.BlackWhiteRed(NUM_COLORS);
                break;
            }

            case "BlueWhiteRed":
            {
                numPoints = 3;
                palette   = OxyPalettes.BlueWhiteRed(NUM_COLORS);
                break;
            }

            case "Cool":
            {
                numPoints = 3;
                palette   = OxyPalettes.Cool(NUM_COLORS);
                break;
            }

            case "Gray":
            {
                numPoints = 2;
                palette   = OxyPalettes.Gray(NUM_COLORS);
                break;
            }

            case "Hot":
            {
                numPoints = 5;
                palette   = OxyPalettes.Hot(NUM_COLORS);
                break;
            }

            case "Hue":
            {
                numPoints = 7;
                palette   = OxyPalettes.Hue(NUM_COLORS);
                break;
            }

            case "Jet":
            {
                numPoints = 5;
                palette   = OxyPalettes.Jet(NUM_COLORS);
                break;
            }

            case "Rainbow":
            {
                numPoints = 7;
                palette   = OxyPalettes.Rainbow(NUM_COLORS);
                break;
            }

            default:
            {
                return(null);

                break;
            }
            }
            var colorPoints = new Color[7];
            var brush       = new LinearGradientBrush();

            brush.StartPoint = new Point(0, 0.5);
            brush.EndPoint   = new Point(1, 0.5);
            var division = (NUM_COLORS / (numPoints - 1)) - 1;

            for (int i = 0; i < numPoints; i++)
            {
                var oxyColor = palette.Colors[(division * i)];
                colorPoints[i] = Color.FromArgb(oxyColor.A, oxyColor.R, oxyColor.G, oxyColor.B);
                brush.GradientStops.Add(new GradientStop(colorPoints[i], ((double)i / (numPoints - 1))));
            }

            return(new OxyPaletteMap(name, brush, palette));
        }
コード例 #6
0
 public static PlotModel ColorMapBlackWhiteRed9TopLegend()
 {
     return(CreateRandomScatterSeriesWithColorAxisPlotModel(2500, OxyPalettes.BlackWhiteRed(9), MarkerType.Square, AxisPosition.Top, OxyColors.Undefined, OxyColors.Undefined));
 }
コード例 #7
0
 public static PlotModel ColorMapBlackWhiteRed9()
 {
     return(CreateRandomScatterSeriesWithColorAxisPlotModel(2500, OxyPalettes.BlackWhiteRed(9)));
 }