Labels in Stackedplot generated from Arrays

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 个评论

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?
I was hoping to avoid that but I'll do it if I need to.

请先登录,再进行评论。

 采纳的回答

You mean something like
hS=stackedplot([1:100]',randn(100,2));
hS.DisplayLabels={'Mag','Phase'};
hS.XLabel='Frequency';

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Axis Labels 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by