4
I would like a help to configure the Y-axis scale. When trying to plot a bar graph with low and high values, the smaller ones end up not appearing in the scale. I tried some options, but it does not look like it would like. Below are the graphics, plotted, and an illustration of how I would like:
And the code:
import matplotlib.pyplot as plt
x = ["T1","T2","T3","T4","T5","T6","T7","T8","T9"]
y = [4,6,4,7,40,60,80,700,800]
#plt.scatter(x, y)
plt.bar(x, y, color='red')
plt.title('Tratamentos Herbicidas')
plt.xlabel('Tratamentos')
plt.ylabel('Num')
#plt.autoscale(axis="y")
#plt.yscale('log',basey=2)
#plt.yticks(range(0,max(y),50))
#plt.grid()
plt.show()
From now on, thanks for any help!!
you don’t think a double axle wouldn’t be enough to solve your problem?
– Lucas
Good morning Lucas, thanks for the reply. But I didn’t quite understand how it would look on the chart.
– Wesley Humberto