フィルターのクリア

How to scatter plot differnet curves on a same figure

2 ビュー (過去 30 日間)
Srilatha Raghavan
Srilatha Raghavan 2020 年 7 月 29 日
コメント済み: Srilatha Raghavan 2020 年 7 月 29 日
Hello,
Say I have two tables with five columns in each of them. Let's name them T1Col1, T2Col2, ..... in table 1. And T2Col1, T2Col2,....in table 2. I want to analyze the curves between T1Col1 vs T2Col1, T1Col2 vs T2Col2, T1Col3 vs T2Col3 and so on. And I want to do them in a single plot. I want the X-axis to have the range of T1Col1 to T1Col5 and I want to plot the corresponding T2Col1 to T2Col5. I want something exactly similar to this piece of code.
plot(T1Col1, T2Col1,'g',T1Col2, T2Col2,'b',T1Col3, T2Col3,'r'). I can plot it but cannot scatter plot it.
Its not the hold on and hold off code. Its not the plot(1,1,1) concept either. My problem is easily solved if I plot them. But I am NOT able to scatter plot them.
A similar matlab documentation is here: https://www.mathworks.com/help/matlab/creating_plots/combine-multiple-plots.html - (The first example) But again, the axis here is clearly 'X' fixed.

採用された回答

Walter Roberson
Walter Roberson 2020 年 7 月 29 日
plot(T1Col1, T2Col1, '*g', T1Col2, T2Col2,'+b', T1Col3, T2Col3, 'rs')
When you specify a marker without specifying a line style, then plot only uses the marker.
This would not be good enough for the case that you want your scatter plots to have a different size or different color for each point.
  1 件のコメント
Srilatha Raghavan
Srilatha Raghavan 2020 年 7 月 29 日
Hello! This works thank you! I never thought of this.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by