フィルターのクリア

Help with plotspread plot

10 ビュー (過去 30 日間)
Chi Pham
Chi Pham 2019 年 9 月 4 日
回答済み: Chris Angeloni 2021 年 5 月 5 日
Hi there, I have 3 groups of data A,B, and C and I want to plot A and B under the same category with different colors/markers. I want to use the plotspread function. How do I do that?
  5 件のコメント
Chi Pham
Chi Pham 2019 年 9 月 5 日
Yes. But I want to have 2 categories: one has distribution A and B, the other is distribution C. A and B will be plotted as one distribution with different markers. Could you provide an example?
Walter Roberson
Walter Roberson 2019 年 9 月 5 日
Ah, A and B are to be plotted overlapping each other? I don't think the code can handle that.

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

回答 (1 件)

Chris Angeloni
Chris Angeloni 2021 年 5 月 5 日
This is kind of a hack, as plotSpread.m doesn't like when the xValues for each category are not increasing, so I just defined the first two categories to be very close together, then adjust the xticks after:
a = randn(50,1); b = randn(50,1)+1; c = randn(50,1)+2;
plotSpread([a,b,c],'xValues',[1 1.0001 2],'distributionColors',{'r','g','b'})
set(gca,'xtick',[1 2])

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by