# How to control axis test angle?

**URL:** <https://discourse.scverse.org/t/how-to-control-axis-test-angle/740>\
**Category:** scanpy\
**Created:** [September 14, 2022, 10:12am UTC](https://discourse.scverse.org/t/how-to-control-axis-test-angle/740 "2022-09-14T10:12:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shoma](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@Shoma](https://discourse.scverse.org/u/Shoma)\
**Post date:** [September 14, 2022, 10:12am UTC](https://discourse.scverse.org/t/how-to-control-axis-test-angle/740/1 "2022-09-14T10:12:41Z")

</div>

I have recently started using scanpy as well as python and my query may be very basic one, but how can I control text on a plot made by correlation\_matrix?  
I want to rotate text on the top of the figure.  
 ![Figure_1](https://canada1.discourse-cdn.com/flex035/uploads/forum11/original/1X/6063860075e416813771db34571ab7ba1c2b5d8b.png)

---

<div class="post-metadata">

**Author:** ![polklin](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@polklin](https://discourse.scverse.org/u/polklin)\
**Post date:** [March 11, 2023, 8:32am UTC](https://discourse.scverse.org/t/how-to-control-axis-test-angle/740/2 "2023-03-11T08:32:33Z")

</div>

Hello @Shoma,

You have to create a matplotlib axes object, and provide it to `sc.pl.correlation_matrix` thanks to the argument `ax`.  
Then you can interact with this Axes as usual, to for example change the rotation of your x\_ticks labels as follow:

```python
import matplotlib.pyplot as plt

fig, ax = plt.subplots(figsize=(10,10))
sc.pl.correlation_matrix(adata, 'label', ax=ax, show=False)
ax.tick_params(axis="x", labelrotation=0)

```

The important thing here is to specify `show=False`, otherwise axes dict won’t be returned by `sc.pl.correlation_matrix` as detailed here: [scanpy.pl.matrixplot — Scanpy 1.9.3 documentation](https://scanpy.readthedocs.io/en/stable/generated/scanpy.pl.matrixplot.html)

Best,  
Paul
