acer

33019 Reputation

29 Badges

20 years, 168 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are answers submitted by acer

The word stylesheet is an option of the GraphTheory:-DrawGraph command.

The term Style Set relates to customized character/paragraph attributes, and files to manage them.

In Maple 2026, see the Edit tab in the ribbon, which contains two items:
    Styles
    Manage Style Sets

You can get to the documentation for Style Sets with a query on styleset .

 

ps. If you query just style in the Help-system then the item for this appears a little too far down for my taste.

The What's New pages show for that latest version that the Online Help has been updated.

But the older What's New pages are also there, with a somewhat standarized naming scheme, reflecting that of Topic names in the Help system of Maple proper. 

So it seems like one could query and see which is the highest such that's present.

restart;

for i from 2022 to 2026 do
  if not HTTP:-Get(cat("https://www.maplesoft.com/support/help/Maple/view.aspx?path=updates/v",i))[1]=200 then
    V := i-1; break;
  end if;
end do;
V;

2025

Download online_ver.mw

I don't know when they'll be updated next, or the answers for your two queries 1), 2).

If continuity in a solution is important to you (for, say, real x),

restart;

kernelopts(version);

`Maple 2026.0, X86 64 LINUX, Mar 05 2026, Build ID 2001916`

ode:=x*diff(y(x),x) = y(x)*cos(ln(y(x)/x));

x*(diff(y(x), x)) = y(x)*cos(ln(y(x)/x))

dsolve(ode,y(x)) assuming x>0, y(x)/x>0; # Alfred_F

y(x) = exp(2*arctan(1/(ln(x)+c__1)))*x

That solution can also be obtained with just,
S1:=dsolve(ode,y(x)) assuming x>0, real;

y(x) = exp(2*arctan(1/(ln(x)+c__1)))*x

simplify(eval((lhs-rhs)(ode),S1)) assuming x>0, real;

0

odetest(S1, ode);

0

In Maple 2024.2 odetest can get zero with,
#simplify(evalc(convert(odetest(S1, ode),expln))) assuming x>0, real;

plot(eval(rhs(S1),c__1=0), x=0..2, size=[500,200], thickness=3, color=red, view=0..40);

That portion for 0<x<1 is not zero
plots:-display(%, view=0..1);

S2:=simplify(evalc(convert(dsolve(simplify(convert(ode,arctan)),y(x)),expln))) assuming x>0, real;

y(x) = x*exp(Pi+2*arctan(-ln(x)+c__1))

simplify(eval((lhs-rhs)(ode),S2)) assuming x>0, real;

0

odetest(S2, ode);

0

In Maple 2024.2 odetest can get zero with,
#simplify(evalc(convert(odetest(S2, ode),expln))) assuming x>0, real;

plot(eval(rhs(S2),c__1=0), x=0..2, size=[500,200], thickness=3, color=blue, view=0..40);

plot3d(eval~(y(x),[S1, S2]), x=0..2, c__1=-1..1,
       grid=[100,100], color=[red,blue],
       orientation=[70,75,0], size=[400,400]);

These might even be "ok" for x<0, (by some defn of "ok", eg. satisfying
the ode but not real-valued, etc)

Digits:=30:
plot3d(abs~(eval~((lhs-rhs)(ode),[S1, S2])), x=-10..10, c__1=-10..10,
       color=[red,blue], orientation=[-45,75,0], size=[500,400]);
Digits:=10:

Download nm_ode_x.mw

Try the location documented on the Help-page for the user's preferences file.

[edit] Btw, did the site from which you downloaded the installer have a checksum listed for the installer file? Slim chance, but might be worth a check.

The default for Normalizer is that it just calls normal. That is not strong enough in the case of your example that contains exact radicals.

If the exact radicals are removed by applying evalf, then your example runs ok.

If Normalizer is set to something strong enough then your example runs ok. Eg,
    Normalizer := simplify:

inscribe_circle_ac.mw

