Message Boards Message Boards

0
|
7477 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

How plot {hours, Dates} in Suntset, Sunrise, and other Astromical function

There is an option for Graphics such as DateListPlot called Ticks. Ticks allows you to specify what the tick marks of the graph should say. For example, if I want the ticks to be the months of the year, I might write something like:

monthTicks = 
  Transpose[{Table[
     QuantityMagnitude[
      DateObject[{2014, i, 1}] - DateObject[{2014, 1, 1}]], {i, 1, 
      12}], {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", 
     "Sep", "Oct", "Nov", "Dec"}}];

DateListPlot[ ... , Ticks -> {monthticks, Automatic}]
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract