コード例 #1
0
            public System.Drawing.Bitmap Render(int width, int height)
            {
                Random rand = new Random(0);

                var mp = new MultiPlot(width: width, height: height, rows: 2, cols: 2);

                mp.GetSubplot(0, 0).PlotSignal(DataGen.Sin(50));
                mp.GetSubplot(0, 1).PlotSignal(DataGen.Cos(50));
                mp.GetSubplot(1, 0).PlotSignal(DataGen.Random(rand, 50));
                mp.GetSubplot(1, 1).PlotSignal(DataGen.RandomWalk(rand, 50));

                return(mp.GetBitmap());
            }
コード例 #2
0
            public System.Drawing.Bitmap Render(int width, int height)
            {
                Random rand = new Random(0);

                var mp = new MultiPlot(width: width, height: height, rows: 2, cols: 2);

                mp.GetSubplot(0, 0).PlotSignal(DataGen.Sin(50));
                mp.GetSubplot(0, 1).PlotSignal(DataGen.Cos(50));
                mp.GetSubplot(1, 0).PlotSignal(DataGen.Random(rand, 50));
                mp.GetSubplot(1, 1).PlotSignal(DataGen.RandomWalk(rand, 50));

                // adjust the bottom left plot to match the bottom right plot
                var plotToAdjust  = mp.GetSubplot(1, 0);
                var plotReference = mp.GetSubplot(1, 1);

                plotToAdjust.SetAxisLimits(plotReference.GetAxisLimits());
                plotToAdjust.MatchLayout(plotReference);

                return(mp.GetBitmap());
            }