You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Applications are open for the 2018 John Hunter Matplotlib Summer Fellowship. Apply now!
Version 2.2.2.post1772+gd9240e24b
Fork me on GitHub


Axes.loglog(*args, **kwargs)[source]

Make a plot with log scaling on both the x and y axis.

Call signatures:

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

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

The additional parameters basex/y, subsx/y and nonposx/y control the x/y-axis properties. They are just forwarded to Axes.set_xscale and Axes.set_yscale.

basex, basey : scalar, optional, default 10

Base of the x/y logarithm.

subsx, subsy : sequence, optional

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

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

Non-positive values in x or 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.