gnuplot: Plot in correct scale & position on top of image

旧街凉风 提交于 2019-11-28 13:50:06

You don't need to use multiplot for this, just plot the two files with a single plot command (Thanks for the hint :)):

reset
set size ratio 1
set autoscale fix
set key above autotitle columnhead
set palette defined (0 "black", 0.25 "blue", 0.5 "red", 0.75 "yellow", 1 "green")
plot 'BL.jpg' binary filetype=jpg center=(0,0) with rgbimage notitle,\
     'output.txt' using 1:2:3 with points palette pt 6 ps 0.1 title columnheader(1)

This gives:

Notes:

  • set autoscale fix uses tight ranges (for x, y and cb), without expanding to the next tic.

  • Using center=(0,0) removes the last explicit dependency on the exact image dimensions

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