plot with string value in x axis
Mostrar comentarios más antiguos
I have a data
date temperate
----
'2020-01' 10
'2020-02' 10
'2020-03' 20
I tried
plot(date, temperature)
and got "invalid data argument"
Please advise.
4 comentarios
Stephen23
el 3 de Jul. de 2020
Convert the string array to datetime, and then it will work like you expect.
madhan ravi
el 3 de Jul. de 2020
Editada: madhan ravi
el 3 de Jul. de 2020
alpedhuez: What are you talking about ?
Replying to your comment in https://in.mathworks.com/matlabcentral/answers/559019-plot-with-string-value-in-x-axis#comment_923855
Did you see your previous thread https://in.mathworks.com/matlabcentral/answers/558439-month-as-a-two-digit-number#comment_923876 ?
Respuestas (0)
Categorías
Más información sobre Dates and Time en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!