matplotlib / 3.4.3 / _as_gen / matplotlib.pyplot.loglog.html /

matplotlib.pyplot.loglog

matplotlib.pyplot. 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 base, subs and nonpositive control the x/y-axis properties. They are just forwarded to Axes.set_xscale and Axes.set_yscale. To use different properties on the x-axis and the y-axis, use e.g. ax.set_xscale("log", base=10); ax.set_yscale("log", base=2).

Parameters:
base float, default: 10

Base of the logarithm.

subs sequence, optional

The location of the minor 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.

nonpositive {'mask', 'clip'}, default: 'mask'

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

Returns:
list of Line2D

Objects representing the plotted data.

Other Parameters:
**kwargs

All parameters supported by plot.

Examples using matplotlib.pyplot.loglog

© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.4.3/api/_as_gen/matplotlib.pyplot.loglog.html