ubuntu - 如何在 GNUPlot 图中的每个条上给出文本

标签 ubuntu gnuplot

我想在图表中的每个条形上垂直添加诸如 200,300,600,800 等文本。这是我的代码。

set title font ", 25" 
set xlabel "FEATURE LENGTH"
set xlabel font ",25"
set ylabel "ACCURACY(%)"
set yrange [45:76]
set ylabel font ",25"
set ytics font ", 25" 
set boxwidth 0.98
set key spacing 3
set key font ",25"



set style fill pattern 10 border lt -1
set style histogram errorbars gap 1 lw 0 

set key inside top center horizontal font "Helvetica, 25" width 1.8
set style histogram clustered #gap 5 title  offset character 0, 0, 0
set xtics font ", 25" 
set xtics ("F1" 0, "F2" 1, "F3" 2, "F4" 3, "F5" 4, "F6" 5, "F7" 6, "F8" 7, "F9" 8)
set style data histograms

plot "best_feature_pos.dat" using 1 t "{/Symbol a}", "" using 2 t "{/Symbol b}"
set output 'best_feature_pos10.eps'
set terminal postscript eps enhanced black
replot

这是我的数据文件

72.9    73.6
73.9    72.8
70.6    70.9
64      64
66      65.4
59      0
57.4    0
45.8    0
64.8    0

任何人都可以帮助我找到解决方案???

最佳答案

您可以使用 set label将文本放置在您的绘图上,例如:

set label 1 '200' front at screen 0.15,0.5 rotate by 90 font "Arial,20"
set label 2 '300' front at screen 0.16,0.5 rotate by 90 font "Arial,20"
# etc. 

这将需要一些手动调整才能将标签放在正确的位置。

关于ubuntu - 如何在 GNUPlot 图中的每个条上给出文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25097810/

相关文章:

ubuntu - 您无权访问此服务器上的/。 (AWS EC2 Ubuntu Laravel 项目)

linux - Ubuntu Server 中的两个或多个事件进程

objective-c - 在 objective-c 中创建一个节点?

c++ - gnuplot-iostream 没有链接到提升

Gnuplot 直方图

css - Ubuntu CLI 中的红色文件名 (Vagrant)

java - 在 Ubuntu 中使用 Mono 生成文件的字节顺序标记

gnuplot 填充曲线下的区域

gnuplot - 使用 splot 填充 3D 线下方的区域

Gnuplot:如何加载自定义命令?