public void Test_Layout_RotatedTicksWithRoom() { var plt = new ScottPlot.Plot(400, 300); var s1 = plt.AddSignal(DataGen.Sin(51)); var s2 = plt.AddSignal(DataGen.Cos(51)); s1.OffsetX = 1e6; s2.OffsetX = 1e6; // WARNING: this resets the layout, so you must call Layout() after this plt.XLabel("horizontal axis label"); plt.XAxis.TickLabelStyle(rotation: 45); plt.Layout(bottom: 50); TestTools.SaveFig(plt); }
public void Test_Layout() { int pointCount = 50; double[] dataXs = DataGen.Consecutive(pointCount); double[] dataSin = DataGen.Sin(pointCount); double[] dataCos = DataGen.Cos(pointCount); var plt = new ScottPlot.Plot(); plt.PlotScatter(dataXs, dataSin); plt.PlotScatter(dataXs, dataCos); plt.Title("Very Complicated Data"); plt.XLabel("Experiment Duration"); plt.YLabel("Productivity"); TestTools.SaveFig(plt); }
public void Test_AxisLine_FarAwayExpandXY() { Random rand = new Random(0); var plt = new ScottPlot.Plot(); var data = DataGen.RandomWalk(rand, 100); var sig = plt.AddSignal(data); sig.OffsetX = 100; sig.OffsetY = 100; sig.Label = "scatter"; plt.AddVerticalLine(-100, label: "vertical"); plt.AddHorizontalLine(-100, label: "horizontal"); plt.Legend(); TestTools.SaveFig(plt); }
public void Test_ClearType_Transparency() { ScottPlot.Plot plt = new(300, 200); plt.Style(figureBackground: System.Drawing.Color.Transparent); ScottPlot.Drawing.GDI.ClearType(true); TestTools.SaveFig(plt, "ClearType-Transparent"); ScottPlot.Drawing.GDI.ClearType(false); TestTools.SaveFig(plt, "AntiAlias-Transparent"); plt.Style(figureBackground: System.Drawing.SystemColors.Control); ScottPlot.Drawing.GDI.ClearType(true); TestTools.SaveFig(plt, "ClearType-OnGray"); ScottPlot.Drawing.GDI.ClearType(false); TestTools.SaveFig(plt, "AntiAlias-OnGray"); }
public void Test_Layout_LabelsWithLineBreaks() { int pointCount = 50; double[] dataXs = DataGen.Consecutive(pointCount); double[] dataSin = DataGen.Sin(pointCount); double[] dataCos = DataGen.Cos(pointCount); var plt = new ScottPlot.Plot(); plt.PlotScatter(dataXs, dataSin); plt.PlotScatter(dataXs, dataCos); string labelWithLineBreak = "Line One\nLine Two"; plt.Title(labelWithLineBreak, fontSize: 30); plt.XLabel(labelWithLineBreak); plt.YLabel(labelWithLineBreak); TestTools.SaveFig(plt); }
public void Test_Colorset_HalfDark() => TestTools.SaveFig(TestColormap(Palette.OneHalfDark, 3, true));
public void Test_Colorset_Half() => TestTools.SaveFig(TestColormap(Palette.OneHalf, 3));
public void Test_Colorset_Cat20() => TestTools.SaveFig(TestColormap(Palette.Category20, 1));
public void Test_Colorset_Cat10() => TestTools.SaveFig(TestColormap(Palette.Category10, 2));
public void Test_Colorset_Nord() => TestTools.SaveFig(TestColormap(Palette.Nord, 3));
public void Test_Colorset_Aurora() => TestTools.SaveFig(TestColormap(Palette.Aurora, 3));
public void Test_Colorset_HalfDark() => TestTools.SaveFig(TestColormap(ScottPlot.Drawing.Palette.OneHalfDark, 3, true));
public void Test_Colorset_Cat20() => TestTools.SaveFig(TestColormap(ScottPlot.Drawing.Palette.Category20, 1));
public void Test_Colorset_Nord() => TestTools.SaveFig(TestColormap(ScottPlot.Drawing.Palette.Nord, 3));
public void Test_Colorset_Aurora() => TestTools.SaveFig(TestColormap(ScottPlot.Drawing.Palette.Aurora, 3));