Saving Table to a png File
32 views (last 30 days)
Show older comments
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!
0 Comments
Accepted Answer
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.
0 Comments
More Answers (1)
Image Analyst
on 30 Nov 2015
One way is to display the table in a GUI and then use export_fig() to save it.
0 Comments
See Also
Categories
Find more on Import, Export, and Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!