matplotlib logarithmic scale code example Example 1: matplotlib log plt.yscale('log') Example 2: matplotlib log scale matplotlib log scale