使用Octave进行绘图时出现问题 [英] Problems plotting with Octave
问题描述
我刚刚开始使用Octave.当我开始八度并尝试绘制某些东西时,该绘制工作正常,但是多次重复出现以下警告:
I've just started using Octave. When I start octave and try to plot something, the plot works but I get the following warnings repeated many times:
warning: ft_render: unable to load appropriate font
warning: ft_render: invalid bounding box, cannot render
如果我单击并拖动该图甚至将鼠标悬停在该图上,则会显示更多警告.如果然后尝试添加xlabel或标题,则会出现段错误并退出八度.默认的graphics_toolkit是fltk,我是通过启动八度并运行找到的
More warnings appear if I click and drag the plot or even mouse-over it. If I then try to add an xlabel or title, I get a segfault and octave quits. The default graphics_toolkit is fltk, which I found by starting octave and running
graphics_toolkit();
如果我开始八度并尝试
graphics_toolkit("gnuplot");
x=-10:0.1:10;
plot(x,sin(x));
该绘图有效,但是我仍然收到有关边界框的警告.添加标签或标题是可行的,但会给出更多的边框警告.
the plot works, but I still get the warning about the bounding box. Adding labels or titles works but gives more bounding box warnings.
这是奇怪的地方.如果现在我将工具箱改回fltk,然后再次绘图,
Here's the weird bit. If I now change the toolkit back to fltk, and plot again,
graphics_toolkit("fltk");
x=-10:0.1:10;
plot(x,sin(x));
然后该图起作用,并且只有边界框警告出现,并且我可以添加标签等.换句话说,其行为与gnuplot相同.实际上,该图看起来更像是gnuplot图而不是fltk图(由底部的按钮判断).但是,如果我开始八度并尝试以下操作:
Then the plot works, and only the bounding box warning shows up, and I can add labels etc. In other words, the same behaviour as gnuplot. In fact, the plot looks more like a gnuplot one than an fltk one (judging by the buttons along the bottom). But if I start octave and try this:
graphics_toolkit("gnuplot");
graphics_toolkit("fltk");
x=-10:0.1:10;
plot(x,sin(x));
然后,这似乎又回到了fltk环境中,因为同时出现警告和标签再次导致段错误.
Then it seems like it's back in the fltk environment as both warnings occur and labels cause a segfault again.
两个问题:
-
fltk上的边框/字体渲染警告和gnuplot上的边框警告是什么,我该如何解决?
What are the bounding box/font rendering warnings on fltk and the bounding box ones on gnuplot and how do I fix them?
fltk工具包怎么了?使用gnuplot后,似乎无法更改回它.
What is going on with the fltk toolkit? It doesn't seem to be possible to change back to it after using gnuplot.
我正在Ubuntu 12.04上使用Octave 3.8.0.
I'm using Octave 3.8.0 on Ubuntu 12.04.
推荐答案
我有相同的错误:
warning: ft_render: unable to load appropriate font
warning: ft_render: invalid bounding box, cannot render
使用以下命令将fontconfig库更新为fontconfig1库:
Update the fontconfig library to fontconfig1 library with the following command:
sudo apt-get install glpk gperf flex bison libfontconfig1-dev
然后使用以下命令重新安装八度:
Then re-install octave with the following commands:
./configure
sudo make
sudo ./run-octave
sudo make install
解决了问题.如果不是,请转到此链接以获取更多答案: http: //verahill.blogspot.com/2012/02/debian-testing-wheezy-64-compiling.html
That solves the problem. If not, go to this link for more answers: http://verahill.blogspot.com/2012/02/debian-testing-wheezy-64-compiling.html
这篇关于使用Octave进行绘图时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!