Note that Testzero calls Normalizer. This pair are key in some linear-algebra kind of operations (eg. finding valid pivots, etc.) Failing to correctly notice a "hidden" zero, due to a weak test, is a classic problem. I haven't yet looked for the particular code line(s) where your example goes awry under simplex, but this kind of issue is not unheard of.

Optimization uses just floats, so it doesn't see this particular issue in the case of radicals. Some things like LinearAlgebra:-LUDecomposition make an attempt at temporarily strengthening Normalizer depending on the nature of the exact expressions found. But not all older commands do.

It seems that the expanded ln term on the rhs is the problem.

By utlizing combine on that term, either solve or RealDomain:-solve can be used.

These work quickly,

restart;

kernelopts(version);

`Maple 2025.2, X86 64 LINUX, Nov 11 2025, Build ID 1971053`

eqn := ln((y-1)^(1/3)*(y^2+y+1)^(1/3))-ln(y) = 2/5*ln(t^2+1)+_C;

ln((y-1)^(1/3)*(y^2+y+1)^(1/3))-ln(y) = (2/5)*ln(t^2+1)+_C

 

A := simplify({ solve(combine(eqn), y) });

{(-(-1+(t^2+1)^(6/5)*exp(3*_C))^2)^(1/3)/(-1+(t^2+1)^(6/5)*exp(3*_C)), (-(-1+(t^2+1)^(6/5)*exp(3*_C))^2)^(1/3)*(I*3^(1/2)-1)/(-2+(2*t^2+2)*exp(3*_C)*(t^2+1)^(1/5)), -(-(-1+(t^2+1)^(6/5)*exp(3*_C))^2)^(1/3)*(1+I*3^(1/2))/(-2+(2*t^2+2)*exp(3*_C)*(t^2+1)^(1/5))}

 

select(is, simplify(A), real)[] assuming real;

-((-1+(t^2+1)^(6/5)*exp(3*_C))^2)^(1/3)/(-1+(t^2+1)^(6/5)*exp(3*_C))

 

new := combine((lhs-rhs)(eqn)) assuming real;

ln(((y^2+y+1)*(y-1))^(1/3))-ln(y*(t^2+1)^(2/5))-_C

simplify( RealDomain:-solve(new, y ) );

(-(-1+(t^2+1)^(6/5)*exp(3*_C))^2)^(1/3)/(-1+(t^2+1)^(6/5)*exp(3*_C))


Note:

(2*ln(t^2 + 1))/5;
combine(%);
%; # evaluation re-expands it

(2/5)*ln(t^2+1)

ln((t^2+1)^(2/5))

(2/5)*ln(t^2+1)

Download nm_solve_01.mw

Here are various ways you can evaluate the fitted polynomial at arbitrary values of the independent variable.

You can do it with or without forming the polynomial explicitly. You can do it using procedures or eval. And, if forming the procedure explicitly, you can do it with expanded form or Horner form.

The very simplest way (shown at end), is to simply pass an extra name as an argument to the command, and have the command return the explicit polynomial rather than (as you had it) a Vector of the coefficients:
    Statistics:-PolynomialFit(10, X, Y, x)
See also the Help-page, which also describes a returned solution-module which can access various statistics, etc.

And you can then evaluate it for single values, or map that across the elements of X (or any other Vector).

Here are several of those choices. The second to sixth ways include forming the polynomial explicitly. It's your choice whether to also convert such to Horner form.

I also show the ~ syntax for so-called elementwise application of commands, which is a terse way to apply the evaluation across a Vector such as your X.

restart;

X := [seq(0..7,0.5)]:

Y := sin~(X):

PRModel:=Statistics:-PolynomialFit(10, X, Y):


First way: construct a procedure which directly evaluates the polynomial
at the input argument, using a Horner scheme.

Jfun1 := proc(x) local i,S:=0;
           for i from 11 to 1 by -1 do
             S := PRModel[i] + x*S;
           end do;
         return S;
         end proc:

estY := Jfun1~(X);

