1
votes

I'm trying to add some guiding lines over a pm3d map using Gnuplot.

Below is the code I use to plot pm3d map (my pm3d map).

set terminal post eps enhanced color solid "Helvetica" 16
set encoding iso_8859_1
set hidden3d
set pm3d map
set view map
unset surface
set size square
splot "map.ene" with image
set xlabel "RC1 ({\305})"
set ylabel "RC2 ({\305})"
set cblabel "{/Symbol D}G (kcal/mol)" offset 1,0,0
set xrange ["1":"11"]
set yrange ["5.5":"9.5"]
set cbrange ["-3.1":"0.0"]
set xtics 1
set ytics 1
set cbtics 1
set mxtics 2
set mytics 5
unset key
set palette defined (-3.1 "red", -2.5 "yellow", -1.5 "green", -0.5 "blue", 0 "white")
unset colorbox
set output "map.eps"
replot

map.ene is in the format below:

1.000 5.500 0.00000 i

Now I want to add a vertical line (x=5.5) over the pm3d figure. I searched old posts and found similar questions already been asked by others. Seems there are two possible solutions:

1) prepare a separate data file for the line (x.dat, 5.5,y,0.0) then use command below to plot.

splot "map.ene" with pm3d, "x.dat" using 1:2:(0.0) with points linecolor rgb "black"

2) use "multiplot" facility in Gnuplot.

I tried both, neither worked. I've been playing this for a while but sill not sure how I should modify my original pm3d code to add guiding lines.

1
possible duplicate of : stackoverflow.com/questions/4499998/…bibi

1 Answers

1
votes

you can draw lines in gnuplot:

set arrow from first 5.5, graph 0 to first 5.5, graph 1 nohead

type help coordinates to better tune the above command.