# Display Month for x axis

**URL:** <https://talk.observablehq.com/t/display-month-for-x-axis/5327>\
**Category:** Help\
**Created:** [July 13, 2021, 3:32pm UTC](https://talk.observablehq.com/t/display-month-for-x-axis/5327 "2021-07-13T15:32:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stanleyseow](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/stanleyseow/32/5260_2.png) [@stanleyseow](https://talk.observablehq.com/u/stanleyseow)\
**Post date:** [July 13, 2021, 3:32pm UTC](https://talk.observablehq.com/t/display-month-for-x-axis/5327/1 "2021-07-13T15:32:22Z")

</div>

I have this simple Plot with some SP500 data

> **[Testing Plot with SP500](https://observablehq.com/@stanleyseow/testing-plot-with-sp500)**
>
> Format date accordingly, MMM day YYYY Get first and last array for date Format X axis labels

How do I put the months only on the x-axis like examples from Plot : Scale

```auto
Plot.plot( {x: {type: "time", domain: [startDate, endDate]}, grid: true})

```

From the above notebook, all the dates are all too close to each other…

I figure out I need a domain for the startDate ( array 1st entry ) and endDate ( array last entry )  
but how to I mapped the sp500.date to the x-axis in a nice month format ??

Thanks

---

<div class="post-metadata">

**Author:** ![enjalot](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/enjalot/32/5248_2.png) [@enjalot](https://talk.observablehq.com/u/enjalot)\
**Post date:** [July 13, 2021, 4:16pm UTC](https://talk.observablehq.com/t/display-month-for-x-axis/5327/2 "2021-07-13T16:16:12Z")

</div>

Plot expects javascript date objects, if you use your parser function to process your data the plot works as expected:

> **[Comparing ‘Testing Plot with SP500’ by Stanley Seow to ‘Testing Plot with...](https://observablehq.com/compare/da99a1735997c296@106...41ac8fda376a57ee@112)**
>
> A comparison of two Observable notebooks.
