在pm3d地图中画一条线 [英] Draw a line in a pm3d map

查看:82
本文介绍了在pm3d地图中画一条线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个,我想在上面绘制一个.

I have a and I want to overplot on it a .

我将这条线定义为高度恒定的3d线,并且我认为使用这种方法可以将它们彼此重叠绘制,但是不幸的是,我失败了. 我实际上意识到gnuplot中的密度图例程也占据了线的点.

I define the line as a 3d line with constant height and I thought that with this method I have the possibility to overplot them one to another but, unfortunately, I failed. I realized in fact that the density map routine in gnuplot take the points of the line too.

这是我的脚本:

reset

#set terminal pngcairo size 800,500 enhanced font 'Verdana,14'
#set output "map.png"
set title 'Map'


m_star=1.054
m_1=0.0093866
m_3=0.0078635

fact1 = (m_star+m_1)**0.5
fact2 = (m_star+m_3)**0.5

set pm3d map interpolate 1,1
set xrange [50.22:52.27]
set yrange [30.29:31.17]

splot "file.txt" u (fact1)*(($1)**(-1.5)):(fact2)*(($2)**(-1.5)):6 notitle ,\
      "line.txt" notitle 

这是两个文件: line 是否可以在gnuplot中对它们进行过度绘制?

It is possible to overplot them, in gnuplot?

非常感谢您的帮助!

推荐答案

如果您set pm3d,则此样式将用于所有绘图,除非您明确指定其他绘图样式.所以你必须使用

If you set pm3d, this style is used for all plots unless you explicitely specify a different plotting style. So you must use

splot "file.txt" u (fact1)*(($1)**(-1.5)):(fact2)*(($2)**(-1.5)):6 ,\
      "line.txt" with lines 

以便将line.txt绘制为线:

这篇关于在pm3d地图中画一条线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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