gnuplot - nudge和格式标签“at end”

时间:2016-11-06 16:08:18

标签: plot label gnuplot

假设我有一个脚本,最后用

绘制所有内容
plot filename.".csv" u 2:3 every ::3 lc rgb "#A52A2A" title "8" at end w lp,\
                  "" u 2:3:4 every ::3 lc rgb "#A52A2A" notitle w errorbars,\
                  "" u 2:7 every ::3 lc rgb "#008B8B" title "16" at end w lp,\
                  "" u 2:7:8 every ::3 lc rgb "#008B8B" notitle w errorbars,\
                  "" u 2:11 every ::3 lc rgb "#9932CC" title "32" at end w lp,\
                  "" u 2:11:12 every ::3 lc rgb "#9932CC" notitle w errorbars,\
                  "" u 2:15 every ::3 lc rgb "#008000" title "48" at end w lp,\
                  "" u 2:15:16 every ::3 lc rgb "#008000" notitle w errorbars,\
                  "" u 2:19 every ::3 lc rgb "#FFD700" title "64" at end w lp,\
                  "" u 2:19:20 every ::3 lc rgb "#FFD700" notitle w errorbars

这将最终看起来像

enter image description here

如何将标签移动到更远的线条并以线条颜色着色?

1 个答案:

答案 0 :(得分:0)

在引号内添加空格,就在数字之前(例如“8”)或使用sprintf:

title sprintf("  %s","8")