필터 지우기
필터 지우기

How to plot lines on image ?

조회 수: 7 (최근 30일)
voxey
voxey 2019년 12월 26일
댓글: voxey 2020년 1월 3일
How to plot lines on image ?

채택된 답변

Selva Karna
Selva Karna 2019년 12월 26일
grid on;
ax = gca
ax.XColor = 'r';
ax.YColor = 'r';
ax.GridAlpha = 0.9;
% ax.GridColor = [0.1, 0.7, 0.2];
ax.GridColor = [0.9, 0, 0];
yticks(0:0.25:4)
xticks(0:0.125:8)
ax.GridColor = [0.9, 0, 0];
set(gcf, 'PaperUnits', 'inches');
set(gcf, 'PaperPosition', [0 0 10 10]);
saveas(gcf,'sk.png')
  댓글 수: 1
voxey
voxey 2019년 12월 26일
Thanks lot.......................

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

추가 답변 (1개)

Image Analyst
Image Analyst 2019년 12월 26일
The other answer will put a periodic grid over the image. If you want arbitrary lines from (x1,y1) to (x2, y2), you can use plot() or line().
hold on; % Make sure plot() does not blow away the image.
line(x, y, 'Color', 'r'); % OR....
plot(x, y, 'r-');
Yet another option is to place a line plot (like your question's tag) over the image. For that, see the attached m-file.
00_Screenshot.png
From your question, it is not clear what kind of lines you want.
  댓글 수: 1
voxey
voxey 2020년 1월 3일
Thanks .... but its not expected results.......

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

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by