SharpPlot Tutorials > Style Examples > Cropped Axes Cropped Axes
When you clip data to either the X or Y axes, SharpPlot removes data points that lie outside the range and segments any lines at the boundaries. However it does not physically crop the image, as you generally want to see all of a marker that lies right on the edge.
By setting this style, you enforce cropping at the edges, so thick angled lines are trimmed to an oblique end and markers are only partly shown. Value tags may also be partly eliminated.
sp.LineGraphStyle |= LineGraphStyles.CroppedAxes;
sp.SetXRange(10);
sp.SetYRange(100);
sp.XAxisStyle = XAxisStyles.Clipped;
sp.YAxisStyle = YAxisStyles.Clipped;
Note that the cropping is done by the graphics engine used to output the final chart. All engines except VML support cropping very well, so this style will not work as you expect in charts output to VML.
The Framed Axes style always crops, as it assumes that nothing should show outside the frame.
Send comments on this topic © Dyalog Ltd 2021
|