protected PlotModel LoadPlotModel(List<RegionalStrengthViewModel> rsvms, Func<ROI, double> horizSelector, Func<ROI, double> vertSelector)
        {
            var model = new PlotModel() { IsLegendVisible = false };
            model.PlotMargins = new OxyThickness(0, 0, 0, 0);
            model.PlotType = PlotType.Cartesian;

            var ba = new LinearAxis(AxisPosition.Bottom) { };
            var la = new LinearAxis(AxisPosition.Left) { };

            ba.MinimumPadding = 0.1;
            ba.MaximumPadding = 0.1;
            la.MinimumPadding = 0.1;
            la.MaximumPadding = 0.1;

            model.Axes.Add(ba);
            model.Axes.Add(la);

            var s1 = new BrainScatterSeries
            {
                MarkerType = MarkerType.Circle,
                MarkerSize = 7,
                MarkerFill = OxyColor.FromAColor(125, OxyColors.Gray),
            };

            var s2 = new BrainScatterSeries
            {
                MarkerType = MarkerType.Circle,
                MarkerSize = 7,
                MarkerFill = OxyColor.FromAColor(125, OxyColors.Red),
                MarkerStroke = OxyColors.Black,
            };

            foreach (var rsvm in rsvms)
            {
                if (rsvm.Significant)
                    s2.Points.Add(new BrainDataPoint(horizSelector(rsvm.ROI), vertSelector(rsvm.ROI), rsvm.ROI));
                else
                    s1.Points.Add(new BrainDataPoint(horizSelector(rsvm.ROI), vertSelector(rsvm.ROI), rsvm.ROI));
            }

            model.Series.Add(s1);
            model.Series.Add(s2);

            return model;
        }
Example #2
0
		protected PlotModel LoadPlotModel(List<RegionalViewModel> rsvms, Func<ROI, double> horizSelector, Func<ROI, double> vertSelector)
		{
			var model = new PlotModel() { IsLegendVisible = false };
			model.PlotMargins = new OxyThickness(0, 0, 0, 0);
			model.PlotAreaBorderColor = OxyColors.White;
			model.PlotType = PlotType.Cartesian;

			var ba = new LinearAxis(AxisPosition.Bottom) { AxislineColor = OxyColors.White, TextColor = OxyColors.White, MajorGridlineColor = OxyColors.White, TicklineColor = OxyColors.White };
			var la = new LinearAxis(AxisPosition.Left) {  AxislineColor = OxyColors.White, TextColor = OxyColors.White, TicklineColor = OxyColors.White };

			ba.MinimumPadding = 0.1;
			ba.MaximumPadding = 0.1;
			la.MinimumPadding = 0.1;
			la.MaximumPadding = 0.1;

			model.Axes.Add(ba);
			model.Axes.Add(la);

			var s1 = new BrainScatterSeries
			{
				MarkerType = MarkerType.Circle,
				MarkerSize = 7,
				MarkerFill = OxyColor.FromAColor(125, OxyColors.White),
			};

			foreach (var rsvm in rsvms)
			{
				s1.Points.Add(new BrainDataPoint(horizSelector(rsvm.ROI), vertSelector(rsvm.ROI), rsvm.ROI));
			}

			model.Series.Add(s1);

			return model;
		}