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';
  1 件のコメント
Max Yaffe
Max Yaffe 2023 年 5 月 2 日
That should work. I'll try it.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by