# Mid align axisX in a plot

**URL:** <https://talk.observablehq.com/t/mid-align-axisx-in-a-plot/7857>\
**Category:** Help\
**Created:** [April 15, 2023, 3:00am UTC](https://talk.observablehq.com/t/mid-align-axisx-in-a-plot/7857 "2023-04-15T03:00:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadale](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@kadale](https://talk.observablehq.com/u/kadale)\
**Post date:** [April 15, 2023, 3:00am UTC](https://talk.observablehq.com/t/mid-align-axisx-in-a-plot/7857/1 "2023-04-15T03:00:52Z")

</div>

I build a gantt timeline using plot in this notebook - [Vacation Gantt / hashg | Observable](https://observablehq.com/d/7bb419bdd84fd650)

I’m trying to add 2 plot.axisX to this plot

1. representing the month
2. Representing Date & Day of the week.

I’m able to get the Date & Week rendered.

But I’m having challenge representing the month above it. Similar to this representation.

 ![Screenshot 2023-04-14 at 21-38-05 Vacation Gantt w_ Holidays - no grouping _ hashg Observable](https://canada1.discourse-cdn.com/flex030/uploads/observablehq/original/2X/5/5378b701fd10a816126f0794c1409348596e031e.png)

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![mbostock](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mbostock/32/9_2.png) [@mbostock](https://talk.observablehq.com/u/mbostock)\
**Post date:** [April 16, 2023, 3:03pm UTC](https://talk.observablehq.com/t/mid-align-axisx-in-a-plot/7857/2 "2023-04-16T15:03:01Z")

</div>

It’s possible, but pretty tricky, to do exactly what you’re describing. You’ll need to do some date math using d3-time to compute the middle of the months, intersected with the domain of your data. I’ve compiled a few techniques that might be relevant for you here:

> **[Plot: A few custom time axes](https://observablehq.com/@observablehq/plot-a-few-custom-time-axes)**
>
> Here are a few ways to customize time axes in Plot. Axis tick labels can have multiple lines, so for example you can show the month on the first line, and then for January, also show the year. In the future, Plot will probably do this by default; see...

An easier place to start might be to just label the start of the months with a separate axis or a multi-line tick format.
