Question: A plotting oddity

Here is a minor nit regarding combining plots in Maple.

restart;

kernelopts(version);

`Maple 2024.2, X86 64 LINUX, Oct 29 2024, Build ID 1872373`

(1)

 

Plot the cardioids  1+`&+-`(cos*t) in polar coordinates:

pic1 := plot(1-cos(t), t=0..2*Pi, coords=polar);
pic2 := plot(1+cos(t), t=0..2*Pi, coords=polar);

 

 

 

When combining the plots, display() inherits the plotting range from the previous

plots, incorrecting taking it to be 0 .. 2*Pi
 

plots:-display(pic1, pic2, scaling=constrained);

 

To get the correct plot, we need to override the range determined by display():

plots:-display(pics, scaling=constrained, view=[-2..2,-2..2]);

 
 

 

Download mw.mw

Please Wait...