I have only run the demo so far (which worked well), but it's surely a very useful contribution and I would like to thank the author for the same.
Although I haven't programmed awt/swing, or even much java, I recently wrote a fairly complex gui in perl-Gtk2, and I've some experience in gui programming.
My first question is if it's possible to have tabbed panes like we do in web browsers and a number of other guis? I don't think Matlab has it natively, and I'm sure swing has it. So how about our jobjects?
Second, one very desirable (even essential) feature in gui toolkits is widget packing. One programs the relative layout of the widgets and the toolkit computes the absolute positions and dimensions. I mean why should I be bothered with the arithmetic, let the computer do the math. Now that we can access swing via jobjects, is it possible to do automatic widget packing?
found a little bug on line 823 of plot2svg_2d.m which was causing firefox to hit a parsing error. The original line code is
case '-.',pattern = 'stroke-dasharray="100pt,25pt,25pt,25pt,"';
which should be changed to
case '-.',pattern = 'stroke-dasharray="100pt,25pt,25pt,25pt"';
(The bug is the trailing `," after the last 25pt.)
There are a few issues that I'm seeing in the exported svg:
1) subscripted labels like "f(t_1,t_2)" are appearing verbatim; subscripts are not getting interpreted as I believe they should.
2) I have a figure with two 2D contour plots differentiated by one set of contours being solid and the other set dot-dashed. The svg output is unfortunately quite poor: one can hardly make out that there are two sets of contours.
For (1) above I have an idea: SVG+MathML
I am using MathML to render a table of parameters -- which requires some math typesetting, greek symbols, matrices -- to go along with the plots. The way I am doing that is to have tex (well, itex actually) markup in the file and pass the file through itex2MML.
Maybe the same process will work with the svg figures. Enclose the math in the labels in a pair of
`$"s (requited by itex), set Matlab's Interpreter to Latex so that the fig file comes out alright, create an svg and filter through itex2MML. Let's see how that goes.
If only Matlab had native SVG support, wouldn't have to jum through all these hoops...
A handy shell snippet to copy the downloaded files under appropriate dirs in your .vim/
$ cd matlab # the dir you downloaded
$ tar -cf - | (cd ~/.vim; tar -xf -)
You tar the files to stdout, cd to ~/.vim and untar stdin; no intermediate file creation.