plt text matplotlib white background

Solutions on MaxInterview for plt text matplotlib white background by the best coders in the world

showing results for - "plt text matplotlib white background"
Isabel
05 Nov 2019
1import numpy as np
2import matplotlib.pyplot as plt
3plt.figure()
4ax = plt.subplot(111)
5plt.plot(np.linspace(1,0,1000))
6t = plt.text(0.03,.95,'text',transform=ax.transAxes,backgroundcolor='0.75',alpha=.5)
7plt.show()