Message Boards Message Boards

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

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

Hi friend How could plot Hours in the Y-Axe and the Dates in X-Axe for the sunrises (or similar functions)

Something as it follows:

DateListPlot[ Table[{{2015, 12, i}, DateValue[Sunrise[{2015, 12, i}], {"Hour", "Minute"}] /. {a, b} -> a + b/60}, {i, 5, 60}] ]

Guillermo

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