【发布时间】:2020-04-03 15:05:03
【问题描述】:
问题陈述: 我在 gunplot 中使用 qt term 做一些图表,但是我得到以下错误:显示窗口出现一微秒并消失,而终端吐出以下内容:'qt.qpa.fonts:填充字体系列别名花了260 毫秒。将缺失字体系列“Sans”的使用替换为现有字体系列以避免此成本。 -- 下面代码中的选项1.0
我尝试过的: 尝试了多个修复,涉及更改字体,即下面代码中的选项 1.1。更改为 Helvetica 或 Verdana 后,错误消失,但没有显示窗口。
关于如何解决它的任何想法?
到目前为止,我可以使用 png 术语保存图形——选项 1.2,所有其他术语似乎会产生与 qt 相同的错误。理想的解决方案是有一个功能显示窗口,以避免打开保存的.png。
P.S 使用 Mac OS,版本 10.15.4 Catalina。以前在旧操作系统和旧版本的 Gnuplot 上使用相同的代码,支持 x11/aquaterm,当前操作系统和 brew install 不支持。
提前谢谢大家!!!
一些代码(下面附上gunplot zsh脚本):
gnuplot << EOF
# Option 1.0
set terminal qt
# does Error in commant prompt: qt.qpa.fonts: Populating font family aliases took 252 ms. Replace uses of missing font family "Sans" with one that exists to avoid this cost.
# Option 1.1
#set terminal qt font "Helvetica" # does no error in command prompt, no window displayed
# Option 1.2
#set terminal png
#set output 'saved.png' # saves .png but no window generated
# PARKER WIND
set xr [0.5:2.0]
set yr [0.0:2.5]
set xlabel "r/r_0"
set ylabel "Psi"
set style line 1 lt 1 lc rgb "blue" lw 1 pt 11
set style line 2 lt 1 lc rgb "black" lw 1 pt 11
set style line 3 lt 1 lc rgb "black" lw 1 pt 7 ps 2
set style line 4 lt 1 lc rgb "blue" lw 1 pt 7 ps 2
set style line 5 lt 1 lc rgb "black" lw 3 pt 7 ps 2
set xzeroaxis
# MULTIPLE GRAPHS
plot 'outputdata/parker_0.500.dat' u 1:2 with lines ls 1 title "psi0=0.500" ,\
'outputdata/parker_0.550.dat' u 1:2 with lines ls 1 title "psi0=0.550" ,\
'outputdata/parker_0.600.dat' u 1:2 with lines ls 1 title "psi0=0.600" ,\
'outputdata/parker_0.650.dat' u 1:2 with lines ls 1 title "psi0=0.650" ,\
'outputdata/parker_0.700.dat' u 1:2 with lines ls 1 title "psi0=0.700" ,\
'outputdata/parker_0.750.dat' u 1:2 with lines ls 1 title "psi0=0.750" ,\
'outputdata/parker_0.800.dat' u 1:2 with lines ls 1 title "psi0=0.800" ,\
'outputdata/parker_0.850.dat' u 1:2 with lines ls 1 title "psi0=0.850" ,\
EOF
【问题讨论】: