Labels in Stackedplot generated from Arrays

조회 수: 1 (최근 30일)
Max Yaffe
Max Yaffe 2023년 4월 28일
댓글: Max Yaffe 2023년 5월 2일
I'm using stackedplot to plot a complex transfer function with Phz & Mag on the Y axis and Freq on the X. Is there any way to relabel the axes when I plot directly from the Arrays: freq' [abs(H), angle(H)]', where H(freq) is complex?
  댓글 수: 2
Walter Roberson
Walter Roberson 2023년 4월 28일
Maybe array2table() and set the table Properties.VariableNames and use the table version of stackedPlot() as it will use names taken from the table variable names?
Max Yaffe
Max Yaffe 2023년 4월 29일
I was hoping to avoid that but I'll do it if I need to.

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

채택된 답변

dpb
dpb 2023년 4월 29일
You mean something like
hS=stackedplot([1:100]',randn(100,2));
hS.DisplayLabels={'Mag','Phase'};
hS.XLabel='Frequency';

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by