MATLAB: How to plot a table to a figure

table figure plot

I'm playing with tables because I liked how it's displayed and I'd like to display the table in a figure. Is there a simple way to do this (built in function?) or will I need to create a function that will do this somehow?
Example
LastName = {'Smith';'Johnson';'Williams';'Jones';'Brown'};
Age = [38;43;38;40;49];
Height = [71;69;64;67;64];
Weight = [176;163;131;133;119];
BloodPressure = [124 93; 109 77; 125 83; 117 75; 122 80];
T = table(Age,Height,Weight,BloodPressure,'RowNames',LastName)
T =
Age Height Weight BloodPressure
___ ______ ______ _______________
Smith 38 71 176 124 93
Johnson 43 69 163 109 77
Williams 38 64 131 125 83
Jones 40 67 133 117 75
Brown 49 64 119 122 80
I'd like T displayed in a figure that looks like it's displayed in the command window. Any ideas?
Thanks!

Best Answer

Tlines = strsplit( evalc(T), '\n');
monofont = get(0,'FixedWidthFontName');
h = uicontrol('Style', 'edit', 'String', Tlines, 'Enable', 'disable', 'Font', monofont, 'Position', ......);
Related Question