Exemplo n.º 1
0
        void SetupScatterPlots()
        {
            // Create a plot that uses the data source method
            var dataSourceLinePlot = new CPTScatterPlot {
                CachePrecision = CPTPlotCachePrecision.Double,
                DataLineStyle  = new CPTLineStyle {
                    LineWidth = 2,
                    LineColor = CPTColor.GreenColor
                },
                // For Kang, check this out:
                DataSource = new RandomSamplesSource(),
                PlotSymbolMarginForHitDetection = 5
            };

            graph.AddPlot(dataSourceLinePlot);

            // Create a plot for the selection marker
            var selectionPlot = new CPTScatterPlot {
                CachePrecision = CPTPlotCachePrecision.Double,
                DataLineStyle  = new CPTLineStyle {
                    LineWidth = 3,
                    LineColor = CPTColor.RedColor
                },
            };

            graph.AddPlot(selectionPlot);

            var space = graph.DefaultPlotSpace as CPTXYPlotSpace;

            space.ScaleToFitPlots(new CPTPlot [] { dataSourceLinePlot });

            // Setting these will lock the scrolling on each direction:
            //space.GlobalXRange = new CPPlotRange (NSNumber.FromDouble (-1).NSDecimalValue, NSNumber.FromDouble (10).NSDecimalValue);
            //space.GlobalYRange = new CPPlotRange (NSNumber.FromDouble (-5).NSDecimalValue, NSNumber.FromDouble (10).NSDecimalValue);
        }
Exemplo n.º 2
0
 public override CPTPlotSymbol GetSymbol(CPTScatterPlot plot, int recordIndex)
 {
     return(CPTPlotSymbol.DiamondPlotSymbol);
 }
Exemplo n.º 3
0
 public override CPTPlotSymbol GetSymbol (CPTScatterPlot plot, int recordIndex)
 {
     return CPTPlotSymbol.DiamondPlotSymbol; 
 }
Exemplo n.º 4
0
 void SetupScatterPlots ()
 {
     // Create a plot that uses the data source method
     var dataSourceLinePlot = new CPTScatterPlot {
         CachePrecision = CPTPlotCachePrecision.Double,
         DataLineStyle = new CPTLineStyle {
             LineWidth = 2,
             LineColor = CPTColor.GreenColor
         },
         // For Kang, check this out:
         DataSource = new RandomSamplesSource (),
         PlotSymbolMarginForHitDetection = 5
     };
     graph.AddPlot (dataSourceLinePlot);
     
     // Create a plot for the selection marker
     var selectionPlot = new CPTScatterPlot {
         CachePrecision = CPTPlotCachePrecision.Double,
         DataLineStyle = new CPTLineStyle {
             LineWidth = 3,
             LineColor = CPTColor.RedColor
         },
     };
     graph.AddPlot (selectionPlot);  
     
     var space = graph.DefaultPlotSpace as CPTXYPlotSpace;
     space.ScaleToFitPlots (new CPTPlot [] { dataSourceLinePlot });
     
     // Setting these will lock the scrolling on each direction:
     //space.GlobalXRange = new CPPlotRange (NSNumber.FromDouble (-1).NSDecimalValue, NSNumber.FromDouble (10).NSDecimalValue);
     //space.GlobalYRange = new CPPlotRange (NSNumber.FromDouble (-5).NSDecimalValue, NSNumber.FromDouble (10).NSDecimalValue);
 }