[HFloat(1.9208708381930906e-7), HFloat(0.4794239159651831), HFloat(0.8414766422714055), HFloat(0.9974850987214798), HFloat(0.9093045947032634), HFloat(0.5984752801663451), HFloat(0.1411117728798407), HFloat(-0.35078291176548543), HFloat(-0.756794509857144), HFloat(-0.9775336934640078), HFloat(-0.9589307175743441), HFloat(-0.7055309585508787), HFloat(-0.27942094279818397), HFloat(0.2151215624411235), HFloat(0.6569864113745757)]

plots:-listplot(estY-Y, size=[600,200]);


Second way: create the explicit polynomial from the Vector PRModel,
                     in Horner form, and then construct a procedure from
                     that expression.

Jfun2 := unapply(foldl( (id,g)->PRModel[g]+x*id, 0, 11-i$i=0..10 ),x);

proc (x) options operator, arrow; HFloat(1.9208708381930906e-7)+x*(HFloat(0.9989224786296512)+x*(HFloat(0.0053770259750101496)+x*(-HFloat(0.17716223340632256)+x*(HFloat(0.01083688759880518)+x*(HFloat(0.0016666827576776375)+x*(HFloat(0.0025752993394169478)+x*(-HFloat(8.295512490827164e-4)+x*(HFloat(9.43697800045293e-5)+x*(-HFloat(4.584687457675352e-6)+HFloat(7.544661906532768e-8)*x))))))))) end proc

estY - Jfun2~(X);

[HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(-0.0), HFloat(-0.0), HFloat(-0.0), HFloat(-0.0), HFloat(-0.0), HFloat(-0.0), HFloat(0.0), HFloat(0.0)]


Third way: create the explicit polynomial from the Vector PRModel,
                  as a sum of coefficients multiplies by powers of x,
                  then convert that to Horner form, and then construct the
                  procedure from that.

Jfun3 := unapply(convert(add(PRModel[i]*x^(i-1),i=1..11),horner),x);

proc (x) options operator, arrow; HFloat(1.9208708381930906e-7)+x*(HFloat(0.9989224786296512)+x*(HFloat(0.0053770259750101496)+x*(-HFloat(0.17716223340632256)+x*(HFloat(0.01083688759880518)+x*(HFloat(0.0016666827576776375)+x*(HFloat(0.0025752993394169478)+x*(-HFloat(8.295512490827164e-4)+x*(HFloat(9.43697800045293e-5)+x*(-HFloat(4.584687457675352e-6)+HFloat(7.544661906532768e-8)*x))))))))) end proc

estY - Jfun3~(X);

[HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(-0.0), HFloat(-0.0), HFloat(-0.0), HFloat(-0.0), HFloat(-0.0), HFloat(-0.0), HFloat(0.0), HFloat(0.0)]

 

Fourth way: same as third way, but construct the polynomial by the call
                    to PolynomialFit with a variable name (here, x) passed
                    as 4th argument.

 

poly := Statistics:-PolynomialFit(10, X, Y, x):
Jfun4 := unapply(convert(poly,horner),x);

proc (x) options operator, arrow; HFloat(1.9208708381930906e-7)+x*(HFloat(0.9989224786296512)+x*(HFloat(0.0053770259750101496)+x*(-HFloat(0.17716223340632256)+x*(HFloat(0.01083688759880518)+x*(HFloat(0.0016666827576776375)+x*(HFloat(0.0025752993394169478)+x*(-HFloat(8.295512490827164e-4)+x*(HFloat(9.43697800045293e-5)+x*(-HFloat(4.584687457675352e-6)+HFloat(7.544661906532768e-8)*x))))))))) end proc

estY - Jfun4~(X);

[HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(-0.0), HFloat(-0.0), HFloat(-0.0), HFloat(-0.0), HFloat(-0.0), HFloat(-0.0), HFloat(0.0), HFloat(0.0)]

 

Note: The second to fourth ways all constructed an explicit polynomial
as an initial step, and then constructed a reusable procedure from that.
Those procedures could each be applied to any x-value, or be applied
elementwise to all values in X. That's what was done above.

