Add hidden metadata to a figure

조회 수: 20 (최근 30일)
Ann Gerber
Ann Gerber 2020년 10월 14일
댓글: Walter Roberson 2020년 10월 14일
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
Ann Gerber
Ann Gerber 2020년 10월 14일
It could be both. Some "metafile" attached to the .fig file with code snippets in it could solve it, but the info could also be stored in the figure it self in the form of a hidden text. I found the options about adding info to datapoints when hovering over the point. I searched for doint the same in the form of a hidden info in the title of the figure for instance but couldn't find anything. Thanks! :)
Walter Roberson
Walter Roberson 2020년 10월 14일
uicontextmenu can often be used to pop up information on interactive graphics objects.

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
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.
  댓글 수: 1
Ann Gerber
Ann Gerber 2020년 10월 14일
Wow, great!!! Thank you very much!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by