rtoy / maxima

A Clone of Maxima's repo
Other
0 stars 0 forks source link

draw2d does no longer show polar grid #1704

Open rtoy opened 4 months ago

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-04 23:20:57 Created by borofi on 2019-11-19 11:18:14 Original: https://sourceforge.net/p/maxima/bugs/3595


Hello,

To plot a 2D polar function with polar grid I used to do something like

draw2d (user_preamble="set grid polar", grid=true, polar (r, t, 0, 2*%pi));

which worked as expected with previous versions (at least with 5.38.1).

Now with 5.43.0 it always produce a plot with rectangular grid. With Gnuplot (5.2 patchlevel 7) I can get the polar grid.

I am on Arch Linux, with Lisp SBCL 1.5.5.

Thanks.

Attachments:

rtoy commented 4 months ago

Imported from SourceForge on 2024-07-04 23:20:58 Created by tomio-arisaka on 2020-01-07 13:59:44 Original: https://sourceforge.net/p/maxima/bugs/3595/#d8b8


At least both 5.2.7 and 5.2.8 of gnuplot, the "set grid polar" value of user_preamble does not work when 'polar' function is used.

I think that "set grid polar" works well when "set polar" is used. So draw2d needs 'explicit' function instead of 'polar' function.

(%i1) build_info();
(%o1) 
Maxima version: "5.43.0"
Maxima build date: "2019-06-05 13:14:43"
Host type: "x86_64-apple-darwin13.4.0"
Lisp implementation type: "SBCL"
Lisp implementation version: "1.5.3"
(%i2) 
draw2d( proportional_axes = xy,
        user_preamble = "set polar; set grid polar 0.261799; set rtics 1.0",
        nticks        = 200,
        xrange        = [-2,2],
        yrange        = [-3.5,0.5],
        line_width    = 2,
        color         = orange,
        explicit (1-sin(t), t,-%pi*3/2,%pi*3/2),
        color         = green,
        explicit (sqrt(cos(t+%pi*2/4)^2+sin(t)^2)/sqrt(2)*3, t,-%pi*1,%pi*0) )$

(%i3) system ("gnuplot --version");
gnuplot 5.2 patchlevel 7
(%o3)                        #<PROCESS :EXITED 0>
(%i4) 

Attachments: