Draw a line in a pm3d map

一曲冷凌霜 提交于 2019-12-02 01:49:31

问题


I have a

and I want to overplot on it a

.

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.

This is my script:

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 

And here the two files: line and density map.

It is possible to overplot them, in gnuplot?

Thanks a lot for your help !


回答1:


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 

in order to plot line.txt as line:



来源:https://stackoverflow.com/questions/27206379/draw-a-line-in-a-pm3d-map

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!