Make a plot with log scaling on the x-axis. Call signatures:: semilogx([x], y, [fmt], data=None, **kwargs) semilogx([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs) This is just a thin wrapper around `.plot` which additionally changes the x-
(self, *args, **kwargs)
| 1855 | # @_preprocess_data() # let 'plot' do the unpacking.. |
| 1856 | @_docstring.interpd |
| 1857 | def semilogx(self, *args, **kwargs): |
| 1858 | """ |
| 1859 | Make a plot with log scaling on the x-axis. |
| 1860 | |
| 1861 | Call signatures:: |
| 1862 | |
| 1863 | semilogx([x], y, [fmt], data=None, **kwargs) |
| 1864 | semilogx([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs) |
| 1865 | |
| 1866 | This is just a thin wrapper around `.plot` which additionally changes |
| 1867 | the x-axis to log scaling. All the concepts and parameters of plot can |
| 1868 | be used here as well. |
| 1869 | |
| 1870 | The additional parameters *base*, *subs*, and *nonpositive* control the |
| 1871 | x-axis properties. They are just forwarded to `.Axes.set_xscale`. |
| 1872 | |
| 1873 | Parameters |
| 1874 | ---------- |
| 1875 | base : float, default: 10 |
| 1876 | Base of the x logarithm. |
| 1877 | |
| 1878 | subs : array-like, optional |
| 1879 | The location of the minor xticks. If *None*, reasonable locations |
| 1880 | are automatically chosen depending on the number of decades in the |
| 1881 | plot. See `.Axes.set_xscale` for details. |
| 1882 | |
| 1883 | nonpositive : {'mask', 'clip'}, default: 'clip' |
| 1884 | Non-positive values in x can be masked as invalid, or clipped to a |
| 1885 | very small positive number. |
| 1886 | |
| 1887 | **kwargs |
| 1888 | All parameters supported by `.plot`. |
| 1889 | |
| 1890 | Returns |
| 1891 | ------- |
| 1892 | list of `.Line2D` |
| 1893 | Objects representing the plotted data. |
| 1894 | """ |
| 1895 | d = {k: v for k, v in kwargs.items() |
| 1896 | if k in ['base', 'subs', 'nonpositive', |
| 1897 | 'basex', 'subsx', 'nonposx']} |
| 1898 | self.set_xscale('log', **d) |
| 1899 | return self.plot( |
| 1900 | *args, **{k: v for k, v in kwargs.items() if k not in d}) |
| 1901 | |
| 1902 | # @_preprocess_data() # let 'plot' do the unpacking.. |
| 1903 | @_docstring.interpd |