如何在 gnuplot 中的轴上以 2 个不同的比例进行绘图

发布于 2024-11-03 22:10:52 字数 238 浏览 0 评论 0原文

我想在 x 轴范围 [0:1] 和 y 轴范围 [0:100] 上绘制一些数据,但在 x 轴上,我的大部分数据在 [0:0.1] 范围内,其余数据较少范围。因此我想扩大 [0:0.1] 范围。我无法对 x 轴使用对数刻度,因为我有一些数据为 0,如果使用对数刻度,则无法绘制它。有没有办法在 Gnuplot 中绘制它?

理想情况下,我想对 x 轴应用对数刻度,但从 0 开始绘图。这将帮助我覆盖所有数据并突出显示 [0:0.1] 范围。能做到吗?

I want to plot some data on x axis range [0:1] and y axis range [0:100], but on the x axis I have most of my data in range [0:0.1] and less data in the rest of the range. I thus wanted to expand the [0:0.1] range. I cannot use a logarithmic scale for the x axis as I have some data which is 0 and I cannot plot it if I use a logarithmic scale. Is there a way for plotting this in Gnuplot?

Ideally I would want to apply a logarithmic scale to the x axis, but start my plot from 0. That would help me to cover all the data and highlight the [0:0.1] range as well. Can it be done?

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

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

发布评论

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

评论(2

待"谢繁草 2024-11-10 22:10:52

正如您所指出的,不可能有 0 的对数刻度。我会并排使用两个图表,并具有单独的 x 轴。您可以通过设置多图布局 1,2 来完成此操作。

As you noted, it is impossible to have a logarithmic scale with a 0. I would use two graphs side by side, with separate x axes. You can do this through set multiplot layout 1,2.

千鲤 2024-11-10 22:10:52

我同意斯万特的观点。另一种选择是在同一图中引入第二个 x 轴。然后,一个 x 轴将从 0:0.1 开始缩放,另一个 x 轴将从 0:1 开始缩放。 取决于您的数据,但是这种方法可能会非常令人困惑,但我认为特别是如果您的数据主要位于 0:0.1 之间,这可能会起作用。

I agree with Svante. An other option would be to introduce a second x-axis in the same plot. Then one x-axis would scale from 0:0.1 and the other would scale from 0:1. Depending on your data however this approach could be very confusing but I think especially if your data is primarily located between 0:0.1 this could work.

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