Beispiel #1
0
            public void Render(Plot plt)
            {
                var boxAndWiskers = new Statistics.BoxAndWhisker[3];

                boxAndWiskers[0] = Statistics.BoxAndWhiskerFromData.OutlierQuartileMedian(Data.LineLengths.plot, 1);
                boxAndWiskers[1] = Statistics.BoxAndWhiskerFromData.OutlierQuartileMedian(Data.LineLengths.formsPlot, 2);
                boxAndWiskers[2] = Statistics.BoxAndWhiskerFromData.OutlierQuartileMedian(Data.LineLengths.wpfPlot, 3);

                plt.Title("Source Code Line Length");
                plt.PlotBoxAndWhisker(boxAndWiskers);
                plt.YLabel("Number of Characters");

                double[] xPositions = { 1, 2, 3 };
                string[] labels     = { "Plot.cs", "FormsPlot.cs", "WpfPlot.cs" };
                plt.XTicks(xPositions, labels);

                plt.AxisAuto(.3, .2);
            }
Beispiel #2
0
            public void Render(Plot plt)
            {
                var boxAndWiskers = new Statistics.BoxAndWhisker[3];

                boxAndWiskers[0] = Statistics.BoxAndWhiskerFromData.OutlierQuartileMedian(Data.LineLengths.plot, 1);
                boxAndWiskers[1] = Statistics.BoxAndWhiskerFromData.OutlierQuartileMedian(Data.LineLengths.formsPlot, 2);
                boxAndWiskers[2] = Statistics.BoxAndWhiskerFromData.OutlierQuartileMedian(Data.LineLengths.wpfPlot, 3);

                // note: this is how to add experimental plottables (which don't have methods in the Plot module)
                PlottableBoxAndWhisker boxAndWhiskerPlot = new PlottableBoxAndWhisker(boxAndWiskers);
                List <Plottable>       plottablesList    = plt.GetPlottables();

                plottablesList.Add(boxAndWhiskerPlot);

                plt.Title("Source Code Line Length");
                plt.YLabel("Number of Characters");

                double[] xPositions = { 1, 2, 3 };
                string[] labels     = { "Plot.cs", "FormsPlot.cs", "WpfPlot.cs" };
                plt.XTicks(xPositions, labels);

                plt.AxisAuto(.3, .2);
            }