But if you have such a polynomial then you could also evaluate it directly
at any x-value by using the eval command. In other words, you don't have to

construct a procedure from that explicit polynomial.

Fifth way: Below I use elementwise syntax to use eval on all values in Vector X.
Note the small numric difference between this and the earlier approach.

 

estY - eval~(poly, x=~X);
fnormal(%);

[HFloat(0.0), HFloat(0.0), HFloat(-2.220446049250313e-16), HFloat(2.3092638912203256e-14), HFloat(4.440892098500626e-16), HFloat(2.5315860519015132e-11), HFloat(-2.7755575615628914e-16), HFloat(4.863809355271087e-11), HFloat(-1.887379141862766e-15), HFloat(-1.4138414883291262e-9), HFloat(8.104628079763643e-15), HFloat(-1.7425811238425126e-8), HFloat(-1.554312234475219e-14), HFloat(4.830070979289225e-8), HFloat(-4.9182879990894435e-14)]

[0., 0., -0., 0., 0., 0., -0., 0., -0., -0., 0., -0.1742581124e-7, -0., 0.4830070979e-7, -0.]


Using this approach, with slightly greater working precision, attains
values which agree more closely with the earlier approaches.

estY - evalf[12](eval~(poly, x=~X));
fnormal(%);

[HFloat(0.0), HFloat(0.0), HFloat(-2.220446049250313e-16), HFloat(-1.1102230246251565e-16), HFloat(4.440892098500626e-16), HFloat(-2.3203661214665772e-14), HFloat(-2.7755575615628914e-16), HFloat(4.799827202361939e-12), HFloat(-1.887379141862766e-15), HFloat(2.313171876267006e-11), HFloat(8.104628079763643e-15), HFloat(4.193736469204623e-10), HFloat(-1.554312234475219e-14), HFloat(-7.038293003969187e-10), HFloat(-4.9182879990894435e-14)]

[0., 0., -0., -0., 0., -0., -0., 0., -0., 0., 0., 0., -0., -0., -0.]


You might ask, is that small floating-point discrepency due to using eval vs procedures,
or due to using expanded vs Horner form? (Answer: it was due to the form, not due to using eval)

Sixth way: same as fifth way, using eval, but now on the Horner form polynomial expression.

poly2 := convert(poly,horner):

estY - eval~(poly2, x=~X);

[HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(-0.0), HFloat(-0.0), HFloat(-0.0), HFloat(-0.0), HFloat(-0.0), HFloat(-0.0), HFloat(0.0), HFloat(0.0)]

Download regr_fun.mw

You had misplaced extra double-quotes in your color strings, eg, ""Red".

The markup for those subscripted items is a kind of name, and with the special characters such names have to be enclosed in single left-ticks (aka name-quotes in Maple). Eg,

    `#msubsup(mi("&pi;"),mi("r"),mn("B"));`

and not just (as you had it),

    #msubsup(mi("&pi;"),mi("r"),mn("B"));

which gets interpreted as a comment since the # is bare.

nb. Those left-ticks might not(!) show in the rendering on the inlined worksheet below. See the attached worksheet in actual Maple.

restart

with(plots)

_local(Pi)

DATA := [Cv = .9, Cr = .54, tau = .1, Phi = .95, epsilon = 0.1e-1, s = 0.2e-1, delta = .7, Ct = .8]

L1 := ((4*tau*Ce*theta+(Cr-Cv)^2)*Ct-2*Ce*tau*theta^2)/(4*Ct*theta-2*theta^2)

L2 := ((4*tau*Ce*theta+(-Cr+Cv+s)^2)*Ct-2*Ce*tau*theta^2)/(4*Ct*theta-2*theta^2)

L3 := ((4*tau*Ce*theta+(Cr-Cv)^2)*Ct-2*Ce*tau*theta^2)/(4*Ct*theta-2*theta^2)

