【问题标题】:Shifting of axis title and sub-title in Gnuplot histogramGnuplot 直方图中轴标题和子标题的移动
【发布时间】:2021-12-02 18:11:30
【问题描述】:

先生数据文件是

# test.dat
# Sample No.    Phenol Red      Neutral Red      Bromophenol Blue    Bromocresol Green      Mixed Indicator
1                  80                69               223               222                       130
2                  89                62               321               267                       160
3                  92                67               248               276                       147

Gnuplot 代码是

#
#
###
reset session
###
set terminal postscript eps enhanced colour font 'Times-Roman,12' size 6in,4in  
set output "test.eps"
#------------------------------------------------------------------------------
set style line 1 lt 4 lw 1 lc rgb "#4169E1"
set style line 2 lt 4 lw 1 lc rgb "#2E8B57"
set style line 3 lt 5 lw 1 lc rgb "#FF4500"
set style line 4 lt 4 lw 1 lc rgb "#FAD02C"
set style line 5 lt 4 lw 1 lc rgb "#FF0080"
#------------------------------------------------------------------------------
set xtics out scale 1.5 
set ytics out scale 1.5
set ytics nomirror
set yrange [0:350]
set key off
set tics font ", 16"
set xlabel "Sample No. " font ",16"
set ylabel "Moisture Content ({/Symbol \155}g of H_{2}O/g of melt)" font ",16"
set key samplen 2 spacing 1.65 font ",14" width -1.0
set key inside left horizontal  
set style fill solid border
set style histogram clustered gap 1 title textcolor lt -1
# ----------------------------------------
set rmargin screen 0.9
set lmargin screen 0.1
set bmargin screen 0.4
# ----------------------------------------
set style data histogram
plot \
newhistogram "Direct titration", \
'test.dat' using 2:xtic(1) ls 4 axes x1y1 title "Phenol Red", \
'' u 3 ls 5 axes x1y1 title "Neutral Red", \
newhistogram "Back-titration", \
'test.dat.dat' using 4:xtic(1) ls 1 axes x1y1 title "Bromophenol Blue", \
'' u 5 ls 2 axes x1y1 title "Bromocresol Green", \
'' u 6 ls 3 axes x1y1 title "Mixed Indicator"
# ----------------------------------------
##

脚本运行良好。我想在刻度标签(1,2,3)和副标题(直接滴定和反滴定)之间提供更多间距,以及副标题和轴标题之间的间距。怎么办?

【问题讨论】:

    标签: gnuplot


    【解决方案1】:

    set xlabel offset 0, -1 会将字幕和轴标题向下移动一个字符高度。

    set xlabel "\nTEXT" 将创建一个双行轴标签并将 TEXT 放在第二行。

    将您的 xlabel 命令修改为

    set xlabel "\nSample No. " font ",16" offset 0,-1
    

    将进行这两项更改。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-02-13
      • 2015-12-17
      • 2022-01-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多