chevron_left
Axes Cookbook
0
0
0
new
Drawing plots in logarithmic scale in Matplotlib
Programming
chevron_rightPython
chevron_rightMatplotlib
chevron_rightCookbooks
chevron_rightAxes Cookbook
schedule Mar 10, 2022
Last updated Python●Matplotlib
Tags tocTable of Contents
expand_more To draw plots in logarithmic scale in Matplotlib, use the following semilogy(~)
method:
x = np.linspace(0, 100, 1000)y = np.exp(x)plt.semilogy(x, y)plt.show()
The output is as follows:

Published by Isshin Inada
Edited by 0 others
Did you find this page useful?
Ask a question or leave a feedback...