/// <summary>
 /// Initializes a new instance of the <see cref = "HeatMapSeries" /> class.
 /// </summary>
 public HeatMapSeries()
 {
     Data           = new double[0, 0];
     InternalSeries = new OxyPlot.Series.HeatMapSeries {
         Data = Data
     };
 }
Example #2
0
        public PlotViewModel(PICPlot plot)
        {
            this.PICPlot = plot;
            this.PlotModel = new PlotModel { };
            var backgroundBrush = (Brush)ThemeManager.DetectAppStyle(Application.Current).Item1.Resources["WindowBackgroundBrush"];
            PlotModel.Background = backgroundBrush.ToOxyColor();

            switch (plot.PlotType)
            {
                case PlotType.Heatmap:
                    PlotModel.Axes.Add(new LinearColorAxis
                    {
                        HighColor = OxyColors.Gray,
                        LowColor = OxyColors.Black,
                        Position = AxisPosition.Right
                    });
                    PlotModel.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom });
                    PlotModel.Axes.Add(new LinearAxis());
                    HeatMapSeries = new HeatMapSeries
                    {
                        X1 = 0.1,
                        Y0 = 0,
                        Y1 = 0.1,
                        Interpolate = true
                    };
                    PlotModel.Series.Add(HeatMapSeries);
                    break;
                case PlotType.Line:

                    PlotModel.InvalidatePlot(true);
                    OnPropertyChanged("PlotModel");
                    break;
                case PlotType.Trajectories:
                    PlotModel.InvalidatePlot(true);
                    OnPropertyChanged("PlotModel");
                    break;
                default:
                    throw new ArgumentOutOfRangeException();
            }
        }
        private void Initialize_EnergyScaleHeatMap(PlotModel energyscale_heatmap_plot, OxyPlot.Series.HeatMapSeries energyscale_heatmap, State_Variables state)
        {
            //scaletime_plot.PlotAreaBorderThickness = new OxyThickness(0.0);
            energyscale_heatmap_plot.PlotMargins     = new OxyThickness(0.0);
            energyscale_heatmap_plot.TitleFontWeight = 5;

            OxyPlot.Axes.LinearColorAxis xy = new OxyPlot.Axes.LinearColorAxis();
            xy.Palette = OxyPalettes.Jet(500);
            //xy.HighColor = OxyColors.Gray;
            //xy.LowColor = OxyColors.Black;
            //xy.Position = OxyPlot.Axes.AxisPosition.Right;
            energyscale_heatmap_plot.Axes.Add(xy);

            energyscale_heatmap.Interpolate  = true;
            energyscale_heatmap.RenderMethod = OxyPlot.Series.HeatMapRenderMethod.Bitmap;
            energyscale_heatmap_plot.Series.Add(energyscale_heatmap);

            energyscale_heatmap.X0 = 0.0;
            energyscale_heatmap.X1 = state.Num_ScaleBins;
        }