Highlight certain regions where the value goes to 0 in Stacked Plot

조회 수: 1 (최근 30일)
Bhargav
Bhargav 2024년 7월 9일
편집: Walter Roberson 2024년 7월 10일
Hi, can we highlight certain regions in stackplot where the value of a certain variable goes to zero.
I currently have
p1=stackedplot(final_log(:,["TC2","Ftot"]));
I want to highlight cerain areah where Ftot goes to Zero
Thank you.
  댓글 수: 4
Umar
Umar 2024년 7월 10일
편집: Walter Roberson 2024년 7월 10일
Hi Bhargav,
One alternative approach to creating a stacked plot without using the 'hold' function is to utilize the 'bar' function in MATLAB. An example,
data = [10 20 30; 15 25 35; 5 10 15];
% Sample data for three groups
bar(data, 'stacked');
By using the 'bar' function with the 'stacked' parameter set to 'on', you can generate a stacked bar plot easily. This method allows you to display multiple sets of data stacked on top of each other, similar to a stacked plot. Please let me know if you have further questions.
Bhargav
Bhargav 2024년 7월 10일
What I did was created another variable in the table, and where 0 or NAN occured I made it 1 and the rest all NAN so that I know what values went to NAN or 0 . Thank you

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

답변 (0개)

카테고리

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

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by