L11 := subs(DATA, L1); L21 := subs(DATA, L2); L31 := subs(DATA, L3)

NULL

L12 := subs(theta = .4, L11); L22 := subs(theta = .4, L21)

A1 := plot([L12, L22], Ce = 0 .. .8, color = ["Red", "Red"], linestyle = [solid, longdash], labels = [C__e, `&pi;__r`], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("&pi;"),mi("r"),mn("B"));`, `#msubsup(mi("&pi;"),mi("r"),mn("S"));`], axis[2] = [color = "#600000"])

NULL

L13 := subs(theta = .5, L11); L23 := subs(theta = .5, L21)

A2 := plot([L13, L23], Ce = 0 .. .8, color = ["Green", "Green"], linestyle = [solid, longdash], labels = [C__e, `&pi;__r`], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("&pi;"),mi("r"),mn("B"));`, `#msubsup(mi("&pi;"),mi("r"),mn("S"));`], axis[2] = [color = "#600000"])

NULL

L14 := subs(theta = .6, L11); L24 := subs(theta = .6, L21)

A3 := plot([L14, L24], Ce = 0 .. .8, color = ["Blue", "Blue"], linestyle = [solid, longdash], labels = [C__e, `&pi;__r`], labeldirections = ["horizontal", "vertical"], legend = [`#msubsup(mi("&pi;"),mi("r"),mn("B"));`, `#msubsup(mi("&pi;"),mi("r"),mn("S"));`], axis[2] = [color = "#600000"])

display(A1, A2, A3)

Download Graph_legend_error_ac1.mw

You could look at this general support page, in the section (near the bottom) titled "Contact Technical Support". There are three phone numbers there, for different geographic regions.

Note the effect of wrapping the Re and Im calls by evalc.

restart;

with(plots):

setoptions(size=[500,300]); setoptions3d(size=[400,400]);

 

a := 3: L := 2*Pi: d := 0.5: T0 := 2*Pi:

PDE := diff(u(x, t), t, t) = a^2*diff(u(x, t), x, x) - d*diff(u(x, t), t);

diff(diff(u(x, t), t), t) = 9*(diff(diff(u(x, t), x), x))-.5*(diff(u(x, t), t))

IBC := u(x, 0) = cos(Pi*x/L), D[2](u)(x, 0) = 0, D[1](u)(0, t) = 0, D[1](u)(L, t) = 0:

pds := pdsolve({IBC, PDE}, u(x, t));

u(x, t) = -(1/70)*cos((1/2)*x)*35^(1/2)*((I-35^(1/2))*exp((1/4)*(-1+I*35^(1/2))*t)-(I+35^(1/2))*exp(-(1/4)*(1+I*35^(1/2))*t))

F := eval(u(x,t),pds);

-(1/70)*cos((1/2)*x)*35^(1/2)*((I-35^(1/2))*exp((1/4)*(-1+I*35^(1/2))*t)-(I+35^(1/2))*exp(-(1/4)*(1+I*35^(1/2))*t))

# It is purely real for real x and t
FF := evalc(F);

-(1/70)*35^(1/2)*cos((1/2)*x)*(-2*35^(1/2)*exp(-(1/4)*t)*cos((1/4)*35^(1/2)*t)-2*exp(-(1/4)*t)*sin((1/4)*35^(1/2)*t))

plot([Re,Im](eval(F,x=0)), t = 0 .. 6, thickness=3, color=[red,blue]);

# There is only small roundoff error using F rather than FF (FF is "better").
#
plot([Re,Im](eval(FF-F,x=0)), t = 0 .. 6, thickness=3, color=[red,blue]);

plot3d(FF, x=-Pi..Pi, t = 0 .. 6, thickness=3, color=[red,blue]);

G1 := simplify( evalc( eval(F,x=1+I) ) );

-(1/35)*exp(-(1/4)*t)*(35^(1/2)*sin((1/4)*35^(1/2)*t)+35*cos((1/4)*35^(1/2)*t))*(-cos(1/2)*cosh(1/2)+I*sin(1/2)*sinh(1/2))

