acer

32333 Reputation

29 Badges

19 years, 324 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

Thanks for a great read and links, John.

My favorite bit, "...everyone's favorite noncommutative ring is the ring of n × n matrices".

@Christopher2222  Why not post your attempts, in a .mw file?

I don't really understand how you're operating. You used font before, but it was not the valid option name. Now you're trying other option names such as style or fontstyle, that don't seem right. I know that this is not all documented. But how are you cooking up these wrong option names!?

restart;

with(Typesetting,':-mtext'):

plot(x^2,'title'=':-typeset'(mtext("sorta",'fontfamily'="Courier",'size'=30),
                             mtext(" kinda",'fontfamily'="Helvetica",'size'=20),
                             mtext(" works\n",'size'=10)),
     size=[500,200]);

plot(x^2,'title'=':-typeset'(mtext("sorta",'fontfamily'="Courier",'size'=30,
                                   'fontweight'="bold"),
                             mtext(" kinda",'fontfamily'="Helvetica",'size'=20),
                             mtext(" works\n",'fontweight'="bold",'size'=10)),
     size=[500,200]);

Download ts_stuff_01.mw

Those would be automatically converted by the Eigenvalues or Eigenvectors commands.

@Christopher2222 

I changed font to fontfamily, to get an actual change in the font used. (I don't see your original `font`=... argument having an effect.)

@GFY Sorry if I didn't explain before. And I wasn't sure which case you were interested in, ie. whether the first argument to your kk calls would always be an integer. I suppose I guessed wrongly.

Note the following difference. The middle example behaves the same as the last example. You can choose the first, if that's what you'd prefer in general.

restart;

altkk := proc(i, ii)
  if not ( ii::numeric and i::numeric ) then
    return 'procname'(args); end if;
  return [i, ii];
end proc:

altkk(p, 2); altkk(p, m); altkk(2, m); altkk(2, 3);

altkk(p, 2)

altkk(p, m)

altkk(2, m)

[2, 3]

restart;

altkk := proc(i, ii)
  if not ii::numeric and i::numeric then
    return 'procname'(args); end if;
  return [i, ii];
end proc:

altkk(p, 2); altkk(p, m); altkk(2, m); altkk(2, 3);

[p, 2]

[p, m]

altkk(2, m)

[2, 3]

restart;

altkk := proc(i, ii)
  if ( not ii::numeric ) and i::numeric then
    return 'procname'(args); end if;
  return [i, ii];
end proc:

altkk(p, 2); altkk(p, m); altkk(2, m); altkk(2, 3);

[p, 2]

[p, m]

altkk(2, m)

[2, 3]

Download prec_q.mw

Please don't post wholly separate new Question threads on this topic of replacing all instances like,

     diff(G(xi), xi)/G(xi)

inside an expression or differential equation.

You can use algsubs (which member nm has done here), or you can use the simplify command with so-called side-relations, eg,

    simplify(eq2, { diff(G(xi), xi)/G(xi) = w(xi) } );

If you have other equations and you want to do the same kind of thing then please show them here (or use the Branch button at the bottom of this original Question, to start a linked thread).

Wholly duplicate Question threads on this same topic will be flagged as such and may be deleted.

@dharr I agree that would make sense, at least in principle.

I don't recall why/when the distinction first arose for the GUI's printing of an assignment statement (with a plot) versus printing of a mere expression output. Note that it can also occur for "large" 2D plots, such as come out of implicitplot and (perhaps) filled contout plots or density plots.

I have a hazy recollection that I might first have noticed the elided output message when the GUI got the ability to render "thumbnails" of plots when printing an expression sequence that happened to contain at least one plot. But I could be misremembering -- that was quite some time ago.

@dharr Calling display on this single plot structure doesn't do anything of importance to it; it's not the key thing here. In other words, there's not a significant difference between this plot and the plots:-display of this plot; both are just Library/kernel-side constructions. It's not as if storing either of them is storing something printed, etc...

The key thing here is that the result is that in your second line the plot structure is being printed as output, without being part of an assignment statement, which makes the GUI actually render it. (The GUI is simply confused about what kind of large thing it should be allowed to render, on the RHS of output of an assignment statement. It has some special case code for small-enough plots.)

The fact that the second line is a call to plots:-display is not what make the structure actually get rendered. (Ie. the OP's supposition about that was off the mark.)

Whether this is coming from a display call or not, the separate statement that caused it to be printed as simple output is what makes it render.

@vv It works in my Maple 2016.2, but not in my Maple 2017.3.

@nm The OP has used Maple 2022 for most previous postings. I'll compare, using that version, for Linux.

In that version the Postscript right-click export is poor (though not as bad as .jpg).

The PDF and PNG exports are both reasonably good. Resizing the Maple plot window's borders manually using the mouse (or using the size option of plot3d) to increase the plots dimensions in Maple can sometimes bring some improvement.

The .svg export is also poor, and both it and the right-click Postscript export are noticeably inferior to the right-click PNG export.

@mmcdara It's a little tricky to get flexible contour shading in the very old Maple 17 version that the OP uses, and I like your ideas for him.

Here those are, with the 2D contour plots transformed by z-height.

I only made one other adjustment to your code, related to rand() and float ranges.

restart;

kernelopts(version);

`Maple 17.02, X86 64 LINUX, Sep 5 2013, Build ID 872941`

(1)

with(plots):

data := {phi1 = 0.3e-1, phi2 = 0.3e-1, phi3 = 0.3e-1, B0 = 0.5e-1, sigma = .3, ku = 0.2e-1, kl = 0.3e-1,
S = 0.2e-1, beta0 = 1.5, beta1 = .8, beta2 = .5, beta3 = .7, beta4 = .3, beta5 = .2, beta6 = .4,
beta7 = .6, beta8 = .9, beta11 = .1, beta22 = .2, beta33 = .1, beta44 = 0.5e-1, beta55 = 0.8e-1,
beta66 = 0.3e-1, beta77 = 0.7e-1, beta88 = 0.4e-1}:

Nu := B0^2*beta44+S^2*beta88+beta11*phi1^2+beta22*phi2^2+beta33*phi3^2+beta55*sigma^2+beta66*ku^2+beta77*kl^2+B0*beta4+S*beta8+beta1*phi1+beta2*phi2+beta3*phi3+beta5*sigma+beta6*ku+beta7*kl+beta0:

Fixed := remove(has, data, {phi1, phi2}):
c := contourplot(eval(Nu, Fixed), phi1 = 0.1e-1 .. 0.5e-1, phi2 = 0.1e-1 .. 0.5e-1,
                 filledregions=true, coloring=["Red", "Yellow"]):
#c;

zlo,zhi := op(plottools:-getdata(plot3d(eval(Nu, Fixed), phi1 = 0.1e-1 .. 0.5e-1,
                                     phi2 = 0.1e-1 .. 0.5e-1),
                              rangesonly)[3]);

1.66053600000000001, 1.71325599999999989

(2)

display(
  plottools:-transform((x,y)->[x,y,zlo-(zhi-zlo)/10])(c),
  plottools:-transform((x,y)->[x,y,eval(eval(Nu, Fixed),[phi1=x,phi2=y])])(c),
  orientation=[-70,70,0], labels=[phi1,phi2,""], lightmodel=none
);

 

paint := () -> COLOUR(RGB, seq(rand(0..10^6)()/1e6, k=1..3)):
c := contourplot(eval(Nu, Fixed), phi1 = 0.1e-1 .. 0.5e-1, phi2 = 0.1e-1 .. 0.5e-1,
                 filledregions=true):
curv, poly := selectremove(has, [op(c)], CURVES):
nreg := nops(poly) - 1;
cc := display(PLOT(curv[], map(region -> subsop(-2 = paint(), region), poly[1..nreg])[], poly[nreg+1])):
#cc;

9

(3)

display(
  plottools:-transform((x,y)->[x,y,zlo-(zhi-zlo)/10])(cc),
  plottools:-transform((x,y)->[x,y,eval(eval(Nu, Fixed),[phi1=x,phi2=y])])(cc),
  orientation=[-70,70,0], labels=[phi1,phi2,""], lightmodel=none
);

 

with(ColorTools):
MyChoice := EvenSpread("Yellow", 9):
paint    := ToRGB24~( MyChoice ) /~ 255:
ccc := display(PLOT(curv[], map(n -> subsop(-2 = COLOUR(RGB, paint[n]), poly[n]), [$1..nreg])[], poly[nreg+1])):
#ccc;

display(
  plottools:-transform((x,y)->[x,y,zlo-(zhi-zlo)/10])(ccc),
  plottools:-transform((x,y)->[x,y,eval(eval(Nu, Fixed),[phi1=x,phi2=y])])(ccc),
  orientation=[-70,70,0], labels=[phi1,phi2,""], lightmodel=none
);
 

 


Download Some_coloring_ac.mw

@GFY I don't know what exactly you've done. I was talking about exporting an oversized image, then changing its dpi and (eventually) dimensions using an external app such as gimp. Of course, I did not suggest that exporting a larger size plot would by itself produce a higher dpi.

I don't know whether you saw any change, using png. For most stock 3d exports, and all other things being equal, I get a better result using png than jpeg (though, jpeg is about the worst; not a high bar).

I don't even know which Maple version you're using, let alone a concrete example.

I usually go with export to PNG format (sometimes doing it via right-click).

And sometimes I will use the size option while constructing the plot3d result, and then export it as a (deliberately) over-large image file which I may then resize or re-jig using an external image processing tool. I have seen some instances where that can improve the quality. I'm not sure what might be the best image format, for that.

Let us know if you can come up with any more details about what's not adequate.

@vv I started from noticing,

   sum(sum(1/i,i=1..n)/n/(n+1), n=1..infinity);
   expand(%);

rather than with your observation.

I will submit a report against the weakness.

I often delete several spam posting at night, but I've skipped the past few nights.

I've noticed that this site's spam-filter seems to miss more AI generated spam postings, and those seem to have become in vogue.

4 5 6 7 8 9 10 Last Page 6 of 591