4
Any figure I try to save in Jupyter Notebook saves a blank file, what kind of error might be occurring as it does not accuse any error?
import numpy as np
import matplotlib.pyplot as plt
data1 = [10,5,2,4,6,8]
data2 = [ 1,2,4,8,7,4]
x = 10*np.array(range(len(data1)))
plt.plot( x, data1, 'go') # green bolinha
plt.plot( x, data1, 'k:', color='orange') # linha pontilha orange
plt.plot( x, data2, 'r^') # red triangulo
plt.plot( x, data2, 'k--', color='blue') # linha tracejada azul
plt.axis([-10, 60, 0, 11])
plt.title("Mais incrementado")
plt.grid(True)
plt.xlabel("eixo horizontal")
plt.ylabel("Eixo y")
plt.show()
plt.savefig('teste.png', format='png')
Now yes, thank you. Another question, has how to increase the area being saved? Why in another figure is the legend being cut when saved.
– Thiago Fernandes