I use matplotlib to create a figure with 4 sub-plots in it.
I would like to split one of my title of a subplot, such that each line would be in the centered with res
I get the correct alignment when I format the string this way:
import matplotlib.pylab as plt fig = plt.figure()#num=0,figsize=(8.27, 11.69), dpi=300) ax = fig.add_subplot(2, 2, 1) ax.set_title('Normalized occupied \n Neighbors') plt.show()