[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trying to Plot grid lines every 7 days

From: Tim Pierce
Subject: Trying to Plot grid lines every 7 days
Date: Tue, 8 Aug 2017 23:03:25 +0100

# see my original graph (a sin-wave over 30 days)

plot( 1:30, sin((1:30) .* (2 * pi / 30) ) )
grid on
set (gca, 'xtick', 1:7:30 )

# So far  puts grid line every 7 days - good!

# Now this screws it and the xticks jump back to every 5 days 
datetick ( 'ddd dd')

# So I re-add this - now the whole axis jumps to the right so the days are incorrect (not it only goes up to 20th day)
set (gca, 'xtick', 1:7:30 )

I want every day to be monday, or sunday, or whatever

reply via email to

[Prev in Thread] Current Thread [Next in Thread]