gpt4 book ai didi

gnuplot - 使用 gnuplot,如何 'cut out' 使用图形的 y 轴区域

转载 作者:行者123 更新时间:2023-12-04 19:04:31 24 4
gpt4 key购买 nike

我试图绘制一个图形,在 Y 轴上我有 CPU 利用率,当前范围是 0-100%。我的数据只包含 0-20% 和 80-100%,而我只有 20-80% 的大空白。有什么办法可以“剪掉”这个空白区域,让观众可以更详细地看到 0-20% 和 80-100% 范围内发生的事情?

谢谢你。

最佳答案

正如 Christoph 在评论中所说,这需要使用 set multiplot 手动完成。和删除边框等。一个例子:

set multiplot
# remove border and ytics from right hand side
set border 7
set ytics nomirror
# set top and bottom margins for both halves of the plot
set tmargin at screen 0.96
set bmargin at screen 0.1
# set left and right margins for left half of the plot
set lmargin at screen 0.1
set rmargin at screen 0.5
# set xrange for left half of the plot
set xrange [0:2*pi]
# set some lines to delimit transition from one half of the plot to next
set arrow from screen 0.50,0.08 to screen 0.52,0.12 nohead
set arrow from screen 0.49,0.08 to screen 0.51,0.12 nohead
set arrow from screen 0.50,0.94 to screen 0.52,0.98 nohead
set arrow from screen 0.49,0.94 to screen 0.51,0.98 nohead
# plot left half
plot sin(x) not
# remove border from left hand side and set ytics on the right
set border 13
unset ytics
set y2tics
set format y2 ""
# set left and right margins for right half of the plot
set lmargin at screen 0.51
set rmargin at screen 0.91
# set xrange for right half of the plot
set xrange [13.5:13.5+2*pi]
# plot
plot sin(x) axes x1y2

enter image description here

关于gnuplot - 使用 gnuplot,如何 'cut out' 使用图形的 y 轴区域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28653741/

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