A few months ago, inspired by the PYPL PopularitY of Programming Language, I compared Google trends data for the 3M of CAS software: Maxima, Maple, and Mathematica based searches of the form “<language> tutorial”. The result was that Maxima seems to be slowly increasing in popularity with about 20% of the interest in the 3M.
Today I saw another popularity metric: The TIOBE index. Using their methodology of Google trends data for the search string <language> + programming, I have these results for the proportion of searches among the 3M:
Today, a student turned in some Maxima work for my class. I discovered he had successfully used the command derivative() in place of diff() with seemingly identical results. I verified that the same thing works in several versions of Maxima I have installed on my windows computer. Who knew?
Here’s something I just learned and want to share with others and record for my use the next time I need to do this and have already forgotten!
The position and appearance of the figure legend in Maxima plots drawn with plot() (by setting gnuplot_preamble) and in draw() (by setting user_preamble), can be manipulated to any of the gnuplot options listed here.
Here are some examples:
In MATLAB, I occasionally have need for the plotyy() command for making a plot of two different functions with widely varying scales.
Turns out Maxima draw has an equivalent functionality by setting the option yaxis_secondary:
Here’s the documentation.
In MATLAB, pause
interrupts execution of a loop until the user strikes a key, and pause(<n>)
pauses for <n>
seconds before resuming execution.
Here’s my attempt at a pause() function for Maxima that works in a similar way to MATLAB. It uses Maxima’s read() to stop everything and wait for user input, and it uses the lisp function sleep to stop for a fixed number of seconds.
**note that a lisp function
can be called inside Maxima as
I’m not happy that in order to resume after the pause, the user needs to enter a valid character (space or nothing results in an error) followed by CTRL-SHIFT. I hope to either figure something else out or even better hear suggestions from other Maxima users!
if tsecs=0 then
read("Execution Paused...enter any character then CTRL-ENTER")
disp(sconcat("paused for ", tsecs," seconds")),
call this either as
or, for a three second pause
In MATLAB, I often use the subplot() command to make an array of multiple plots in a single figure.
In Maxima, we can achieve that by generating each of the subplots using gr2d(), and then putting them all together with a call to draw() or wxdraw():
There’s an optional columns argument — the subplots are drawn row-wise in an array with the specified number of columns:
And of course all this works for 3d plots using gr3d():
Notepad++ is lots of people’s favorite text editor for Windows. I use it every day.
A little googling around led me to a Notepad++ user-defined syntax highlighting file for the Maxima language, written by David Scherfgen and shared at the Maxima-Discuss list.
I made a little change to the file that overcame a nagging difficulty — I found that .mac file extensions weren’t automatically being recognized upon opening.
Here’s a link to my modifed file.
To include Maxima syntax highlighting in Notepad++ do this:
- unzip the downloaded file MaximaNotepadDS.zip
- in Notepad++, go to Language –> Define your language…
- Press Import and navigate to the file MaximaNotepadDS.xml
- Quit Notepad++ and then start the program again.
- Now in Language menu, you’ll see Maxima in the list of languages at the bottom of the drop-down menu
- A .mac file already open won’t display with the new syntax highlighting, but any .mac file you open or save from new will automatically show with syntax highlighting.