无法使用with_slider_draw()生成动画gif
在OSX 13.6/15.7上使用wxmaxima v19.05.7我没有问题使用 with_slider()创建动画gif。例如,
with_slider(
t,
makelist(i,i,0,%e,0.05),
[sin(x+t), cos(x+t)], [x,0,5]
)$
按预期工作。但是,如果我想用_slider_draw()绘制函数图,
with_slider_draw(
t,
makelist(i,i,0,%e,0.05),
explicit(sin(x+t),x,0,5)
)$e
我会收到错误消息,例如:
Wxmaxima Error
cant't open file '~/tmp/maxout_4856_55.png'
Error 2. No such file or directory.
wxmaxima中的inline图形的位置,说
Error: cannot render ~/tmp/maxout_4856_55.png
确实没有 maxout_4856_ [01-- 55] .png-files in〜/tmp/。相应的gnuplot文件 data4856.gnuplot 和 maxout4856.gnuplot 。
这里出了什么问题?
- 为什么否图形文件?
- 为什么wxmaxima要求 png -files?
任何帮助都赞赏。
Cheers,Tilda
编辑:我通过在 set_draw_defaults()中重置终端来解决
set_draw_defaults(
line_width = 2,
dimensions = [640,384],
terminal = pngcairo
)$
with_slider_draw(
t,
makelist(i,i,0,%e,0.05),
color = steelblue4,
explicit(sin(x+t),x,0,5),
color = red3,
explicit(cos(x+t),x,0,5)
)$
问题然后可以将其导出为动画gif:
动画
Using wxMaxima v19.05.7 on osx 13.6/15.7 I have no problems creating animated gifs using with_slider(). E.g.
with_slider(
t,
makelist(i,i,0,%e,0.05),
[sin(x+t), cos(x+t)], [x,0,5]
)$
works as expected. However, if I want to plot the function graphs with with_slider_draw()
with_slider_draw(
t,
makelist(i,i,0,%e,0.05),
explicit(sin(x+t),x,0,5)
)$e
I get error messages like:
Wxmaxima Error
cant't open file '~/tmp/maxout_4856_55.png'
Error 2. No such file or directory.
and the place-holder for the inline graphics within wxMaxima saying
Error: cannot render ~/tmp/maxout_4856_55.png
There are indeed no maxout_4856_[01-55].png-files in ~/tmp/ . The corresponding gnuplot files data4856.gnuplot and maxout4856.gnuplot however are produced.
What is going wrong here?
- Why are no graphic files produced?
- Why does wxMaxima ask for png-files?
Any help appreciated.
Cheers, Tilda
Edit: I managed to solve the problem by resetting the terminal in set_draw_defaults() So,
set_draw_defaults(
line_width = 2,
dimensions = [640,384],
terminal = pngcairo
)$
with_slider_draw(
t,
makelist(i,i,0,%e,0.05),
color = steelblue4,
explicit(sin(x+t),x,0,5),
color = red3,
explicit(cos(x+t),x,0,5)
)$
produces the desired with_slider_draw()-animation inline that can then be exported as an animated gif:
Cheers, Tilda
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论