reG1 := evalc( Re(G1) );

(1/35)*exp(-(1/4)*t)*(35^(1/2)*sin((1/4)*35^(1/2)*t)+35*cos((1/4)*35^(1/2)*t))*cos(1/2)*cosh(1/2)

imG1 := evalc( Im(G1) );

-(1/35)*exp(-(1/4)*t)*(35^(1/2)*sin((1/4)*35^(1/2)*t)+35*cos((1/4)*35^(1/2)*t))*sin(1/2)*sinh(1/2)

complexplot(G1, t=0..6, thickness=3);

spacecurve([reG1, imG1, t], t = 0 .. 6, axes = boxed, thickness=3)

# Again, this is purely real-valued for real t.
# So its imaginary component is just zero.
G2 := simplify( evalc( eval(F,x=0) ) );

(1/35)*35^(1/2)*exp(-(1/4)*t)*(35^(1/2)*cos((1/4)*35^(1/2)*t)+sin((1/4)*35^(1/2)*t))

evalc( Re(G2) );

(1/35)*35^(1/2)*exp(-(1/4)*t)*(35^(1/2)*cos((1/4)*35^(1/2)*t)+sin((1/4)*35^(1/2)*t))

evalc( Im(G2) );

0

complexplot(G2, t=0..6, thickness=3, color=red);

# This lies in the plane Im(G2)=0.
#
spacecurve([Re(G2), Im(G2), t], t = 0 .. 6, axes = boxed, thickness=3, labels=[Re,Im,t])

 

 

Download wingho_1_ac.mw

restart

kernelopts(version)

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

H0 := -S1^2*eta1-S2^2*eta2-S1*gamma1-S2*gamma2

Z0 := exp(-beta*H0)

Z0 := add(Z0, S1 = [-2, -1, 0, 1, 2])

Z0 := add(Z0, S2 = [-2, -1, 0, 1, 2])

G0 := -ln(Z0^((1/2)*N))/beta

G01 := -ln((2*exp(4*beta*eta1)*cosh(2*beta*gamma1)+2*exp(beta*eta1)*cosh(beta*gamma1)+1)^((1/2)*N)*(2*exp(4*beta*eta2)*cosh(2*beta*gamma2)+2*exp(beta*eta2)*cosh(beta*gamma2)+1)^((1/2)*N))/beta


Remove/apply common factor

H1 := G01*2*beta/N:      H := G0*2*beta/N:


For H1, convert cosh to exp, and combine ln calls (using real assumption)

T1 := combine( convert(combine(H1),exp) ) assuming real;

ln(1/(((exp(4*beta*gamma2)+1)*exp(4*beta*eta2-2*beta*gamma2)+(exp(2*beta*gamma2)+1)*exp(beta*eta2-beta*gamma2)+1)*((exp(4*beta*gamma1)+1)*exp(4*beta*eta1-2*beta*gamma1)+(exp(2*beta*gamma1)+1)*exp(beta*eta1-beta*gamma1)+1)))


For H, combine to bring the leading negative sign into the ln call.

Ta := combine( H ) assuming real:


Now expand only the exp calls in Ta, but not the ln call.
And then factor.

T := factor( evalindets(Ta,specfunc(exp),expand) );

ln((exp(beta*gamma1))^2*(exp(beta*gamma2))^2/(((exp(beta*eta2))^4*(exp(beta*gamma2))^4+(exp(beta*eta2))^4+exp(beta*eta2)*(exp(beta*gamma2))^3+exp(beta*eta2)*exp(beta*gamma2)+(exp(beta*gamma2))^2)*((exp(beta*eta1))^4*(exp(beta*gamma1))^4+(exp(beta*eta1))^4+exp(beta*eta1)*(exp(beta*gamma1))^3+exp(beta*eta1)*exp(beta*gamma1)+(exp(beta*gamma1))^2)))


At which point simplify can handle it.
 

simplify(T1 - T)

0

Download TESTE_ac.mw

