Skip to content

Commit c1a83a8

Browse files
committed
Add example for #1029
1 parent 7af6cad commit c1a83a8

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

  • Source/Examples/ExampleLibrary/Issues

Source/Examples/ExampleLibrary/Issues/Issues.cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1825,6 +1825,34 @@ public static PlotModel LogarithmicAxisReversed()
18251825
return model;
18261826
}
18271827

1828+
[Example("#1029: LineAnnotation (loglin axes)")]
1829+
public static PlotModel Issue1029LogLin()
1830+
{
1831+
var plotModel1 = new PlotModel
1832+
{
1833+
Title = "Possible Infinite Loop in LineAnnotation.GetPoints() when Minimum=Maximum",
1834+
};
1835+
plotModel1.Axes.Add(new LogarithmicAxis { Position = AxisPosition.Left, Minimum = 0, Maximum = 10 });
1836+
plotModel1.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom, Minimum = 0, Maximum = 8 });
1837+
plotModel1.Annotations.Add(new LineAnnotation { Type = LineAnnotationType.Vertical, X = 4, MinimumY = 2, MaximumY = 2 });
1838+
plotModel1.Annotations.Add(new LineAnnotation { Type = LineAnnotationType.Horizontal, Y = 2, MinimumX = 2, MaximumX = 2 });
1839+
return plotModel1;
1840+
}
1841+
1842+
[Example("#1029: LineAnnotation (linlin axes)")]
1843+
public static PlotModel Issue1029LinLin()
1844+
{
1845+
var plotModel1 = new PlotModel
1846+
{
1847+
Title = "Possible Infinite Loop in LineAnnotation.GetPoints() when Minimum=Maximum",
1848+
};
1849+
plotModel1.Axes.Add(new LinearAxis { Position = AxisPosition.Left, Minimum = 0, Maximum = 10 });
1850+
plotModel1.Axes.Add(new LinearAxis { Position = AxisPosition.Bottom, Minimum = 0, Maximum = 8 });
1851+
plotModel1.Annotations.Add(new LineAnnotation { Type = LineAnnotationType.Vertical, X = 4, MinimumY = 2, MaximumY = 2 });
1852+
plotModel1.Annotations.Add(new LineAnnotation { Type = LineAnnotationType.Horizontal, Y = 2, MinimumX = 2, MaximumX = 2 });
1853+
return plotModel1;
1854+
}
1855+
18281856
/* NEW ISSUE TEMPLATE
18291857
[Example("#123: Issue Description")]
18301858
public static PlotModel IssueDescription()

0 commit comments

Comments
 (0)