ScottPlot.NET
GitHub Repo stars

Triangular Axis Edge Styling

Styling options for edge lines, tick marks, tick labels, and title text may be customized individually for each axis.

ScottPlot.Plot myPlot = new();

var ta = myPlot.Add.TriangularAxis();

// the edge line extends from one corner to the other
ta.Left.EdgeLineStyle.Width = 3;
ta.Left.EdgeLineStyle.Color = Colors.Blue;

// tick labels and marks may be styled individually
ta.Left.TickLabelStyle.ForeColor = Colors.Blue;
ta.Left.TickMarkStyle.Color = Colors.Blue;
ta.Left.TickMarkStyle.Width = 3;
ta.Left.TickOffset = new(-10, 0);
ta.Left.TickLabelStyle.Bold = true;
ta.Left.TickLabelStyle.OffsetX = -4;

// an axis title may be added and styled
ta.Left.LabelText = "Hello, World";
ta.Left.LabelStyle.ForeColor = Colors.Blue;
ta.Left.LabelStyle.FontSize = 26;
ta.Left.LabelStyle.Bold = false;
ta.Left.LabelStyle.OffsetX = -20;

// Add sample data
Coordinates[] points = [
    ta.GetCoordinates(0.50, 0.40),
    ta.GetCoordinates(0.60, 0.40),
    ta.GetCoordinates(0.65, 0.50),
];
myPlot.Add.Markers(points, MarkerShape.FilledCircle, 10, Colors.Red);

myPlot.SavePng("demo.png", 400, 300);
This recipe is one of many in the Triangular Axis category