I have a bar graph that is log scaled that I am trying to change the y ticks from 10^1, 10^2, etc., to whole numbers. I have tried setting the tick values manually, and tried setting the values from the data, and also setting the format to scalar. One thing I notice in all of the questions I am looking at is that my construction of the graph doesn't include subplot.
def confirmed_cases():
x = df['Date']
y = df['Confirmed']
plt.figure(figsize=(20, 10))
plt.bar(x, y)
plt.yscale('log')
# plt.yticks([0, 100000, 250000, 500000, 750000, 1000000, 1250000])
# plt.get_yaxis().set_major_formatter(matplotlib.ticker.ScalarFormatter())
plt.title('US Corona Cases By Date')
plt.xlabel('Date')
plt.ylabel('Confirmed Cases')
plt.xticks(rotation=90)


.gca()call - tryplt.gca().yscale('log')gca? I get this'AxesSubplot' object has no attribute 'yscale'which suggests I should change the structure of the function, correct?.set_yscale('log)that is specific to axes, and I don't think you need to call gca for that matplotlib.org/3.1.1/api/_as_gen/… What happens if you tryplt.set_yscale('log')module 'matplotlib.pyplot' has no attribute 'set_yscale'