You are reading an old version of the documentation (v3.0.2). For the latest version see
Version 3.0.2
Fork me on GitHub


matplotlib.pyplot.semilogy(*args, **kwargs)[source]

Make a plot with log scaling on the y axis.

Call signatures:

semilogy([x], y, [fmt], data=None, **kwargs)
semilogy([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)

This is just a thin wrapper around plot which additionally changes the y-axis to log scaling. All of the concepts and parameters of plot can be used here as well.

The additional parameters basey, subsy and nonposy control the y-axis properties. They are just forwarded to Axes.set_yscale.

basey : scalar, optional, default 10

Base of the y logarithm.

subsy : array_like, optional

The location of the minor yticks. If None, reasonable locations are automatically chosen depending on the number of decades in the plot. See Axes.set_yscale for details.

nonposy : {'mask', 'clip'}, optional, default 'mask'

Non-positive values in y can be masked as invalid, or clipped to a very small positive number.


A list of Line2D objects representing the plotted data.

Other Parameters:

All parameters supported by plot.