How to thicken a line separately for the parallelplot of matlab?

3 ビュー (過去 30 日間)
RYXChen
RYXChen 2023 年 6 月 7 日
コメント済み: Simon Chan 2023 年 6 月 9 日
For the parallel coordinate diagram of matlab, this diagram contains many lines. I want to change the width of only one line to make it wider. How can I write the code?
Thanks you!
For example, I want to change the width of the line marked by the red arrow. How should I write the code? I've been thinking for a long time, but the problem has not been solved!
load patients
tbl = table(Diastolic,Smoker,Systolic);
p = parallelplot(tbl)

採用された回答

Simon Chan
Simon Chan 2023 年 6 月 7 日
Separate the data into two groups as follows:
Age = randi(50,[100,1]); % Random data
Height = randi(180,[100,1]); % Random data
Weight = randi(100,[100,1]); % Random data
X = [Age Height Weight];
bins = {'normal','thick'}; % Two groups of data
Nselect = 27; % For example, you want data #27 to be a thick line
gp = repelem({'normal'},1,size(X,1));
gp{Nselect} = 'thick'; % Set #27 to be thick
p = parallelplot(X);
p.GroupData = gp; % Set the groupdata
p.LineWidth = [0.5 3]; % Set the line width
p.LegendVisible = 'off'; % Disable the legend if you don't want it to appear
  2 件のコメント
RYXChen
RYXChen 2023 年 6 月 8 日
Thank you very much. This problem has been solved. May I ask another question? Can parallelplot modify the length of tick marks? I want to shorten the tick marks.
Simon Chan
Simon Chan 2023 年 6 月 9 日
Checked the documentation and it seems that there is no property related to the tick mark that can be adjusted. May be some other people in the Community knows any workaround about that.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Object Properties についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by