I’m trying to change font size in global x-axis label and y-axis label in multiple subplot, and that is proving impossible.
I know that pyplot is treating global x-label and y-label as annotations, and when I try to enlarge font it works if there is no latex in text of x_title and y_title in fig. make_subplots(). If there is latex, text stays very small. For scientific plots, this is critical failure, can someone tell me if there is workaround or something I missed?
This is code:
zmax=np.max([np.max(median_1),np.max(median_1_all),np.max(median_1_group),np.max(median_1_cluster)])
contours=dict(start=0, end=zmax)
figc=make_subplots(rows=2, cols=2, subplot_titles=('plot1','plot2','plot3','plot4r'), x_title=r'$\rm{12+\log{Z_g}}$', y_title=r'$\rm{Merger \ rate \ [Gyr^{-1}]}$')
figc.add_trace(go.Contour(z=z1, contours=contours, coloraxis='coloraxis'), row=1, col=1)
figc.add_trace(go.Contour(z=z2, contours=contours, coloraxis='coloraxis'), row=1, col=2)
figc.add_trace(go.Contour(z=z3, contours=contours, coloraxis='coloraxis'), row=2, col=1)
figc.add_trace(go.Contour(z=z4, contours=contours, coloraxis='coloraxis'), row=2, col=2)
figc.update_layout(height=1000, width=1200, coloraxis=dict(colorscale='Viridis'), showlegend=False, title_text='Title', font=dict(size=24))
for i in figc['layout']['annotations']:
i['font'] = dict(size=25) #this is the place where I change font size, but doesn't work for latex
figc.show()