python - matplotlib x axis on top interference with the title -
in following post (number 23) : moving x-axis top of plot in matplotlib, answer move x-axis on top given. not title.
i have plot x-axis on top , title, x label interfers title. how can separate xlabel title ?
thank
you can use y kwarg ax.set_title. experiment value of y suit needs.
import matplotlib.pyplot plt fig, (ax1,ax2) = plt.subplots(1,2) ax1.xaxis.tick_top() ax2.xaxis.tick_top() ax1.set_title('title1') ax2.set_title('title2',y=1.05) fig.savefig('title.png') 
Comments
Post a Comment