如何创建日志轴并在 Zedgraph 中包含所有 tic 标签 (C#)
我在一个项目中使用 Zedgraph 有多个图表,并且取得了巨大的成功。我遇到的唯一问题是按照我想要的方式格式化日志类型轴。我设法摆脱了科学记数法,但我想在标签中包含的不仅仅是 10 的幂。
一点澄清:我想保持数据格式为对数刻度,但显示标签更像是常规线性图。
有人在这方面取得过成功吗?如果需要的话,我可以毫无问题地编辑源代码,只是很难找到执行此操作的最佳位置。
I have multiple graphs using Zedgraph in a project, and I have met with great success. The only issue I am running into is formatting a log type axis the way I want it. I managed to get rid of the scientific notation, but I want to include more than just the powers of 10 in my labels.
A little clarification: I would like to keep the data formatted in a log scale, but display labels more like a regular linear graph.
Has anyone had an success with this? I have no problem editing the source if need be, just having a hard time finding the best place to do this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,以防万一其他人正在寻找这个答案,我已经找到了。可能有一种无需编辑源代码的方法,但这是一个真正简单的修复方法。您只需打开源代码并导航到 LogScale 类。有一个名为 PickScale 的方法,它包含将步长默认设置为 1 的代码。在对数轴中,此步长是指数,因此通过降低它,您可以获得比 10 秒更多的值。
Ok, just in case anyone else is looking for this answer, I have found it. There may be a way without editing the source code, but it is a real easy fix. You just open up the source and navigate to the LogScale class. There is a method called PickScale, and it contains the code that defaults the step to 1. In a log axis, this step is the exponent, so by lowering it you can get more values than just 10s.