I realize that this question has been asked before(Python Pyplot Bar Plot bars disappear when using log scale), but the answer given did not work for me. I set my pyplot.bar(x_values, y_values, etc, log = True) but got an error that says:
"TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'"
I have been searching in vain for an actual example of pyplot code that uses a bar plot with the y-axis set to log but haven't found it. What am I doing wrong?
here is the code:
import matplotlib.pyplot as pyplot
ax = fig.add_subplot(111)
fig = pyplot.figure()
x_axis = [0, 1, 2, 3, 4, 5]
y_axis = [334, 350, 385, 40000.0, 167000.0, 1590000.0]
ax.bar(x_axis, y_axis, log = 1)
pyplot.show()
I get an error even when I removre pyplot.show. Thanks in advance for the help