我有这个 Gnuplot 脚本:
reset session
$Data <<EOD
"Push-Front" 1604 0x289e37
"Push-Back" 218 0x289e37
"Insert" 873 0x289e37
"Push-Front-Collection" 439 0x289e37
"Push-Back-Collection" 261 0x289e37
"Insert-Collection" 254 0x289e37
"Search" 244 0x28579e
"Pop-Front" 3508 0xeb9534
"Pop-Back" 198 0xeb9534
"Delete" 3443 0xeb9534
"Delete-Range" 302 0xeb9534
EOD
set style fill solid 1.0
set boxwidth 0.8
set key noautotitle
set grid x,y
set tics out
set terminal png size 450,300 enhanced font "Monospaced,13"
set output '..\msc-sandbox\TotalDurationBarPlotArrayList.png'
set yrange[0:4000]
set ylabel "Milliseconds"
plot $Data u 0:2:3:xtic(1) w boxes lc rgb var#, \
'' u 0:2:2 w labels offset 0,0.7
它给了我:
我想要实现的是从每个标签的左端顺时针旋转每个标签45度。我怎样才能做到这一点?
简单。我刚刚将以下行添加到脚本中。
set xtics rotate by -45