Dr. Patrick T

2073 Reputation

18 Badges

13 years, 137 days

MaplePrimes Activity

These are answers submitted by PatrickT

One way would be to use a column vector instead of a list



See the attached pdf: is it good enough?

I produced the attached pdf with

File -> Print 

and selecting "pdflite"

pdflite is a freeware that seems to work, but there are many others.


I'm pretty sure events can be tweaked for this. A while back I asked a series of questions about this and received some amazingly useful answers from Allan Wittkopf. You should learn quite a bit by reading the thread in its entirety (make sure you order the posts by dates and not by ratings, so you can follow the discussion step by step).

You may want to read the answers given to a similar question of mine a while back.

This is how I do it on Windows: I create a batch file (extension .bat) to convert the postcript to a pdf using ps2pdf. This can be done with either texlive or MikTeX, whichever you're using.

  @echo off
  echo batch processing with LaTex ps2pdf
  cd /d %~dp0
  for %%I in (*.ps) do (
   "C:/texlive/2013/bin/win32/ps2pdf.exe" %%I


This produces a full A4 (or letter size) image. To crop, you have several solutions. Here is the one I've used, based on older versions of calibre2, but there are other ways, in particular using Ghostscript. Or you may want to look at the freeware briss.

  @echo off
  echo batch conversion and cropping from postscript to pdf 
  echo first step converts postscript to pdf with ps2pdf.exe
  echo second step computes the bounding box with gswin64c.exe from the Ghostscript suite
  echo third step crops with pdfmanipulate.exe from the Calibre2 suite (version 0.88.66 or earlier)
  cd /d %~dp0
  for %%I in (*.eps,*.ps) do (
  "C:/texlive/2013/bin/win32/ps2pdf.exe" %%I
  for %%I in (*.pdf) do (
  "C:\Program Files\Ghostscript\gs9.07\bin\gswin64c.exe" -dSAFER -dNOPAUSE -dBATCH -sDEVICE#bbox "%%I" 2> bounding
  "C:\bat\pdfmanipulate\pdfmanipulate.exe" crop -o "%%~nICropped.pdf" -b bounding "%%I"


Another way (not tested for a while):

  @echo off
  echo batch processing with Ghostscript epstool, automatically adjusts the bounding box
  cd /d %~dp0 
  for %%I in (*.eps) do (
  "C:\Program Files (x86)\epstool-3.08\bin\epstool.exe" --copy --bbox "%%I" "%%I~nIEPStooled.eps"

If you need to rotate, you can use the pdftk tool, adding this to your loop:

  for %%I in (*Cropped.pdf) do (
  "pdftk.exe" "%%I" cat 1-endE output "%%~nIRotated90.pdf"


keywords: tickmarks under plot/options

see also labelfont, gridlines, 

you can also control 'subticks' 

plot( x^2
, x = -1 .. 1
, 'axes' = 'normal'
, 'axis'[1] = ['tickmarks' = [[-1,-1/2,1/2,1], 'color' = 'blue'], 'color' = 'green']
, 'axis'[2] = ['tickmarks' = [5, 'subticks' = 10, 'color' = 'yellow'], 'color' = 'red']
, 'axesfont'= [TIMES,ROMAN,11]
, 'labelfont'= [SYMBOL,ROMAN,15]
, 'labels' = ['x', 'y']
, 'titlefont'= [TIMES,ROMAN,25]
, 'title' = "silly plot"
) ;

I notice you have very small values in your equations. Can you rescale the problem, by defining variables that are rescaled versions, such that the parameters are, say, between 1 and 10 or 1 and 100. Also, to understand the source of the problem you may  want to analyze special cases, say setting some parameters to zero or setting exponents to one, etc. until you get something that Maple can solve numerically. Then slowly move towards your original system by undoing the simplifying assumptions and see where the problems are. With so many equations, I don't think your problem will be easy to figure out unless you simplify and get intuition about what's going on.

If this is not the symbol you mean, you can try this: open the palette, search for the symbol you want, right-click on it and select "convert to" 1D Math Input. It worked for me in document mode.

plot(x, 'legend' = [b_z^`∗`]);

you can put the solutions in a list by using []:

g := [dsolve([oder, r(0) = 1, (D(r))(0) = 0])];


and then pick solutions from the list:


The above works also directly with a sequence (without the []).

The message tells you what to do,


worked for me, took a little while. I didn't try other values, but you may first try with smaller values of maxfun.

Also: you don't need to call the linalg package, it's deprecated.

In addition, consider the following:

# Standard GUI



x := evalf[5](45.67845);

 In most situations, you probably want to modify the dispay precision rather than actually changing the numbers.


But, for example:




convert(exp(I*x)+ exp(-I*x) ,sincos);

exp(I x)   



plots:-loglogplot(x^(-3/8), x=10^3..10^8);

EDIT: had problems with the links below, hopefully fixed. 

Open this document and tell us what you see.

If it appears to work normally, then your problem may reside higher up in your worksheet.

maybe you did something like: theta0:=0; 

Or some 1D versus 2D display issue. 

If problem persists, upload the whole worksheet (green arrow in the menu).









Depending on what the purpose is:


Based on Kitonum's code, but using the built-in PDF for the Normal distribution. The advantage is that you can easily adapt the code to another distribution, if you were so inclined, and you don't have to remember the PDF of the distribution, and you avoid possible mis-typing of the distribution.

Side remark: I did not detect any advantage in terms of speed or memory usage

CodeTools:-Usage(# based on Kitonum
plots:-animate(plot, [Statistics:-PDF(Statistics:-RandomVariable(Normal(mu,1)),x), x=-5..6,'thickness'=2,'color'=blue], mu=[seq(-2+0.02*k,k=0..250)])

For fun, here an animation as the "entropy" H varies between 0 and 1.

h := 1/2*ln(2*Pi*exp(1)*sigma^2);
sig := solve(H=h,sigma,UseAssumptions) assuming sigma>0;
pdfN := Statistics:-PDF(Statistics:-RandomVariable(Normal(mu,sigma)),x):
pdfNs := unapply( eval(pdfN,sigma=sig), (mu,H) ):
plots:-animate( plot, [pdfNs(0,H), x=-5..5,'thickness'=2,'color'=blue], H=[seq(i,i=0..1,0.01)] );

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