How to plot an overlay curve on the figure attached here.

조회 수: 3 (최근 30일)
Nisar Ahmed
Nisar Ahmed 2021년 8월 27일
댓글: Nisar Ahmed 2021년 9월 1일
Hello,
The code for the attached/copied figure is
figure, p = pcolor(b,a,c); p.EdgeColor = 'none'; axis ij; ylim([500 2500]); colorbar; title('abc');
ylabel('Time (ms)'); colormap(jet); grid on
I want to plot a straight line or a curve between (showing relation) a vs. c at x axis where b = 6000. Suppose the curve a vs c has same dimension like the data plotted here as p = pcolor(b,a,c);. How can I plot here.

채택된 답변

Kevin Holly
Kevin Holly 2021년 8월 27일
Use
hold on
then plot the graph.
plot(x,y)
  댓글 수: 3
Kevin Holly
Kevin Holly 2021년 8월 31일
편집: Kevin Holly 2021년 8월 31일
@Nisar Ahmed I'm not entirely sure what you are asking.
Are you trying to plot this?
plot(a,c(6000,:))
This would plot the values along the vertical line shown below.
figure
p = pcolor(b,a,c);
p.EdgeColor = 'none';
axis ij; ylim([500 2500]);
colorbar;
title('abc');
ylabel('Time (ms)');
colormap(jet);
grid on
hold on
xline(6000)
Nisar Ahmed
Nisar Ahmed 2021년 9월 1일
@Kevin Holly Thanks,
I ploted first by using hold on and then by adding some distance on x axis. just like
hold on
plot(b+2393.598,a);

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by