我可以在 ZedGraph 中创建这种类型的图表吗?

发布于 2024-07-13 17:21:03 字数 277 浏览 6 评论 0原文

假设 ZedGraph 中有一条 y 轴从 -10 到 +10 的正弦曲线。 我希望能够对曲线施加限制(假设最小值为 -5,最大值为 +7),这样任何低于 -5 和高于 +7 的内容都会被遮蔽,而中间的所有内容都会被遮蔽不是。 这在 ZedGraph 中可能吗?

这在任何开源 .NET 图表库(免费商业用途)中都可能实现吗?

Let's say I have a sine curve in ZedGraph that goes from -10 to +10 on the y-axis. I'd like to be able to put limits on the curve (let's say a minimum of -5, and a maximum of +7), such that anything below -5 and anything above +7 is shaded, and everything in the middle is not. Is this possible in ZedGraph?

Is this possible in any open source .NET charting libraries (free commercial use)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡墨 2024-07-20 17:21:03

我可以看到三个路线(不能说我已经尝试过),如果您想对整个图形区域进行着色,那么这两个中的任何一个:

(1)使用 BoxObj,并使用 alpha 值定义的 Fill - 这应该是完全灵活。 BoxObj 用于演示的底部。

(2) 使用填充绘图样式,如此处,您也可以在此处看到如何定义半透明填充。 不知道如何控制填充的位置(即图形最小值或最大值)而不是 x 轴。

或者,如果您只想对点进行着色,那么您可以有条件地构建曲线对象。

I can see three routes (can't say I've tried them), if you want to shade the whole graph area then either of these two:

(1) Use BoxObj, with a Fill defined with an alpha value - this should be completely flexible. BoxObj is used towards the bottom of this demo.

(2) Use a filled plot style as shown here, you can see how a semi-transparent fill is defined here as well. Not sure how to control where the fill goes (i.e the graph min or max) rather than to the x-axis.

Alternatively if you just want to shade the points, then you could build the curve objects conditionally.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文