gnuplot:自定义条形图上的标签

问题描述 投票:0回答:1

以下脚本制作一个条形图,直接在彩色条上指示 y 值。

set term pngcairo size 1200,900
set title "$file_name" noenhanced font "Century,28" textcolor "#b8860b"
set xtics noenhanced font "Helvetica,10"
set xlabel "Residue, #"
set ylabel "dG, kKal/mol"
set yrange [-10:0]
set ytics 1.0
set grid y
set key off
set boxwidth 0.9
set style fill solid 0.5
plot \$data using 0:2:3:xtic(1) with boxes lc rgb var, \
        '' using 0:2:2 with labels offset 0,1

我如何另外修改与每个条中的 Y 值相对应的值的文本大小及其颜色?

gnuplot
1个回答
1
投票

咨询过吗

help labels

例如这样的事情:

set samples 11
plot '+' u 1:1 w boxes, '+' u 1:1:1 w labels tc "red" font ",14"

您的示例没有太大不同:

plot \$data using 0:2:3:xtic(1) with boxes lc rgb var, \
        '' using 0:2:2 with labels tc "red" font "Arial Bold,14" offset 0,1  
  # or whatever font you have available
© www.soinside.com 2019 - 2024. All rights reserved.