Save with Image Map
버전 1.0.0.1 (2.26 KB) 작성자:
Matthew Simoneau
Saves a figure out as a PNG-file and creates a corresponding HTML-file with an image map.
MAKEMAP Creates a clickable imagemap.
MAKEMAP(FIG,FILENAME) creates two files FILENAME.html and FILENAME.png which are clickable imagemaps of the figure FIG. FIG defaults to gcf and FILENAME defaults to "map".
Empty text objects mark the hotspots on the imagemap. Set their 'tag' to be 'click' and their UserData to a structure with two fields, "url" and "description". These fields specify the target of the click and the "alt" text of the link respectively. Newer browsers render the "alt" text as a tooltip.
Example:
% Create some random data.
x = rand(10,1);
y = rand(10,1);
plot(x,y,'.');
% Create the text labels to use as markers for where to put the hot zones.
for i = 1:length(x)
ud.description = sprintf('point #%.0f%s%2.2f,%2.2f',i,char(10),x(i),y(i));
text(x(i),y(i),'','tag','click','UserData',ud)
end
% Create the file.
makemap(gcf,'map');
% Open the page.
web(['file:///' which('map.html')],'-browser')
인용 양식
Matthew Simoneau (2024). Save with Image Map (https://www.mathworks.com/matlabcentral/fileexchange/3893-save-with-image-map), MATLAB Central File Exchange. 검색 날짜: .
MATLAB 릴리스 호환 정보
개발 환경:
R13
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux카테고리
- MATLAB > Graphics > Printing and Saving >
- MATLAB > Graphics > Graphics Objects > Specifying Target for Graphics Output >
Help Center 및 MATLAB Answers에서 Printing and Saving에 대해 자세히 알아보기
태그
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!