scatter plotting of string data

3 次查看(过去 30 天)
i have two cell in work sapce
name 57*1 cell
fatality_rate 57*1 cell
here names include string data
i want scatter plotting
and also the data shown with different colours
scatter(name,fatality_rate)
but it gives error
Error using scatter (line 56)
Input arguments must be numeric,
datetime, duration or categorical.
Error in untitled (line 17)
scatter(name,fatlity_rate)
  2 个评论
KALYAN ACHARJYA
KALYAN ACHARJYA 2021-6-1
Ex
name={'A','B','C','D'};
rate=[30,40,50,90];
name=categorical(name);
scatter(name,rate);
Muhammad
Muhammad 2021-6-1
good its working
i also wanted to plots with colours

请先登录,再进行评论。

采纳的回答

Jakob B. Nielsen
Jakob B. Nielsen 2021-6-1

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Scatter Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by