Trying to plot weekends only on the X axis.

3 visualizaciones (últimos 30 días)
Erick Koenig
Erick Koenig el 28 de Nov. de 2020
Comentada: dpb el 28 de Nov. de 2020
Hello, I'm working with a data set that has three values per day on Friday and Saturday. I have 0:00, 8:00 and 16:00 for both days. I would like to plot 8 months worth of those two days. I can get it to work, but there are gaps from the end of Saturday to the beginning of the next Friday. Is there a way to still use the date and time, but eliminate the gaps that occur during the weekdays? Thank you
  4 comentarios
Star Strider
Star Strider el 28 de Nov. de 2020
I’m not certain if this is what you’re looking for, however the isweekend function may be worth considering.
dpb
dpb el 28 de Nov. de 2020
" convincing a college professor it can't be done. :) "
I didn't say it can't be done; only that you have to create the appearance by subterfuge. :)
Plot the data against the ordinal number and label the ticks by the week or however is wanted.
Alternatively, you could potentially use the tiledlayout and put each week in the next tile. Unfortunately, again TMW is too clever by far for their own good and doesn't have a default layout in which the axes actually abut.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Calendar en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by