robertocooper

180 Reputation

7 Badges

4 years, 154 days

MaplePrimes Activity


These are questions asked by robertocooper

Matlab has some great functions package which accomplishes:

  • This function saves a figure or single axes to one or more vector and/or bitmap file formats, and/or outputs a rasterized version to the workspace, with the following properties:
    - Figure/axes reproduced as it appears on screen
    - Cropped/padded borders (optional)
    - Embedded fonts (pdf only)
    - Improved line and grid line styles
    - Anti-aliased graphics (bitmap formats)
    - Render images at native resolution (optional for bitmap formats)
    - Transparent background supported (pdf, eps, png, tiff)
    - Semi-transparent patch objects supported (png, tiff)
    - RGB, CMYK or grayscale output (CMYK only with pdf, eps, tiff)
    - Variable image compression, including lossless (pdf, eps, jpg)
    - Optional rounded line-caps (pdf, eps)
    - Optionally append to file (pdf, tiff)
    - Vector formats: pdf, eps
    - Bitmap formats: png, tiff, jpg, bmp, export to workspace

 

  • Why don't we all together in this forum create a package like that? :) At least I  hope we can create for most important of the functions like cropping border etc. Many Maple users need a code like that.

 

  • I don't know whether we can quickly convert these codes to maple codes or not.  But maybe we use all code in this forum about this and create a new package.

Best regards.

I want to export Maple 3d graphics to Latex with high quality. ( MAPLE 2020.1)

I export the 3d graphics to a .jpeg or.png file, but the quality of graphics is very poor. So, I want to prefer Encapsulated PostScript files (.eps) format.

 I select the figure, right-click it and choose "Export as". and  I save the figure as  .eps file. No problem I get a file. But when I add the eps figure to Latex, I live some problems:

MY Example Code:

restart:
with(plots):
scheme1 := ["zgradient",["Blue","Cyan","Green","Yellow","Orange","Red"]]:

P1:=plot3d(x*y, colorscheme=scheme1,style=surfacecontour ): 
P2:=plot3d(x*y,colorscheme=scheme1,style=point,symbol=asterisk): 
final_plot:=display({P1,P2}); #I want to export this figure to .eps

 

PROBLEMS which I live:

  • Sometimes I get the result as follows:

  • Sometimes compiling takes too long time in latex, I don't get any results or get an error. (I tried on the all of TexStudio or TexMaker or overleaf)

I read the previous post on this site and applied the suggestions, but I still live the same problem.

 

P.S. 

I can add Maple 2d graphics to LATEX without any problem.

Any help would be appreciated.

I want to write a procedure for adding gridlines to 3dplots of any function f on ([x_min,x_max]x[y_min,y_max])

restart:
with(plots):
grids:=proc(f,x_min,x_max,y_min,y_max)
 local z_min,z_max,plot_f,xz,yz,xy;
uses plots;
z_min:=0:
z_max:=10:
plot_f:=plot3d(f,x=x_min..x_max,y=y_min..y_max);
xz:=plot3d([x,y_min,z],x=x_min..x_max,z=z_min..z_max,style=line,color=blue,thickness=0,grid=[6,6]);
yz:=plot3d([x_min,y,z],y=y_min..y_max,z=z_min..z_max,style=line,color=blue,thickness=0,grid=[4,6]);
xy:=plot3d([x,y,z_min],x=x_min..x_max,y=y_min..y_max,style=line,color=blue,thickness=0,grid=[4,4]);
return
display(plot_f,xz,yz,xy,lightmodel=none,tickmarks=[3,3,6],labels=[x,y,"f(x,y)"],labeldirections=[horizontal,horizontal,vertical],axes=frame);
end proc:

#EXAMPLE
f:=x^2-y:
x_min:=-1:
x_max:=3:
y_min:=-2:
y_max:=1:
grids(f,-1,3,-2,-1);

 

 

 

 

 

 

Some of the drawbacks of the above code are:

  1. The minimum value ( z_min ) and maximum value ( z_max ) of function f(x,y) can't be calculated automatically.
  2. grid=[6,6],grid=[4,6] etc. can't be calculated automatically. (it may be automatically calculated by considering the stepsize of axis x and axis y)

 

Let's consider nonlinear partial differential equations as follows:

It can be reduced into the nonlinear ordinary differential equation

by using the transformation as follows:

How to write a code for transforming the PDE to ODE by Maple?
 

For example; let's consider the following PDE

by using the transformation above we get the following ODE. 

 

restart:
with(PDEtools):
tr1:={x=mu*t + xi,u(x,t)=U(xi) };
PDE := diff(u(x,t),t) +p*u(x,t)*diff(u(x,t),x) +q* diff(u(x,t),x$3)=0;
dchange(tr1,PDE);

 

1 2 Page 2 of 2