import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
"""
Create matrix of ones
"""
a = np.ones((5,10))
# end
"""
Plot gaussian random noise with a label gaussian
Add a legend
Put the legend outside of the plot
Make sure everything fits in the plot
Save to legend.png
"""
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
"""
Create matrix of ones
"""
a = np.ones((5,10))
# end
"""
Plot gaussian random noise with a label gaussian
Add a legend
Put the legend outside of the plot
Make sure everything fits in the plot
Save to legend.png
"""
x = np.random.randn(100)
plt.plot(x, label="gaussian")
plt.legend(loc="upper left", bbox_to_anchor=(1,1))
plt.tight_layout()
plt.savefig("legend.png")
Go to Google Form