Custom scientific axis unit for a bar plot with log scale x-axis
问题 Let's consider the following example to plot some y values for given x values. import matplotlib.pyplot as pyplot if __name__ == "__main__": x = [1000000000, 2000000000, 4000000000, 8000000000] y = [0.342, 0.543, 0.874, 1.324] pyplot.bar(x, y) pyplot.savefig("test1.png", format="png") pyplot.close() pyplot.bar([str(int(x_value / 1000000000)) for x_value in x], y) pyplot.savefig("test2.png", format="png") pyplot.close() My goal is to have equally-spaced x-ticks for all x values (i.e., not