Help using scatter plot and Heatmap in Oxyplot winform

Oystein Bjorke hace 10 años 0
This discussion was imported from CodePlex

Meyip wrote at 2013-04-02 07:25:

Hi everyone, I'm a newbie to C# (coming from C and C++). I found Oxyplot's examples to be of some help. But would rather ask the following, since I've spent days searching and can't find an answer.

Here's what I'm trying to do.
Create a C# Winform App to graph data from the serial port on a Scatter Plot, then a Heat map using Oxyplot.

I've gotten my C# program to read the serial data and output a multidimensional integer array in the form (int[x,y]). Now after copying the code from the Oxyplot example files in the downloads section, all I see when I run the code is a plain graph. How do I graph data from my multidimensional array into the Scatter and HeatMap graphs? The code bellow is what I'm currently dealing with in regards to Oxyplot. Thanks ahead for you help.
  //   [Example("ScatterSeries with random MarkerSize (n=1000)")]

            var plotModel1 = new PlotModel();
            plotModel1.Subtitle = "BinSize = 8";
            plotModel1.Title = "ScatterSeries with random MarkerSize (n=1000)";
            var linearAxis1 = new OxyPlot.Axes.LinearAxis();
            linearAxis1.Position = OxyPlot.Axes.AxisPosition.Bottom;
            plotModel1.Axes.Add(linearAxis1);
            var linearAxis2 = new OxyPlot.Axes.LinearAxis();
            plotModel1.Axes.Add(linearAxis2);
            var scatterSeries1 = new OxyPlot.Series.ScatterSeries();
            scatterSeries1.BinSize = 8;
            scatterSeries1.MarkerStrokeThickness = 0;
            scatterSeries1.Title = "Series 1";
            plotModel1.Series.Add(scatterSeries1);
            // return plotModel1;
       


            plot1.Model = plotModel1;

Meyip wrote at 2013-04-04 16:34:

Never mind, I was able to view what I needed by reviewing different code from different examples. Great job on putting together Oxyplot. Good luck.