How to plot with repeating values in the abscissa vector?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
George
el 13 de Jul. de 2015
Comentada: George
el 13 de Jul. de 2015
I took a bunch of readings over the course of three days and used the "now" function to timestamp each reading. Plotting that isn't good to look at, because the x values are all 7.36e+05.
I was thinking I'd change that to hours. I wanted to have the following x vector:
x = repmat(0:23,[1 numDays])
How do I make a scatter plot of my data and have that as my abscissa, without Matlab just plotting multiple points at each hour?
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 13 de Jul. de 2015
x=1:48
y=sin(0.1*x)
h=scatter(x,y)
set(gca,'xtick',x,'xticklabel',arrayfun(@num2str,0:23,'un',0))
Más respuestas (0)
Ver también
Categorías
Más información sobre 2-D and 3-D 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!