Exemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();
            DataContext = this;
            var tmp = new PlotModel("Scatter plot", "Barnsley fern (IFS)");
            var s1  = new LineSeries
            {
                StrokeThickness = 0,
                MarkerSize      = 3,
                // MarkerFill = OxyColors.Blue,
                MarkerStroke = OxyColors.ForestGreen,
                MarkerType   = MarkerType.Plus
            };

            foreach (var pt in Fern.Generate(2000))
            {
                s1.Points.Add(new DataPoint(pt.X, -pt.Y));
            }

            //var r = new Random();
            //for (int i = 0; i < 1000; i++)
            //    s1.Points.Add(new DataPoint(r.NextDouble(), r.NextDouble()));

            tmp.Series.Add(s1);
            ScatterModel = tmp;
        }
Exemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();
            DataContext = this;
            var tmp = new PlotModel {
                Title = "Scatter plot", Subtitle = "Barnsley fern (IFS)"
            };
            var s1 = new LineSeries
            {
                StrokeThickness = 0,
                MarkerSize      = 3,
                MarkerStroke    = OxyColors.ForestGreen,
                MarkerType      = MarkerType.Plus
            };

            foreach (var pt in Fern.Generate(2000))
            {
                s1.Points.Add(new DataPoint(pt.X, -pt.Y));
            }

            tmp.Series.Add(s1);
            this.ScatterModel = tmp;
        }