Saving Table to a png File

32 views (last 30 days)
Phillip Moran
Phillip Moran on 30 Nov 2015
Answered: Image Analyst on 30 Nov 2015
How would you go about saving a table to a .png file format (or any other image format, for that matter)?
Thank you!

Accepted Answer

Walter Roberson
Walter Roberson on 30 Nov 2015
I would store the data in a uitable and capture the image of that, or I would represent it using HTML and render that and capture the image of the result. In some cases I would use TeX or LaTeX to generate the layout.
Remember, data tables are abstract binary entities, whereas for PNG or other image formats you need to have decided upon font, and spacing, and number of digits, and shading, and rules (vertical and horizontal lines), and headers, and justification of columns, and colors, and whether you want to do subscripting and superscripting, and maybe even hypthenation strategies (if a field contains a string that need to be wrapped into multiple lines.) It gets so complicated that the rules for CSS (Cascading Style Sheets) need 6 international standards to cover all of the possibilities, but only one international standard for HTML itself.

More Answers (1)

Image Analyst
Image Analyst on 30 Nov 2015
One way is to display the table in a GUI and then use export_fig() to save it.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!