0
votes

I met a problem when adding codeset xtics format "{/:Bold %.0s}" to bold xtics.The code and results were listed below.If I comment on the code set xtics format "{/:Bold %.0s}", it appears normal but without bolding xtics what I expected. How can I fix it? I will appreciate it for any suggestions!

set lmargin 0
set rmargin 0
set tmargin 0
set bmargin 0
set xdata time
set timefmt "%Y%m%d%H"
set format x "%m/%d"
set xrange ["20200106":"20200228"]
set xtics nomirror format '{/:Bold %.0s}'
set xtics("20200106","20200115","20200124","20200202","20200211","20200220", "20200228") font "Times, 11"
set ytics nomirror font "Times,11"
set ytics format "{/:Bold %.0s}"
set ytics 0,80,400
set datafile missing "-999"
unset key
set origin 0, 0.80
unset ylabel

map

1

1 Answers

1
votes

You set a xtic format "%s", which is interpreted as time in seconds. That is clearly not what you want. If the idea is that the xtics have the same format as you set for timefmt, then you could use

set xtics nomirror format '{/:Bold %Y%m%d%H}'

or better

set xtics nomirror format'%Y%m%d%H'
set xtics font ':Bold'

or if the idea is to use specifically the labels you put in a set xtics (T1,T2,T3) command then the trick is to realize that if you give only a single value in Tx it is used as a location, not a label string. The label for this position is generated by using the tic format. If you give two values for Tx then the first one is a fixed label text and the second one is the position. If I understand your intent correctly, you want the label string to be the same as the position; that means your list of labels would become:

set xtics("20200106" "20200106","20200115" "20200115","20200124" "20200124","20200202" "20200202","20200211" "20200211","20200220" "20200220", "20200228" "20200228)

If you do that, it doesn't matter what the xtic format is because it will just use the string provided.