Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/scala/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ubuntu 在gnuplot绘制期间收到错误_Ubuntu_Csv_Utf 8_Character Encoding_Gnuplot - Fatal编程技术网

Ubuntu 在gnuplot绘制期间收到错误

Ubuntu 在gnuplot绘制期间收到错误,ubuntu,csv,utf-8,character-encoding,gnuplot,Ubuntu,Csv,Utf 8,Character Encoding,Gnuplot,我尝试使用带有gnuplot的csv绘制图形。我的代码是: #!/usr/bin/gnuplot -persist set datafile separator ":" set terminal pngcairo font ",8" size 1500,1000 set output '/path_to/mychart.png' set style data histograms set format y '%.0f' set xtics right rotate by 45 font ',8'

我尝试使用带有gnuplot的csv绘制图形。我的代码是:

#!/usr/bin/gnuplot -persist
set datafile separator ":"
set terminal pngcairo font ",8" size 1500,1000
set output '/path_to/mychart.png'
set style data histograms
set format y '%.0f'
set xtics right rotate by 45 font ',8'
set bmargin 10
set title "some graph title"
set xlabel "some x axis name"
set ylabel "some y axis name"
plot "/path_to/my.csv" using 2:xticlabels(1) notitle
在脚本运行期间,我收到如下错误消息:

无法转换“某些网络参数名称”�W-“:序列在当前字符集(UTF-8)中无效,返回到iso_8859_1

实际上,它对csv文件中的每个参数(实际上是图形的XTIC)重复相同的消息。我在Windows7主机上的VirtualBox客户端上使用Ubuntu13.04

脚本以某种方式绘制图形,但奇怪的字符出现在x轴上。Y轴(由数字组成)正常。图形本身也很好

这是一个bug还是操作系统中缺少的字符集


谢谢。

您可以发布数据文件中的相关行吗?这是我的文件中的3行:非IPv4放弃计数:311360 IPv4碎片计数:224637512 IPv4非碎片计数:2608743892 IPv4 UDP下限计数:2607743957事实上,我发现如果我修改xticks和yticks字体大小,x轴上的这些奇怪字符也在变化。现在才找到它。“我的文件”的顶行由一个标题组成,如:---------------------------------------------------------------------------第3层统计------------------此标题是否会导致问题?否。我去掉了标题,还是一样。毕竟我使用了:作为分隔符,所以它应该忽略所有其他行。