Use the Java Swing component inside a MATLAB figure, precisely JEditorPane
using MATLAB's javacomponent()
function. JEditorPane supports a good subset of HTML.
Here is a code sample:
mytext = '<html><body><table border="1"><tr><th>Month</th><th>Savings</th></tr><tr><td>January</td><td>$100</td></tr></table></body></html>';
hfig = figure();
je = javax.swing.JEditorPane( 'text/html', mytext );
jp = javax.swing.JScrollPane( je );
[hcomponent, hcontainer] = javacomponent( jp, [], hfig );
set( hcontainer, 'units', 'normalized', 'position', [0,0,1,1] );
%# Turn anti-aliasing on ( R2006a, java 5.0 )
java.lang.System.setProperty( 'awt.useSystemAAFontSettings', 'on' );
je.putClientProperty( javax.swing.JEditorPane.HONOR_DISPLAY_PROPERTIES, true );
je.putClientProperty( com.sun.java.swing.SwingUtilities2.AA_TEXT_PROPERTY_KEY, true );
je.setFont( java.awt.Font( 'Arial', java.awt.Font.PLAIN, 13 ) );
EDIT: see the discussion of this solution here,