去掉对面的轴,可以全部去掉,也可以只剩下x轴或者Y轴。
GraphPane myPane = zedGraphControl1.GraphPane;
LineItem myCurve = myPane.AddCurve("Parabola",
list1, Color.Red, SymbolType.None);
myPane.Title.Text = "";
myPane.Legend.IsVisible = false;
myPane.YAxis.Title.Text = "";
// Set the Y axis intersect the X axis at an X value of 0.0
//myPane.YAxis.Cross = 0.0;
// Turn off the axis frame and all the opposite side tics
myPane.Chart.Border.IsVisible = false; //去除border
myPane.XAxis.MajorTic.IsOpposite = false; //去线
myPane.XAxis.MinorTic.IsOpposite = false;
myPane.YAxis.MajorTic.IsOpposite = false;
myPane.YAxis.MinorTic.IsOpposite = false;

本文介绍如何使用ZedGraph库进行图表自定义设置,包括去除图表边框、取消显示坐标轴的对侧刻度等操作,以实现更加美观且符合需求的图形展示。
420

被折叠的 条评论
为什么被折叠?



