2016-03-01 69 views
1

我想一个gnuplot的脚本中生成多个地块,并想开始新的情节与正在运行的大写字母,即标题整数,第一个情节将有标题(A) sample title for first chart,第二个(B) sample title for second chart等等。gnuplot的:转换为ASCII值

在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的类似的东西,但我无法得到它由于工作的问题

这些格式说明是不一样的那些由标准的C语言程序的sprintf()使用。

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

回答

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

的Gnuplot提供它使用的gnuplot格式说明和sprintf一个gprintf

+0

谢谢,按预期工作!不知何故忽略了sprintf,只发现了gprintf。 –