You can use the caption option for that, and one way to construct that from your DATA values would be using sprintf.

caption=sprintf("sigma=%.1f, Cn=%.2f, Crm=%.2f, b=%.2f",
                eval([sigma,Cn,Crm,b],DATA)[])

Q_legend_ac.mw

Or, if you'd like that any/all of those names pretty-printed, eg. sigma rendered as the Greek letter glyph,

Q_legend_ac2.mw


note: I have deliberately not merely used uneval quotes (single right-ticks),
because those are ephemeral, and if you later assigned to any of those
names then an evaluation of the plot construct would result in the caption
turning into, say, 0.65=0.65, etc. Maybe unlikely, but that's defensive programming. Q_legend_ac3.mw

[edit] Yet another reasonable way to construct the caption, and to guard names against further evaluation, involves using InertForm:-Display. This too pretty-prints the sigma character as the Greek letter, etc. This might even be my preferred way, over the 1st and 2nd ways. Q_legend_ac4.mw

This duplicates each frame three times (to slow down the exported .gif file).

It reduces the line thickness as n increases.

restart;

S:=CodeTools:-Usage(
  [seq(eval(subs(THICKNESS(0)=THICKNESS(max(0.01,1-1.2*n*0.02)),
                GraphTheory:-DrawGraph(GraphTheory:-CompleteGraph(n),showlabels=false)),
           _HOVERCONTENT=NULL)$1..3,
       n=3..40)]):

plots:-display(S,insequence=true);

Download graph_anim01.mw

 

 


Or, with labelled vertices, up to n=50, with just two repetitions per frame, and with lines getting thinner slightly more slowly.

restart;

S:=CodeTools:-Usage(
  [seq(eval(subs(THICKNESS(0)=THICKNESS(max(0.01,1-1.0*n*0.02)),
                GraphTheory:-DrawGraph(GraphTheory:-CompleteGraph(n))),
           _HOVERCONTENT=NULL)$1..2,
       n=3..50)]):

memory used=2.19GiB, alloc change=191.18MiB, cpu time=22.31s, real time=20.94s, gc time=2.53s

plots:-display(S,insequence=true);

Download graph_anim02.mw
 

Here's an example for the legend, and making the axes' labels and tickmark values bold.
 

Q1_3_ac.mw

I look forward to reading about what other bits you might have forgotten to mention.

The title option seems to have been broken in Maple 2023. It works ok in Maple 2022.2 and earlier.

I will submit a bug report.

The problem seems to be simply that a new outer Table (hidden borders on those inside it) was put around the assembly. And the title is still being put on the a Table that is just inside that. But the GUI only shows Table caption & title on the outermost of a collected of nested Tables. So the title's being attached to the wrong Table now, and not shown in consequence.

Here are two workarounds:

1) Use Explore's overview option instead (adjusting the padding, for the width),

Explore(plot(a*sin(b*t),t=0..10),
   parameters=[[a=1..20], [b=1..20] ],
  initialvalues=[a=6,b=5],placement='right',width=300,
  'overview'=cat("\n"," "$32,"My Explore"));

2) Utilize a (re-usable) procedure instead, which constructs the xml, fixes it up, and embeds it,

NExplore := proc(U::uneval,{title::string:=""}) local temp;
 temp:=XMLTools:-FromString(Explore(U,_rest,insert=false,returnxml=true));
 DocumentTools:-InsertContent(subsop(1=_XML_Table("captionalignment"="1",
   "title"=title,"captionposition"="0","drawtitle"="true",
   remove(type,[op([1,..],temp)],
          identical("captionalignment","title",
                    "captionposition","drawtitle")=anything)[]),temp));
 return NULL; end proc:

NExplore(plot(a*sin(b*t),t=0..10),
         parameters=[[a=1..20], [b=1..20]],
         initialvalues=[a=6,b=5], placement='right',
         width=300, title="My Explore");

explore_title_ex07.mw

1 2 3 4 5 6 7 Last Page 1 of 343