Hi @austinv11 welcome to the forums.
Unfortunately there is no builtin function for this, you would have to use annotations. An example:
import plotly.express as px
import numpy as np
fig = px.imshow(
np.random.randint(0, 255, size=(10, 10)),
color_continuous_scale='viridis',
)
fig.update_layout(
width=600,
height=600,
coloraxis_colorbar={"title": 'Real title'}
)
# add your rotated title via annotations
fig.update_layout(
margin=dict(r=150),
# ^^ making a bit of space for the annotation
annotations=[
dict(
text="Your title",
font_size=20,
font_family='arial',
font_color='red',
textangle=90,
showarrow=False,
# ^^ appearance
xref="paper",
yref="paper",
x=1.35,
y=0.5,
# ^^ position
)
]
)
creates: