PatrickT

Dr. Patrick T

2083 Reputation

18 Badges

13 years, 268 days

MaplePrimes Activity


These are answers submitted by PatrickT

your question is a little vague to me, but perhaps you're looking for "seq"

Thanks jakubi, once again.

I didn't realize there were such large differences between maple and the classic maple. I've got to say that the tickmarks look a lot better under maple than under classic. I must remember that.

I will look into plotsetup(maplet): but first I have tried to customize tickmarks in maple, unsuccessfully.

plot(cos(x), x=-2*Pi..2*Pi, axis=[tickmarks=[10, color=blue, thickness=3]]);

maple: no thick, blue tickmarks.

Today, for instance, at least 5 questions about how to make better plots:

I have no particular Maple competence, but I daresay that a lot of questions posted on mapleprimes have to do with plots. I personally spend a lot of time trying to improve the appearance of my plots and looking for workarounds to make them look better. The day Maple can be used to produce plots of publishable quality, I daresay its usefulness will be vastly increased.

Not sure what you are writing. RN1 := psi; Is psi some value you have defined previously? Can you post a piece of code that you have run in Maple together with the error message, if any ?

what have you tried so far? give us some code to look at.

I have read more than once on this forum comments suggesting that Matlab's plotting functionalities are superior to Maple's. That has not been my experience.

My basic strategy so far has been to produce raw plots in Maple and to add labels and other tweaks with LaTeX's pstricks package. Whenever a choice was available, I have always preferred Maple over Matlab.

I recently tried to produce "fancy" plots with Matlab and it wasn't all that easy. If you're interested, follow the link:

http://www.mathworks.com/matlabcentral/fileexchange/23841

At any rate, I second the suggestion that Maple's plotting functionalities should be

  1. more user-friendly
  2. more diverse

It should be possible to control the thickness/color/linestyle, etc. of the axes. It should be easier to control the tickmark properties. It should be possible to do all these things in a list-type fashion: xtickmarks=[10, color=black,thickness=3], etc..

If for some reason you want arrows at the ends of your axes, you can do something like that with:

xmin:=-5: xmax:=5: ymin:=-3: ymax:=3:
> xlength:=0.8*(xmax-xmin): ylength:=0.8*(ymax-ymin):
> p:= plots[display](
> plottools[line]([xmin,0],[xmax,0],thickness=3),
> plottools[line]([0,ymin],[0,ymax],thickness=3),
> plots[arrow]([0.9*xmax,0],[0.1*xmax,0],head_width=0.02*ylength,head_length=0.05*xlength,color=black),
> plots[arrow]([0,0.9*ymax],[0,0.1*ymax],head_width=0.02*xlength,head_length=0.05*ylength,color=black)
> ):
> plotsetup(ps,plotoutput=`axis.ps`,
plotoptions=`nocolor,portrait,noborder,axiswidth=500pt,axisheight=500pt`):  display({p},view=[xmin..xmax,ymin..ymax],labels=[``,``],axesfont=[TIMES,ROMAN,12]); plotsetup(default):
 

but you'd have to tweak your arrows better than I have cos it doesn't look great at this stage.

you can overwrite the axis with a thicker line, without having to redefine the tickmarks, though you may then find that the tickmarks don't fall quite where you'd want them to.

xmin:=-5: xmax:=5: ymin:=-5: ymax:=5:
> plots[display](
> plottools[line]([xmin,0],[xmax,0],thickness=3),
> plottools[line]([0,ymin],[0,ymax],thickness=3),
> axesfont=[TIMES,ROMAN,12],
> view=[xmin..xmax,ymin..ymax]);

From the Help menu, "plot,tickmarks", I was under the impression that you could redefine the thickness of the tickmarks. I copy-paste below:

To get n tickmarks, use tickmarks=n or tickmarks=[n, w], where w is a sequence of one or more suboptions. The available suboptions are listed below.

  • color=c or colour=c
  • linestyle=t
  • subticks or subticks=t
  • thickness=t

but for some reason that doesn't work for me at this time.

The Help menu gives the following example:

plot(x*cos(x), x=0..10, axis=[tickmarks=[5, subticks=3]]);

So I thought you might be able to do something like:

axis=[tickmarks=[5, thickness=2]] ?

create the plot first, along the lines of

