Search code examples
mathmaximawxmaxima

Plot2d: nothing to plot for error when attempting to plot with wximplicit_plot


I am using wxmaxima 23.12.0 and Maxima 5.47.0 on macOS 13.5. I have successfully plotted using wximplicit_plot using the following:

wximplicit_plot(x^2+y^2=1, [x,-2,2], [y,-2,2], same_xy);

but when I try the following:

load(implicit_plot);

set_plot_option(same_xy);

line:y=3*x-5;
circle:x^2-6*x+y^2-8*y+22=0;

wximplicit_plot([line, circle], [x,0,5], [y,0,5]);
implicit_plot is now obsolete. Using plot2d instead:
"plot2d ([y = 3*x-5,y^2-8*y+x^2-6*x+22 = 0] = 0, [x,0,5], [y,0,5], [plot_format,gnuplot], [gnuplot_term,pngcairo], [gnuplot_preamble,"set terminal pngcairo dashed background \"white\" enhanced font \"arial,10\" fontscale 1.0 size 1200,900; set zeroaxis;; "], [gnuplot_out_file,"/var/folders/8b/b7l3tsmx2vz8559ln8sl1h080000gn/T/maxout_13645_2.png"])"
plot2d: nothing to plot for [y = 3*x-5,y^2-8*y+x^2-6*x+22 = 0] = 0.
 -- an error. To debug this try: debugmode(true);

But if I use plot2d passing in the same arguments as above it works.

Can anyone spot if I have missed anything in the way I am calling wximplicit_plot?

Any help would be much appreciated.


Solution

  • As mentioned in a comment, that observed behavior is a bug in Maxima:

    As a workaround, use wxplot2d instead of wximplicit_plot:

    set_plot_option(same_xy)$
    
    line:y=3*x-5;
    circle:x^2-6*x+y^2-8*y+22=0;
    
    wxplot2d([line, circle], [x,0,5], [y,0,5]);
    

    Result in wxMaxima:

    wxMaxima wxplot2d