필터 지우기
필터 지우기

How to grid ride of constant values of data in plotting?

조회 수: 1 (최근 30일)
Nisar Ahmed
Nisar Ahmed 2022년 11월 18일
답변: Rohit 2023년 2월 21일
Hi,
I have attached my data and plotting a figure by using following code:
T= ones(size(Vp_time,1),1)*time';
X_dir=squeeze(X(:,1,1))*ones(1,size(Vp_time,2));
figure;clf;surf(X_dir,T,Vp_time);view([0,90]);shading interp;grid on;set(gca,'YDir','reverse');colorbar
set(gca,'FontName','Times New Roman', 'fontsize', 20,'FontWeight','bold', 'linewidth', 3)
%ylim([1050 1800])
%xlim([5.55e5 5.675e5])
ylabel('Time (s)');
xlabel('X (m)');
colormap(jet)
when I run my code figure (below) appears: I want remove light below color data (above, below and from left side). How can I adjust a code such that it does not conside the constant values (of blue color):
I want to plot figure ike this:
  댓글 수: 2
KSSV
KSSV 2022년 11월 18일
You have not attched your data. Attach your data.
Nisar Ahmed
Nisar Ahmed 2022년 11월 18일
@KSSV sorry, it is attached now.

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

답변 (1개)

Rohit
Rohit 2023년 2월 21일
You can modify z-axis data so that constant values are reassigned to nan, thus surface plot function does not plot these values.
You can add this line before plotting the figure-
Vp_time(Vp_time==2450)=nan;
This will result in following figure-

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by