最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

wxmaxima wxdraw , wxdraw2d, wxdraw3d. How to change output to a *.png file instead of terminal computer screen - Stack Overflow

matteradmin7PV0评论

I have successfully changed the output from default terminal screen to a *.png by for example.

[load(implicit_plot),
 gnuplot_out_file[png,"gnu.png"],   
 implicit_plot(x^2+y^2-1,[x,-1,1],[y,-1,1], [gnuplot_term, png], [gnuplot_term, "png size 334,334"]  )]

But since plot cannot fill a figure i need to do it in wxdraw,wxdraw2d,wxdraw3d but have not had success. I tried

(wxdraw3d (enhanced3d = true,explicit(exp(x^2-y^2), x,-2,2,y,-2,2)),wxdraw_file(terminal="draw.png" ))

But it ignored the terminal request. Also

xdraw_file(terminal="draw.png",dimensions=[5,5]);

Did nothing either and i did not get any error output on either. Also the following got no error but did nothing to change color.

set_draw_defaults(color=grey20);

Why is it not working. What can i do. Note I can't use just plain draw because it fails on everything.

I have successfully changed the output from default terminal screen to a *.png by for example.

[load(implicit_plot),
 gnuplot_out_file[png,"gnu.png"],   
 implicit_plot(x^2+y^2-1,[x,-1,1],[y,-1,1], [gnuplot_term, png], [gnuplot_term, "png size 334,334"]  )]

But since plot cannot fill a figure i need to do it in wxdraw,wxdraw2d,wxdraw3d but have not had success. I tried

(wxdraw3d (enhanced3d = true,explicit(exp(x^2-y^2), x,-2,2,y,-2,2)),wxdraw_file(terminal="draw.png" ))

But it ignored the terminal request. Also

xdraw_file(terminal="draw.png",dimensions=[5,5]);

Did nothing either and i did not get any error output on either. Also the following got no error but did nothing to change color.

set_draw_defaults(color=grey20);

Why is it not working. What can i do. Note I can't use just plain draw because it fails on everything.

Share Improve this question edited Nov 23, 2024 at 21:15 user158293 asked Nov 18, 2024 at 21:13 user158293user158293 1194 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

for equiv what can do in wxdraw2d and ...3d just replace wxdraw2d or 3d by gr2d or gr3d and preface it by wxdraw(terminal='png,"file_name=",.. such as in example: wxdraw(terminal='png,file_name="dotted", gr2d(fill_color=gray84,ellipse(0,0,1,1,0,360), fill_color=grey77,color=gray20,line_width=2, ellipse(0,0,1,.23,180,180), line_type=dashes, ellipse(0,0,1,.23,0,180), proportional_axes='xy))

and found the file dotted.png in my ...\maxima-current directory and which is the same image that also appears on the screen.

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far