gnuplot在绘图范围之外的点之间绘制线 [英] gnuplot draw line between points outside plot range

查看:86
本文介绍了gnuplot在绘图范围之外的点之间绘制线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下内容在两点之间画了一条线:

The following draws a line between two points:

$myData<<EOD
10 0
20 10
EOD
plot $myData u 1:2 w l

只要两个点中的至少一个在x/yrange范围内,此方法就可以正常工作.但是,如果放大以使两个点都在轴范围之外,则会显示一个空图表:

This works fine as long as at least one of the two points is within the x/yrange. However, if you zoom in so that both points are outside the axes ranges, an empty chart is shown:

set yr[0:10]
set xr[12:18]

此行为与Excel仍然显示该行的行为不同.任何想法如何在gnuplot中做到这一点,即,即使点本身不在绘图范围之内,我也需要查看两个点之间的连接线.

This behavior is different from Excel which still shows the line. Any idea how to do this in gnuplot, i.e. I need to see the connecting lines between two points even if the points themselves are outside the plotting range.

推荐答案

使用该选项

set clip two

从文档中:

某些线的两个端点可能超出范围,但会穿过图形.设置两个clip-type可以绘制这些线的可见部分.

Some lines may have both endpoints out of range, but pass through the graph. Setting the two clip-type allows the visible portion of these lines to be drawn.

这篇关于gnuplot在绘图范围之外的点之间绘制线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