Can I have the improfile intensity graph added to subplot
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I have an image I use improfile to give a plot of the intensity across an image using mouse clicks, is there a way to add that improfile generated plot to a subplot?
tiff_image = imread('liney.png');
hIm_orig2 = tiff_image(:,:,1:3);
hFig=figure('units','normalized','outerposition',[0 0 1 1]);
set(0,'CurrentFigure',hFig)
subplot(4,7,[1 2 3 4 8 9 10 11 15 16 17 18])
imshow(hIm_orig2)
title('reference image','FontSize',15,'Color',[0,0,.9])
improfile
Best regards, Steve
댓글 수: 0
답변 (1개)
Ameer Hamza
2018년 5월 16일
A simple way is to copy the axes object to the required figure.
hIm_orig2 = tiff_image(:,:,1:3);
hFig=figure('units','normalized','outerposition',[0 0 1 1]);
set(0,'CurrentFigure',hFig)
subplot(4,7,[1 2 3 4 8 9 10 11 15 16 17 18])
imshow(hIm_orig2)
title('reference image','FontSize',15,'Color',[0,0,.9])
improfile
axProfile = gca;
axProfileNew = copyobj(axProfile, hFig);
This will create an axis which will be overlapping the original axis. To remove overlapping and specify a position use axProfileNew.Position property.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!