gpt4 book ai didi

c# - vb.net 或 c# 中 X2Axis 中的 Zedgraph 幅度问题

转载 作者:行者123 更新时间:2023-11-30 22:20:21 26 4
gpt4 key购买 nike

我很难尝试使用 zedgraph 获取 excel 半对数图:

enter image description here

我目前有:

enter image description here

为此我有

Dim pane As New GraphPane()
'reverse order
pane.X2Axis.IsVisible = True
pane.XAxis.IsVisible = False
pane.YAxis.Scale.IsReverse = True
pane.YAxis.Scale.IsPreventLabelOverlap = True
' log type
pane.X2Axis.Type = AxisType.Log
pane.AxisChange()
' the y axis scale
pane.YAxis.Scale.Min = -20
pane.YAxis.Scale.Max = 120
'here I tried to manipulat x axis but had no success

'the data

Dim list As New PointPairList()
Dim list2 As New PointPairList()
list.Add(0, 0)
list.Add(125, 0)
list.Add(250, 0)
list.Add(500, 5)
list.Add(750, 5)
list.Add(1000, 10)
list.Add(1500, 10)
list.Add(2000, 5)
list.Add(3000, 10)
list.Add(4000, 10)
list.Add(6000, 10)
list.Add(8000, 20)
list2.Add(125, 30)
list2.Add(500, 30)
list2.Add(750, 40)
list2.Add(1000, 50)
list2.Add(1500, 65)
list2.Add(2000, 65)
list2.Add(3000, 70)
list2.Add(4000, 80)
list2.Add(6000, 90)
list2.Add(8000, 100)
Dim myCurve As LineItem = pane.AddCurve("Series 1", list, Color.Blue, SymbolType.Diamond)
Dim myCurve2 As LineItem = pane.AddCurve("Series 2", list2, Color.Magenta, SymbolType.Square)

如您所见,x2=125,250,500,750,1 的数据与 EXCEL Semi Log plot 不相似,因为 zedgraph 的数字非常小 仅在这部分....

如何用zedgraph得到想要的excel图表?有没有办法只缩放那部分或其他东西?为什么会出现 10^-1, 10^0 ,10^1 ?而不是 10^2, 10^3 10^4

最佳答案

您需要设置轴最小值。

chart.GraphPane.YAxis.Scale.Min = 0;
chart.GraphPane.YAxis.Scale.Max = 100;

或类似的东西。确保添加 GraphPane 部分。我希望这行得通;同样,我无法测试它,因为我实际上没有在我当前的机器上安装这个模块。

This如果你经常使用 ZedGraph,这是一个非常有用的东西。我在这里被其他人指出了这一点,但我找不到他们的帖子来给予他们信任。

关于c# - vb.net 或 c# 中 X2Axis 中的 Zedgraph 幅度问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15044886/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com