scatter plotting of string data

2 vues (au cours des 30 derniers jours)
Muhammad
Muhammad le 1 Juin 2021
Commenté : Muhammad le 1 Juin 2021
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 commentaires
KALYAN ACHARJYA
KALYAN ACHARJYA le 1 Juin 2021
Ex
name={'A','B','C','D'};
rate=[30,40,50,90];
name=categorical(name);
scatter(name,rate);
Muhammad
Muhammad le 1 Juin 2021
good its working
i also wanted to plots with colours

Connectez-vous pour commenter.

Réponse acceptée

Jakob B. Nielsen
Jakob B. Nielsen le 1 Juin 2021

Plus de réponses (0)

Catégories

En savoir plus sur Scatter Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by