簡體   English   中英

標簽在gnuplot中重疊

[英]Labels overlap in gnuplot

有一個數據文件,我想在條形圖中添加標簽,但不幸的是標簽覆蓋在第一個條形上方,我無法弄清楚如何為每個標簽添加偏移量:

set xrange[0:30]
set y2tics font "Arial,8" mirror
#set y2tics rotate # rotating the y2ticks alongside with the y-axis
set xtics font "Arial,6"
#set datafile separator "\t"
set boxwidth 0.5 absolute # balkengroesse
set bmargin 0.6
set tmargin 0
set lmargin 0.9
set rmargin 0
set title "RTF History Analysis" font"Arial,9"
set ylabel "Max RTF" font"Arial,9" noenhanced
#set xlabel "Timestamp" font"Arial,9" noenhanced
#set xtics rotate 90 # turn the text to the vertical position
set style data boxes  # boxplot
set style fill solid 0.5 noborder 
set multiplot layout 3,1 # 3x vertical 1x horizontal

set grid xtics y2tics
set logscale y
set grid my2tics
set yrange[0.001:6500]
set logscale y2
set my2tics 10
unset ytics
set format "10^{%L}"
set xtics rotate by 50 offset -4.5,-3.00
set format y
plot "history_file.txt" u 7:xticlabels(2) w boxes lc rgb"blue" notitle, \
     "history_file.txt" u 7:2:3 w labels rotate left font "Arial,6" lc rgb"blue" notitle

在此處輸入圖像描述

部分數據文件:

recipe.rcp  14-03-2017-12:10    top 0.00656997498323    0.0074438616489 rx  0.00791297772894
recipe.rcp  14-03-2017-15:55    cibasic 0.00665396222124    0.00770821200216    tx  0.00938002006172
recipe.rcp  14-03-2017-16:27    cibasic 0.00654659192121    0.00791088142395    tx/tx_  0.010395539525
recipe.rcp  15-03-2017-14:44    ci  0.0106795993772 0.0114679721169 top 0.0128018372288
recipe.rcp  15-03-2017-14:58    sens    0.0101868323628 0.011261329309  tx  0.0131594769347

嘗試

plot 'data' u  7:xticlabels(2) w boxes, '' u (column(0)):(.5):3 with labels

將標簽與盒子放在相同的高度(y = 0.5)。

要讓標簽跟隨盒子的高度,請嘗試

plot 'data' u  7:xticlabels(2) w boxes, '' u (column(0)):(0.01 +$7):3 with labels

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM