Add hidden metadata to a figure
조회 수: 20 (최근 30일)
이전 댓글 표시
Hi everyone! :)
Is there a way to add some hidden metadata to a figure? I am sure you all know plotting sth with different parameter-settings and I dont want to have all of this information in my plot title or name of the file. So I was wondering if it is possible to add metadata to the figure where extracts of the code that generated the figure are stored, as for instance the section with the parameters..
Thanks a lot!
Ann
댓글 수: 3
Walter Roberson
2020년 10월 14일
uicontextmenu can often be used to pop up information on interactive graphics objects.
채택된 답변
Walter Roberson
2020년 10월 14일
If you are referring to MATLAB .fig files, then Yes, there is. There are multiple ways to do it; the least obscure way is to store information in the graphic object UserData field.
If you are referring to image files such as JPEG files, then the answer varies:
- for GIF, imwrite() supports the 'Comment' option.
- HDF4 files do support comment objects, but imwrite() does not provide any access to those fields. You might possibly be able to do something using the facilities listed at https://www.mathworks.com/help/matlab/low-level-functions-1.html
- for JPEG and JPEG 2000 files, imwrite() supports the 'Comment' option.
- for PBM, PGM, PPM files, imwrite() does not provide any way to create comments. All three formats are plain text files, and I seem to recall that you can add comments to the text files (using normal techniques to edit text files.)
- for PNG files, imwrite() supports the 'Comment' option.
- if I recall correctly, Sun RAS files do not support any additional metadata.
- For TIFF files, imwrite() supports the 'Description' option.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!