|
From: Vahid A. <vh2...@da...> - 2021-05-30 22:03:52
|
Dear Gnuplot Community,
The following script combines 4 subplots into one single plot with no spacing between subplots. The y-axis is log scale.
set term pdf size 4,3 enhanced font 'Times New Roman,16’
# Physical constants and conversion factors
PI = 3.14159
h_bar = 6.582119e-16
c = 2.9987e8
rad_ps_to_meV = 1E12*h_bar*1000
inv_cm_to_meV = 100*2*PI*c*h_bar*1000
set output "./scatter-rate/comparison.pdf"
set ylabel "Three-phonon scattering rate [ps^{-1}]"
set xlabel "Phonon energy [meV]"
set logscale y
set multiplot
PS = 0.1
MBOT = 0.15
MTOP = 0.98
MLEFT = 0.15
MRIGHT = 0.95
MMIDY = (MBOT + MTOP) / 2
MMIDX = (MLEFT + MRIGHT) / 2
unset key
set yrange [1e-3:10]
# top left subplot
unset ylabel
set format y '10^{%T}'
unset xlabel
set format x ‘ '
set lmargin at screen MLEFT
set rmargin at screen MMIDX
set tmargin at screen MTOP
set bmargin at screen MMIDY
set xrange [0:100]
plot "./data/1.00/collected-data.dat" u ($4*rad_ps_to_meV):9 w p ps PS pt 7 lc ‘black’
#top right subplot
set format y ‘ '
set lmargin at screen MMIDX
set rmargin at screen MRIGHT
plot "./data/1.05/collected-data.dat" u ($4*rad_ps_to_meV):9 w p ps PS pt 7 lc ‘black'
#bottom left subplot
unset ylabel
set format y '10^{%T}'
set format x '%g'
set xtics 0,20,80
set lmargin at screen MLEFT
set rmargin at screen MMIDX
set tmargin at screen MMIDY
set bmargin at screen MBOT
plot "./data/1.10/collected-data.dat" u ($4*rad_ps_to_meV):9 w p ps PS pt 7 lc ‘black’
#bottom right subplot
set xtics 20
set format y ‘ '
set rmargin at screen MRIGHT
set lmargin at screen MMIDX
plot "./data/graphene/collected-data.dat" u ($4*rad_ps_to_meV):9 w p ps PS pt 7 lc ‘black'
Here, the y-axis major tick label 10^1 from the bottom left subplot overlaps with the 10^-3 label from the top left subplot.
I would like to avoid printing the 10^1 label on the y-axis of the bottom left subplot. So I used the following for the bottom left y-axis:
set yrange [1e-3:10]
set ytics 1e-3, 1e-1, 1
set mytics 10
However now I am missing the 10 minor ticks between 1 and 10 in the bottom subplots. Below 1, all minor ticks are there. Is there a way to preserve the minor ticks between 1 and 10 in the above example?
Thank you,
Vahid |