Question: I am kind of stuck with this, I searched on google for an answer but I can not find it.

I would like to turn my `xticks` 45 degrees of my subplot. I know how to do it for a normal plot:

```
plt.xticks(rotation = 45)

```

But when I put this in my plot script nothing happens. I would really like to know how I can apply this to all my subplots at the same time.

This is my code:

```
plt.figure()

fig, axs = plt.subplots(1, 3, sharey=True, tight_layout=True)
axs[0].set_title("Classic")
axs[1].set_title("Theta")
axs[2].set_title("Vector")

axs[0].plot(df.time,df.classic, label = 'Classic', color = 'blue')
axs[1].plot(df.time,df.theta, label = 'Theta', color = 'green')
axs[2].plot(df.time,df.vector, label = 'Vector', color = 'red')

plt.xticks(rotation = 45)
plt.suptitle('Core computations',fontsize=20)
plt.legend()
plt.show()

```

Answer: 
Below code will convert it into appropriate format

```
df = pd.DataFrame({'datetime':['2013-11-1_00:00','2013-11-1_00:10','2013-11-1_00:20']})
df['datetime_changed'] = pd.to_datetime(df['datetime'].str.replace('_','T'))
df.head()

```

output:

[![enter image description here](https://i.stack.imgur.com/MlUi2.png)](https://i.stack.imgur.com/MlUi2.png)
You can use `pd.to_datetime` with `format`

```py
df['datetime'] = pd.to_datetime(df['datetime'], format='%Y-%m-%d_%H:%M')

```