scatter plotting of string data

조회 수: 3 (최근 30일)
Muhammad
Muhammad 2021년 6월 1일
댓글: Muhammad 2021년 6월 1일
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