Gnuplot:将整数转换为 ASCII 值

Gnuplot: Convert integer to ASCII value

我想在一个 gnuplot 脚本中生成多个绘图,并希望每个绘图的标题以 运行 大写字母开头,即第一个绘图的标题为 (A) sample title for first chart,第二个(B) sample title for second chart,依此类推

在Java,这个我基本要做

int i = 65;       // ASCII value for 65
char c = (char)i; // Convert 65 to corresponding ASCII value ('A')
i++;
// Use c; then repeat

我刚刚通过使用 gprintf%c 格式化程序在 gnuplot 中尝试了类似的东西,但由于问题

我无法让它工作

These format specifiers are not the same as those used by the standard C-language routine sprintf().

长问短:如何将整数转换为其对应的 ASCII 值?

gnuplot> print sprintf("%c", 65)
#A

Gnuplot 提供了一个 gprintf,它使用 gnuplot 格式说明符和 sprintf。