Box Plot for Time (HH:MM:SS) data
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ganesh Naik
el 17 de Abr. de 2021
Comentada: Ganesh Naik
el 20 de Abr. de 2021
Hi all, I am trying to get the boxplot for Time (HH:MM:SS) and day name data but unable to get the required plot. In detail, I would like to get the Boxplot in terms of days, (Monday to Sunday). I have attached the sample data and any help in this regard is highly appreciated.
3 comentarios
Cris LaPierre
el 18 de Abr. de 2021
Yes, with numeric data, you can calculate medians and standard deviations. It looks like your data is a character array, meaning it is text. See Jonas' suggestion below.
Respuesta aceptada
Jonas
el 18 de Abr. de 2021
i suggest to convert you time (Hour : Minute : Seconds) to seconds using
[~, ~, ~, H, MN, S]=datevec('14:35:22','HH:MM:SS');
MN=MN+60*H;
S=S+MN*60;
then doing you boxplot thing and then converting your boxplot y labels back to a timestring
4 comentarios
Jonas
el 19 de Abr. de 2021
or the other way around: if you have specific times you want to see, calculates them as seconds, set the values as yticks and then set the ylabels to the times you wanted
Más respuestas (0)
Ver también
Categorías
Más información sobre Data Distribution Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!