# How can I change the direction of the y-axis labels in my PyGMT map?

**URL:** <https://forum.generic-mapping-tools.org/t/how-can-i-change-the-direction-of-the-y-axis-labels-in-my-pygmt-map/3774>\
**Category:** PyGMT Q&A\
**Created:** [March 22, 2023, 2:44pm UTC](https://forum.generic-mapping-tools.org/t/how-can-i-change-the-direction-of-the-y-axis-labels-in-my-pygmt-map/3774 "2023-03-22T14:44:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arindan](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/arindan/32/2341_2.png) [@arindan](https://forum.generic-mapping-tools.org/u/arindan)\
**Post date:** [March 22, 2023, 2:44pm UTC](https://forum.generic-mapping-tools.org/t/how-can-i-change-the-direction-of-the-y-axis-labels-in-my-pygmt-map/3774/1 "2023-03-22T14:44:00Z")

</div>

Hi everyone,

I wanted to rotate the y-axis labels direction (i.e., 90 or -90 degrees) of my map which I created using PyGMT. A breif snippet of the code is shown below:

```
fig = pygmt.Figure()
pygmt.makecpt(cmap='gray', 
              series='300/7000/1', 
              continuous=True, transparency=50)

with pygmt.config(MAP_FRAME_TYPE = 'plain'):
    fig.grdimage(region = risreg, projection = risproj, frame=["a", "xf100000", "yf100000", "xaf+lEasting [m]", "yaf+lNorthing [m]"], 
                 grid = grid, shading=True, transparency=30, nan_transparent=True)

# RGI glacier outlines
fig.plot(data=rgi, pen="0.01p,mediumblue,-", color="mediumblue", transparency=50)

```

**This code produces a map, below for your reference:**

 ![image](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/1/17092d37126e7a7e3711e130786e71d5eec6f5b6.jpeg)

**Now, I am not able to change the directions of the y-axis labels (Northings), which I want to orient vertically to save the space and make the map a bit bigger.**

Any help or suggestions would be highly appreciated.

Thank you.

---

<div class="post-metadata">

**Author:** ![fabian-kutschera](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/fabian-kutschera/32/2697_2.png) [@fabian-kutschera](https://forum.generic-mapping-tools.org/u/fabian-kutschera)\
**Post date:** [March 22, 2023, 3:41pm UTC](https://forum.generic-mapping-tools.org/t/how-can-i-change-the-direction-of-the-y-axis-labels-in-my-pygmt-map/3774/2 "2023-03-22T15:41:46Z")

</div>

Hi,

have you tried `pygmt.config(MAP_ANNOT_OBLIQUE="lat_parallel")` based on [How rotate coordinates labels in Pygmt](https://flint.soest.hawaii.edu/t/how-rotate-coordinates-labels-in-pygmt/3278)?

For your Cartesian frame you might need to use `MAP_ANNOT_ORTHO`.

---

<div class="post-metadata">

**Author:** ![arindan](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/arindan/32/2341_2.png) [@arindan](https://forum.generic-mapping-tools.org/u/arindan)\
**Post date:** [March 23, 2023, 9:26am UTC](https://forum.generic-mapping-tools.org/t/how-can-i-change-the-direction-of-the-y-axis-labels-in-my-pygmt-map/3774/3 "2023-03-23T09:26:07Z")

</div>

Dear Fabian,

Thanks for the reply and suggestion. It worked nicely.