p:= plot3d( etc.

then display it with the parameters, along the lines of:

display(p,axes=normal)

should work

This may be obvious, but have you used the Maple Help menu? It's the best Help menu of any software I know.

You may start with:

Physics -> Physics Package -> Overview

The following is an excerpt:

Brief description of each command

The * command performs generalized products that may simultaneously involving commutative, anticommutative and noncommutative operands.

The `.` command performs the scalar or inner product between Bras Kets and linear quantum operators defined as such using the Setup command or returned by the Annihilation and Creation commands.

etc.
 

And another tip: try to phrase your problems in "Maple language" with some example. If you use the wrong Maple commands, chances are someone will spot the error. The following "rewriting my big set of tensor equations in single variable form" is obscure to me.

I just posted the following for http://www.mapleprimes.com/forum/coloringplane3dplot, perhaps my answer there might help you too.

The default is typically for the axes to cross at (0,0,0). Alternatives are possible.

Check the Help menu: Graphics -> 3D ->Options ->Overview

 

Here an example from my stuff:

Define some fonts:

> axesfonts:=axesfont=[TIMES,ROMAN,8]:
> labelfonts:=labelfont=[TIMES,ROMAN,10]:

Define some colors:

> myblue:=COLOR(RGB,.1,0,.55):
> myred:=COLOR(RGB,.9,.1,0):
> mygreen:=COLOR(RGB,.0,.5,.0):

Define the style of plot:

> plotopts:=style=patchcontour, shading=none,axes=boxed:

The plot itself (here an implicit plot):

> xmin:=0, etc.

> p:=plots[implicitplot3d]({f},x=xmin..xmax,y=ymin..ymax,z=zmin..zmax, numpoints=10000, plotopts, colour=myblue):
> display3d({p}, axesfonts, labelfonts, orientation=[-115,15]);

Here an example from my stuff:

Define some fonts:

> axesfonts:=axesfont=[TIMES,ROMAN,8]:
> labelfonts:=labelfont=[TIMES,ROMAN,10]:

Define some colors:


> myblue:=COLOR(RGB,.1,0,.55):
> myred:=COLOR(RGB,.9,.1,0):
> mygreen:=COLOR(RGB,.0,.5,.0):

Define the style of plot:


> plotopts:=style=patchcontour, shading=none,axes=boxed:

The plot itself (here an implicit plot):

> xmin:=0, etc.


> p:=plots[implicitplot3d]({f},x=xmin..xmax,y=ymin..ymax,z=zmin..zmax, numpoints=10000, plotopts, colour=myblue):
> display3d({p}, axesfonts, labelfonts, orientation=[-115,15]);

 

have you had any luck with your tensor equation? have you tried to narrow down the problem by writing a minimal example?

you can simply copy-paste your maple input to make it easier for others to view what you've  done. Warning: I  don't know a single thing about what you're doing. I couldn't find any info about with*(physics), so I  replaced it with : with(Physics). I copy the output below. I hope it may provide a hint.

 

> restart:  with(Physics);

  [*, ., Annihilation, AntiCommutator, Bra, Bracket, Check,

        Commutator, Coordinates, Creation, Dagger, Define, Dgamma,

        FeynmanDiagrams, Fundiff, Intc, Inverse, Ket, KroneckerDelta,

        LeviCivita, Parameters, Projector, Psigma, Setup, Simplify,

        SpaceTimeVector, Trace, Vectors, ^, dAlembertian, d_, diff,

        g_]

> Define(A[mu, nu, lambda, rho], antisymmetric = {{mu, nu, lambda}}):
> Define(B[sigma, alpha, rho, beta], antisymmetric = {{rho, alpha, sigma}}):
> Define(C[sigma, alpha, mu, rho], antisymmetric = {{mu, alpha, sigma}}):
> Define(D[rho, nu, lambda, beta], antisymmetric = {{nu, rho, lambda}}):
> Define(E[sigma, alpha, nu, rho], antisymmetric = {{rho, alpha, sigma}}):
> Define(G[mu, rho, lambda, beta], antisymmetric = {{mu, rho, lambda}}):
> Define(H[sigma, alpha, lambda, rho], antisymmetric = {{alpha, lambda, sigma}}):
> Define(F[mu, nu, rho, beta], antisymmetric = {{mu, nu, rho}}):
> fundamentalidentity := AB = CD+EG+HF:
> constraintp := Define(P[p, q, r, 0], antisymmetric = {{p, q, r}}) = LeviCivita[p, q, r]:
> constraintq := Define(Q[p, q, r, s], antisymmetric*{{p, q, r}}) = 0:
> mu := 0:
> v := p:
> lambda := q:
> printlevel := 1:

                Defined objects with tensor properties


                Defined objects with tensor properties


                Defined objects with tensor properties


                Defined objects with tensor properties


                Defined objects with tensor properties


                Defined objects with tensor properties


                Defined objects with tensor properties


                Defined objects with tensor properties

Error, (in Define) expected spacetime, spinor or gauge indices but the indices in P[p,q,r,0] are of not of those types

Error, (in Define) expected objects with a tensor structure, from a symbol, say A, to an indexed function, say A[mu](X). Received: {antisymmetric*{{p, q, r}}}

> for rho from 0 to 3 do for p to 3 do for q to 3 while p < q do for sigma from 0 to 3 do for alpha from 0 to 3 while alpha < sigma or alpha < rho do for beta from 0 to 3 do for r to 3 while r < q or r < p do for s to 3 do solve({fundamentalidentity, A = constraintp, A = constraintq, B = constraintp, B = constraintq, C = constraintp, C = constraintq, D = constraintp, D = constraintq, E = constraintq, F = constraintp, F = constraintq, G = constraintp, G = constraintq, H = constraintp, H = constraintq}, [A]) end do end do end do end do end do end do end do end do;
>
 

First 20 21 22 23 24 Page 22 of 24