acer

32303 Reputation

29 Badges

19 years, 303 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@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.

@Christopher2222 The `size` option is now handled by all the 3D plotting commands in exactly the way that other old (2019) Post addressed (for plots:-display and plot3d).

It offered no other functionality in regards to your current query; it merely allowed the window `size` functionlity before it was officially incorporated.

That Post's code is completely irrelevant to modern Maple versions. Indeed, since that Post's code does a hot-rewrite clobber of Library routines you shouldn't use it in any modern version.

On a somewhat related note, I recall that I once wrote this, to mimic independent aspect ratios for axes of a particular flavor (implicitplot3d) of 3D plot.

That's not the same as the zooming thing for 3D plots, but the two topic intertwine, in practice.

I don't actually believe that a pure Library-size solution is possible, despite having written that old Post. What I suspect might be best would be wholly new elements of the PLOT3D structure, which would denote to the (GUI) plot-renderer what axes-aspect-ratios and scaling/zoom factor to use. Those substructure elements would, naturally, be constructed via new options to the relevent Library plotting commands.

@C_R There is a form for it, here.

Whether it goes through the form, or though tech support, it ends up in the same bug tracking database system (and for which triage assessment gets items assigned to the appropriate developer or group).

In your example, this expression (as well as the values substituted into it) does not depend on x,

    rhs(isolate(de5, diff(p(x), x)))

And that's what's used for the vertical (second) component in your plotted points.

It doesn't depend on x, and it doesn't vary with x.

@salim-barzani Please put your followup example for this here, not in a wholly separate and new Question thread. A separate Question thread on this will be deleted.

So, was this the effect you were after, in the sense of avoiding unwanted fractions?

nb. Some more cosmetic improvement could be had by rearranging terms in sums, so that fewer leading terms have a minus sign. I have several variants of code that do this, and can handle this example. (This example is useful because some coefficients in the collect call have opposing needs for sort re-ordering. So no single sort call applied to the whole expression might serve. I have a prototype of a routine that runs through the sub-term sums individually, figuring out a "nice" term re-ordering, in a coefficient-by-coefficient way. Maybe I will make a Post about it. Let me know if you just want a one-off to further beautify this example sooner/now.)

Which fractions do you object to?

Which expressions are you wanting to export?

@vv I thought you might enjoy this (forced) variant, done in Maple 2024.2,

restart;

A := (-8*x - 16)*exp(x/2) + x^2 + 4*x + 16*exp(x) + 4;

(-8*x-16)*exp((1/2)*x)+x^2+4*x+16*exp(x)+4

B := (4*exp(x/2)-x-2)^2;

(4*exp((1/2)*x)-x-2)^2

simplify(eval(factor(expand(eval(A,x=2*t))),t=x/2));

(-4*exp((1/2)*x)+x+2)^2


Download nm_simp_exB.mw

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