MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / semilogy

Method semilogy

lib/matplotlib/axes/_axes.py:1904–1947  ·  view source on GitHub ↗

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-

(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

1902 # @_preprocess_data() # let 'plot' do the unpacking..
1903 @_docstring.interpd
1904 def semilogy(self, *args, **kwargs):
1905 """
1906 Make a plot with log scaling on the y-axis.
1907
1908 Call signatures::
1909
1910 semilogy([x], y, [fmt], data=None, **kwargs)
1911 semilogy([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs)
1912
1913 This is just a thin wrapper around `.plot` which additionally changes
1914 the y-axis to log scaling. All the concepts and parameters of plot can
1915 be used here as well.
1916
1917 The additional parameters *base*, *subs*, and *nonpositive* control the
1918 y-axis properties. They are just forwarded to `.Axes.set_yscale`.
1919
1920 Parameters
1921 ----------
1922 base : float, default: 10
1923 Base of the y logarithm.
1924
1925 subs : array-like, optional
1926 The location of the minor yticks. If *None*, reasonable locations
1927 are automatically chosen depending on the number of decades in the
1928 plot. See `.Axes.set_yscale` for details.
1929
1930 nonpositive : {'mask', 'clip'}, default: 'clip'
1931 Non-positive values in y can be masked as invalid, or clipped to a
1932 very small positive number.
1933
1934 **kwargs
1935 All parameters supported by `.plot`.
1936
1937 Returns
1938 -------
1939 list of `.Line2D`
1940 Objects representing the plotted data.
1941 """
1942 d = {k: v for k, v in kwargs.items()
1943 if k in ['base', 'subs', 'nonpositive',
1944 'basey', 'subsy', 'nonposy']}
1945 self.set_yscale('log', **d)
1946 return self.plot(
1947 *args, **{k: v for k, v in kwargs.items() if k not in d})
1948
1949 @_preprocess_data(replace_names=["x"], label_namer="x")
1950 def acorr(self, x, **kwargs):

Callers 8

semilogyFunction · 0.80
test_semilogyMethod · 0.80
test_stairsFunction · 0.80
axes_scales.pyFile · 0.80
autoscale.pyFile · 0.80
skewt.pyFile · 0.80
log_demo.pyFile · 0.80

Calls 2

plotMethod · 0.95
set_yscaleMethod · 0.45

Tested by 3

test_semilogyMethod · 0.64
test_stairsFunction · 0.64