Scatterplot with ID Markers

5 ビュー (過去 30 日間)
Saunok Chakrabarty
Saunok Chakrabarty 2021 年 7 月 9 日
コメント済み: Saunok Chakrabarty 2021 年 7 月 12 日
I am trying to plot a scatterplot between two sets of data, X and Y. X and Y are column vectors, and each (X,Y) pair correspond to a specific country (an example given below). In the scatter, I need the data points to indicate which country they belong to, and also show the trendline and R-sq. Additionally, is there a way for me to display only some of the country points and not all?
X Y
India 224.4 52.2
China 143547.6 53784.9
Thanks for your attention!
Regards,
Saunok

採用された回答

Sam
Sam 2021 年 7 月 9 日
You can use datatips for doing this. Read more about datatips here.
You can also have a look at DataTipTemplate and DataTipRows. Here's a great post i found that can be adopted for an application similar to yours, plotting only some points. Read more here
  1 件のコメント
Saunok Chakrabarty
Saunok Chakrabarty 2021 年 7 月 12 日
Thank you so much! It worked!

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by