public void Test_HiddenLines_RenderAsThickAsMarkers() { var mplt = new MultiPlot(800, 300, 1, 2); mplt.GetSubplot(0, 0).PlotSignal(DataGen.Sin(10000), markerSize: 10); mplt.GetSubplot(0, 0).Title("Zoomed Out"); mplt.GetSubplot(0, 1).PlotSignal(DataGen.Sin(10000), markerSize: 10); mplt.GetSubplot(0, 1).Title("Zoomed In"); mplt.GetSubplot(0, 1).Axis(0, 20, -.1, .1); TestTools.SaveFig(mplt); }
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()); }
public void Test_Legend_LooksGoodInEveryPosition() { var mplt = new MultiPlot(1000, 800, 3, 3); legendLocation[] locs = Enum.GetValues(typeof(legendLocation)).Cast <legendLocation>().ToArray(); for (int i = 0; i < locs.Length; i++) { var plt = mplt.subplots[i]; plt.PlotScatter(DataGen.Consecutive(20), DataGen.Sin(20), markerShape: MarkerShape.filledSquare, label: "sin"); plt.PlotScatter(DataGen.Consecutive(20), DataGen.Cos(20), markerShape: MarkerShape.openDiamond, label: "cos"); plt.Legend(location: locs[i]); plt.Title(locs[i].ToString()); } TestTools.SaveFig(mplt); }
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()); }