_axes.pyi 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  1. from matplotlib.axes._base import _AxesBase
  2. from matplotlib.axes._secondary_axes import SecondaryAxis
  3. from matplotlib.artist import Artist
  4. from matplotlib.backend_bases import RendererBase
  5. from matplotlib.collections import (
  6. Collection,
  7. LineCollection,
  8. BrokenBarHCollection,
  9. PathCollection,
  10. PolyCollection,
  11. EventCollection,
  12. QuadMesh,
  13. )
  14. from matplotlib.colors import Colormap, Normalize
  15. from matplotlib.container import BarContainer, ErrorbarContainer, StemContainer
  16. from matplotlib.contour import ContourSet, QuadContourSet
  17. from matplotlib.image import AxesImage, PcolorImage
  18. from matplotlib.legend import Legend
  19. from matplotlib.legend_handler import HandlerBase
  20. from matplotlib.lines import Line2D
  21. from matplotlib.mlab import GaussianKDE
  22. from matplotlib.patches import Rectangle, FancyArrow, Polygon, StepPatch, Wedge
  23. from matplotlib.quiver import Quiver, QuiverKey, Barbs
  24. from matplotlib.text import Annotation, Text
  25. from matplotlib.transforms import Transform, Bbox
  26. import matplotlib.tri as mtri
  27. import matplotlib.table as mtable
  28. import matplotlib.stackplot as mstack
  29. import matplotlib.streamplot as mstream
  30. import datetime
  31. import PIL.Image
  32. from collections.abc import Callable, Sequence
  33. from typing import Any, Literal, overload
  34. import numpy as np
  35. from numpy.typing import ArrayLike
  36. from matplotlib.typing import ColorType, MarkerType, LineStyleType
  37. class Axes(_AxesBase):
  38. def get_title(self, loc: Literal["left", "center", "right"] = ...) -> str: ...
  39. def set_title(
  40. self,
  41. label: str,
  42. fontdict: dict[str, Any] | None = ...,
  43. loc: Literal["left", "center", "right"] | None = ...,
  44. pad: float | None = ...,
  45. *,
  46. y: float | None = ...,
  47. **kwargs
  48. ) -> Text: ...
  49. def get_legend_handles_labels(
  50. self, legend_handler_map: dict[type, HandlerBase] | None = ...
  51. ) -> tuple[list[Artist], list[Any]]: ...
  52. legend_: Legend | None
  53. @overload
  54. def legend(self) -> Legend: ...
  55. @overload
  56. def legend(self, handles: Sequence[Artist | tuple[Artist, ...]], labels: Sequence[str], **kwargs) -> Legend: ...
  57. @overload
  58. def legend(self, *, handles: Sequence[Artist | tuple[Artist, ...]], **kwargs) -> Legend: ...
  59. @overload
  60. def legend(self, labels: Sequence[str], **kwargs) -> Legend: ...
  61. @overload
  62. def legend(self, **kwargs) -> Legend: ...
  63. def inset_axes(
  64. self,
  65. bounds: tuple[float, float, float, float],
  66. *,
  67. transform: Transform | None = ...,
  68. zorder: float = ...,
  69. **kwargs
  70. ) -> Axes: ...
  71. def indicate_inset(
  72. self,
  73. bounds: tuple[float, float, float, float],
  74. inset_ax: Axes | None = ...,
  75. *,
  76. transform: Transform | None = ...,
  77. facecolor: ColorType = ...,
  78. edgecolor: ColorType = ...,
  79. alpha: float = ...,
  80. zorder: float = ...,
  81. **kwargs
  82. ) -> Rectangle: ...
  83. def indicate_inset_zoom(self, inset_ax: Axes, **kwargs) -> Rectangle: ...
  84. def secondary_xaxis(
  85. self,
  86. location: Literal["top", "bottom"] | float,
  87. *,
  88. functions: tuple[
  89. Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]
  90. ]
  91. | Transform
  92. | None = ...,
  93. **kwargs
  94. ) -> SecondaryAxis: ...
  95. def secondary_yaxis(
  96. self,
  97. location: Literal["left", "right"] | float,
  98. *,
  99. functions: tuple[
  100. Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]
  101. ]
  102. | Transform
  103. | None = ...,
  104. **kwargs
  105. ) -> SecondaryAxis: ...
  106. def text(
  107. self,
  108. x: float,
  109. y: float,
  110. s: str,
  111. fontdict: dict[str, Any] | None = ...,
  112. **kwargs
  113. ) -> Text: ...
  114. def annotate(
  115. self,
  116. text: str,
  117. xy: tuple[float, float],
  118. xytext: tuple[float, float] | None = ...,
  119. xycoords: str
  120. | Artist
  121. | Transform
  122. | Callable[[RendererBase], Bbox | Transform]
  123. | tuple[float, float] = ...,
  124. textcoords: str
  125. | Artist
  126. | Transform
  127. | Callable[[RendererBase], Bbox | Transform]
  128. | tuple[float, float]
  129. | None = ...,
  130. arrowprops: dict[str, Any] | None = ...,
  131. annotation_clip: bool | None = ...,
  132. **kwargs
  133. ) -> Annotation: ...
  134. def axhline(
  135. self, y: float = ..., xmin: float = ..., xmax: float = ..., **kwargs
  136. ) -> Line2D: ...
  137. def axvline(
  138. self, x: float = ..., ymin: float = ..., ymax: float = ..., **kwargs
  139. ) -> Line2D: ...
  140. # TODO: Could separate the xy2 and slope signatures
  141. def axline(
  142. self,
  143. xy1: tuple[float, float],
  144. xy2: tuple[float, float] | None = ...,
  145. *,
  146. slope: float | None = ...,
  147. **kwargs
  148. ) -> Line2D: ...
  149. def axhspan(
  150. self, ymin: float, ymax: float, xmin: float = ..., xmax: float = ..., **kwargs
  151. ) -> Polygon: ...
  152. def axvspan(
  153. self, xmin: float, xmax: float, ymin: float = ..., ymax: float = ..., **kwargs
  154. ) -> Polygon: ...
  155. def hlines(
  156. self,
  157. y: float | ArrayLike,
  158. xmin: float | ArrayLike,
  159. xmax: float | ArrayLike,
  160. colors: ColorType | Sequence[ColorType] | None = ...,
  161. linestyles: LineStyleType = ...,
  162. label: str = ...,
  163. *,
  164. data=...,
  165. **kwargs
  166. ) -> LineCollection: ...
  167. def vlines(
  168. self,
  169. x: float | ArrayLike,
  170. ymin: float | ArrayLike,
  171. ymax: float | ArrayLike,
  172. colors: ColorType | Sequence[ColorType] | None = ...,
  173. linestyles: LineStyleType = ...,
  174. label: str = ...,
  175. *,
  176. data=...,
  177. **kwargs
  178. ) -> LineCollection: ...
  179. def eventplot(
  180. self,
  181. positions: ArrayLike | Sequence[ArrayLike],
  182. orientation: Literal["horizontal", "vertical"] = ...,
  183. lineoffsets: float | Sequence[float] = ...,
  184. linelengths: float | Sequence[float] = ...,
  185. linewidths: float | Sequence[float] | None = ...,
  186. colors: ColorType | Sequence[ColorType] | None = ...,
  187. alpha: float | Sequence[float] | None = ...,
  188. linestyles: LineStyleType | Sequence[LineStyleType] = ...,
  189. *,
  190. data=...,
  191. **kwargs
  192. ) -> EventCollection: ...
  193. def plot(
  194. self,
  195. *args: float | ArrayLike | str,
  196. scalex: bool = ...,
  197. scaley: bool = ...,
  198. data = ...,
  199. **kwargs
  200. ) -> list[Line2D]: ...
  201. def plot_date(
  202. self,
  203. x: ArrayLike,
  204. y: ArrayLike,
  205. fmt: str = ...,
  206. tz: str | datetime.tzinfo | None = ...,
  207. xdate: bool = ...,
  208. ydate: bool = ...,
  209. *,
  210. data=...,
  211. **kwargs
  212. ) -> list[Line2D]: ...
  213. def loglog(self, *args, **kwargs) -> list[Line2D]: ...
  214. def semilogx(self, *args, **kwargs) -> list[Line2D]: ...
  215. def semilogy(self, *args, **kwargs) -> list[Line2D]: ...
  216. def acorr(
  217. self, x: ArrayLike, *, data=..., **kwargs
  218. ) -> tuple[np.ndarray, np.ndarray, LineCollection | Line2D, Line2D | None]: ...
  219. def xcorr(
  220. self,
  221. x: ArrayLike,
  222. y: ArrayLike,
  223. normed: bool = ...,
  224. detrend: Callable[[ArrayLike], ArrayLike] = ...,
  225. usevlines: bool = ...,
  226. maxlags: int = ...,
  227. *,
  228. data = ...,
  229. **kwargs
  230. ) -> tuple[np.ndarray, np.ndarray, LineCollection | Line2D, Line2D | None]: ...
  231. def step(
  232. self,
  233. x: ArrayLike,
  234. y: ArrayLike,
  235. *args,
  236. where: Literal["pre", "post", "mid"] = ...,
  237. data = ...,
  238. **kwargs
  239. ) -> list[Line2D]: ...
  240. def bar(
  241. self,
  242. x: float | ArrayLike,
  243. height: float | ArrayLike,
  244. width: float | ArrayLike = ...,
  245. bottom: float | ArrayLike | None = ...,
  246. *,
  247. align: Literal["center", "edge"] = ...,
  248. data = ...,
  249. **kwargs
  250. ) -> BarContainer: ...
  251. def barh(
  252. self,
  253. y: float | ArrayLike,
  254. width: float | ArrayLike,
  255. height: float | ArrayLike = ...,
  256. left: float | ArrayLike | None = ...,
  257. *,
  258. align: Literal["center", "edge"] = ...,
  259. data = ...,
  260. **kwargs
  261. ) -> BarContainer: ...
  262. def bar_label(
  263. self,
  264. container: BarContainer,
  265. labels: ArrayLike | None = ...,
  266. *,
  267. fmt: str | Callable[[float], str] = ...,
  268. label_type: Literal["center", "edge"] = ...,
  269. padding: float = ...,
  270. **kwargs
  271. ) -> list[Annotation]: ...
  272. def broken_barh(
  273. self,
  274. xranges: Sequence[tuple[float, float]],
  275. yrange: tuple[float, float],
  276. *,
  277. data=...,
  278. **kwargs
  279. ) -> BrokenBarHCollection: ...
  280. def stem(
  281. self,
  282. *args: ArrayLike | str,
  283. linefmt: str | None = ...,
  284. markerfmt: str | None = ...,
  285. basefmt: str | None = ...,
  286. bottom: float = ...,
  287. label: str | None = ...,
  288. orientation: Literal["vertical", "horizontal"] = ...,
  289. data=...,
  290. ) -> StemContainer: ...
  291. # TODO: data kwarg preprocessor?
  292. def pie(
  293. self,
  294. x: ArrayLike,
  295. explode: ArrayLike | None = ...,
  296. labels: Sequence[str] | None = ...,
  297. colors: ColorType | Sequence[ColorType] | None = ...,
  298. autopct: str | Callable[[float], str] | None = ...,
  299. pctdistance: float = ...,
  300. shadow: bool = ...,
  301. labeldistance: float | None = ...,
  302. startangle: float = ...,
  303. radius: float = ...,
  304. counterclock: bool = ...,
  305. wedgeprops: dict[str, Any] | None = ...,
  306. textprops: dict[str, Any] | None = ...,
  307. center: tuple[float, float] = ...,
  308. frame: bool = ...,
  309. rotatelabels: bool = ...,
  310. *,
  311. normalize: bool = ...,
  312. hatch: str | Sequence[str] | None = ...,
  313. data=...,
  314. ) -> tuple[list[Wedge], list[Text]] | tuple[
  315. list[Wedge], list[Text], list[Text]
  316. ]: ...
  317. def errorbar(
  318. self,
  319. x: float | ArrayLike,
  320. y: float | ArrayLike,
  321. yerr: float | ArrayLike | None = ...,
  322. xerr: float | ArrayLike | None = ...,
  323. fmt: str = ...,
  324. ecolor: ColorType | None = ...,
  325. elinewidth: float | None = ...,
  326. capsize: float | None = ...,
  327. barsabove: bool = ...,
  328. lolims: bool | ArrayLike = ...,
  329. uplims: bool | ArrayLike = ...,
  330. xlolims: bool | ArrayLike = ...,
  331. xuplims: bool | ArrayLike = ...,
  332. errorevery: int | tuple[int, int] = ...,
  333. capthick: float | None = ...,
  334. *,
  335. data=...,
  336. **kwargs
  337. ) -> ErrorbarContainer: ...
  338. def boxplot(
  339. self,
  340. x: ArrayLike | Sequence[ArrayLike],
  341. notch: bool | None = ...,
  342. sym: str | None = ...,
  343. vert: bool | None = ...,
  344. whis: float | tuple[float, float] | None = ...,
  345. positions: ArrayLike | None = ...,
  346. widths: float | ArrayLike | None = ...,
  347. patch_artist: bool | None = ...,
  348. bootstrap: int | None = ...,
  349. usermedians: ArrayLike | None = ...,
  350. conf_intervals: ArrayLike | None = ...,
  351. meanline: bool | None = ...,
  352. showmeans: bool | None = ...,
  353. showcaps: bool | None = ...,
  354. showbox: bool | None = ...,
  355. showfliers: bool | None = ...,
  356. boxprops: dict[str, Any] | None = ...,
  357. labels: Sequence[str] | None = ...,
  358. flierprops: dict[str, Any] | None = ...,
  359. medianprops: dict[str, Any] | None = ...,
  360. meanprops: dict[str, Any] | None = ...,
  361. capprops: dict[str, Any] | None = ...,
  362. whiskerprops: dict[str, Any] | None = ...,
  363. manage_ticks: bool = ...,
  364. autorange: bool = ...,
  365. zorder: float | None = ...,
  366. capwidths: float | ArrayLike | None = ...,
  367. *,
  368. data=...,
  369. ) -> dict[str, Any]: ...
  370. def bxp(
  371. self,
  372. bxpstats: Sequence[dict[str, Any]],
  373. positions: ArrayLike | None = ...,
  374. widths: float | ArrayLike | None = ...,
  375. vert: bool = ...,
  376. patch_artist: bool = ...,
  377. shownotches: bool = ...,
  378. showmeans: bool = ...,
  379. showcaps: bool = ...,
  380. showbox: bool = ...,
  381. showfliers: bool = ...,
  382. boxprops: dict[str, Any] | None = ...,
  383. whiskerprops: dict[str, Any] | None = ...,
  384. flierprops: dict[str, Any] | None = ...,
  385. medianprops: dict[str, Any] | None = ...,
  386. capprops: dict[str, Any] | None = ...,
  387. meanprops: dict[str, Any] | None = ...,
  388. meanline: bool = ...,
  389. manage_ticks: bool = ...,
  390. zorder: float | None = ...,
  391. capwidths: float | ArrayLike | None = ...,
  392. ) -> dict[str, Any]: ...
  393. def scatter(
  394. self,
  395. x: float | ArrayLike,
  396. y: float | ArrayLike,
  397. s: float | ArrayLike | None = ...,
  398. c: ArrayLike | Sequence[ColorType] | ColorType | None = ...,
  399. marker: MarkerType | None = ...,
  400. cmap: str | Colormap | None = ...,
  401. norm: str | Normalize | None = ...,
  402. vmin: float | None = ...,
  403. vmax: float | None = ...,
  404. alpha: float | None = ...,
  405. linewidths: float | Sequence[float] | None = ...,
  406. *,
  407. edgecolors: Literal["face", "none"] | ColorType | Sequence[ColorType] | None = ...,
  408. plotnonfinite: bool = ...,
  409. data=...,
  410. **kwargs
  411. ) -> PathCollection: ...
  412. def hexbin(
  413. self,
  414. x: ArrayLike,
  415. y: ArrayLike,
  416. C: ArrayLike | None = ...,
  417. gridsize: int | tuple[int, int] = ...,
  418. bins: Literal["log"] | int | Sequence[float] | None = ...,
  419. xscale: Literal["linear", "log"] = ...,
  420. yscale: Literal["linear", "log"] = ...,
  421. extent: tuple[float, float, float, float] | None = ...,
  422. cmap: str | Colormap | None = ...,
  423. norm: str | Normalize | None = ...,
  424. vmin: float | None = ...,
  425. vmax: float | None = ...,
  426. alpha: float | None = ...,
  427. linewidths: float | None = ...,
  428. edgecolors: Literal["face", "none"] | ColorType = ...,
  429. reduce_C_function: Callable[[np.ndarray | list[float]], float] = ...,
  430. mincnt: int | None = ...,
  431. marginals: bool = ...,
  432. *,
  433. data=...,
  434. **kwargs
  435. ) -> PolyCollection: ...
  436. def arrow(
  437. self, x: float, y: float, dx: float, dy: float, **kwargs
  438. ) -> FancyArrow: ...
  439. def quiverkey(
  440. self, Q: Quiver, X: float, Y: float, U: float, label: str, **kwargs
  441. ) -> QuiverKey: ...
  442. def quiver(self, *args, data=..., **kwargs) -> Quiver: ...
  443. def barbs(self, *args, data=..., **kwargs) -> Barbs: ...
  444. def fill(self, *args, data=..., **kwargs) -> list[Polygon]: ...
  445. def fill_between(
  446. self,
  447. x: ArrayLike,
  448. y1: ArrayLike | float,
  449. y2: ArrayLike | float = ...,
  450. where: Sequence[bool] | None = ...,
  451. interpolate: bool = ...,
  452. step: Literal["pre", "post", "mid"] | None = ...,
  453. *,
  454. data=...,
  455. **kwargs
  456. ) -> PolyCollection: ...
  457. def fill_betweenx(
  458. self,
  459. y: ArrayLike,
  460. x1: ArrayLike | float,
  461. x2: ArrayLike | float = ...,
  462. where: Sequence[bool] | None = ...,
  463. step: Literal["pre", "post", "mid"] | None = ...,
  464. interpolate: bool = ...,
  465. *,
  466. data=...,
  467. **kwargs
  468. ) -> PolyCollection: ...
  469. def imshow(
  470. self,
  471. X: ArrayLike | PIL.Image.Image,
  472. cmap: str | Colormap | None = ...,
  473. norm: str | Normalize | None = ...,
  474. *,
  475. aspect: Literal["equal", "auto"] | float | None = ...,
  476. interpolation: str | None = ...,
  477. alpha: float | ArrayLike | None = ...,
  478. vmin: float | None = ...,
  479. vmax: float | None = ...,
  480. origin: Literal["upper", "lower"] | None = ...,
  481. extent: tuple[float, float, float, float] | None = ...,
  482. interpolation_stage: Literal["data", "rgba"] | None = ...,
  483. filternorm: bool = ...,
  484. filterrad: float = ...,
  485. resample: bool | None = ...,
  486. url: str | None = ...,
  487. data=...,
  488. **kwargs
  489. ) -> AxesImage: ...
  490. def pcolor(
  491. self,
  492. *args: ArrayLike,
  493. shading: Literal["flat", "nearest", "auto"] | None = ...,
  494. alpha: float | None = ...,
  495. norm: str | Normalize | None = ...,
  496. cmap: str | Colormap | None = ...,
  497. vmin: float | None = ...,
  498. vmax: float | None = ...,
  499. data=...,
  500. **kwargs
  501. ) -> Collection: ...
  502. def pcolormesh(
  503. self,
  504. *args: ArrayLike,
  505. alpha: float | None = ...,
  506. norm: str | Normalize | None = ...,
  507. cmap: str | Colormap | None = ...,
  508. vmin: float | None = ...,
  509. vmax: float | None = ...,
  510. shading: Literal["flat", "nearest", "gouraud", "auto"] | None = ...,
  511. antialiased: bool = ...,
  512. data=...,
  513. **kwargs
  514. ) -> QuadMesh: ...
  515. def pcolorfast(
  516. self,
  517. *args: ArrayLike | tuple[float, float],
  518. alpha: float | None = ...,
  519. norm: str | Normalize | None = ...,
  520. cmap: str | Colormap | None = ...,
  521. vmin: float | None = ...,
  522. vmax: float | None = ...,
  523. data=...,
  524. **kwargs
  525. ) -> AxesImage | PcolorImage | QuadMesh: ...
  526. def contour(self, *args, data=..., **kwargs) -> QuadContourSet: ...
  527. def contourf(self, *args, data=..., **kwargs) -> QuadContourSet: ...
  528. def clabel(
  529. self, CS: ContourSet, levels: ArrayLike | None = ..., **kwargs
  530. ) -> list[Text]: ...
  531. def hist(
  532. self,
  533. x: ArrayLike | Sequence[ArrayLike],
  534. bins: int | Sequence[float] | str | None = ...,
  535. range: tuple[float, float] | None = ...,
  536. density: bool = ...,
  537. weights: ArrayLike | None = ...,
  538. cumulative: bool | float = ...,
  539. bottom: ArrayLike | float | None = ...,
  540. histtype: Literal["bar", "barstacked", "step", "stepfilled"] = ...,
  541. align: Literal["left", "mid", "right"] = ...,
  542. orientation: Literal["vertical", "horizontal"] = ...,
  543. rwidth: float | None = ...,
  544. log: bool = ...,
  545. color: ColorType | Sequence[ColorType] | None = ...,
  546. label: str | Sequence[str] | None = ...,
  547. stacked: bool = ...,
  548. *,
  549. data=...,
  550. **kwargs
  551. ) -> tuple[
  552. np.ndarray | list[np.ndarray],
  553. np.ndarray,
  554. BarContainer | Polygon | list[BarContainer | Polygon],
  555. ]: ...
  556. def stairs(
  557. self,
  558. values: ArrayLike,
  559. edges: ArrayLike | None = ...,
  560. *,
  561. orientation: Literal["vertical", "horizontal"] = ...,
  562. baseline: float | ArrayLike | None = ...,
  563. fill: bool = ...,
  564. data=...,
  565. **kwargs
  566. ) -> StepPatch: ...
  567. def hist2d(
  568. self,
  569. x: ArrayLike,
  570. y: ArrayLike,
  571. bins: None
  572. | int
  573. | tuple[int, int]
  574. | ArrayLike
  575. | tuple[ArrayLike, ArrayLike] = ...,
  576. range: ArrayLike | None = ...,
  577. density: bool = ...,
  578. weights: ArrayLike | None = ...,
  579. cmin: float | None = ...,
  580. cmax: float | None = ...,
  581. *,
  582. data=...,
  583. **kwargs
  584. ) -> tuple[np.ndarray, np.ndarray, np.ndarray, QuadMesh]: ...
  585. def ecdf(
  586. self,
  587. x: ArrayLike,
  588. weights: ArrayLike | None = ...,
  589. *,
  590. complementary: bool=...,
  591. orientation: Literal["vertical", "horizonatal"]=...,
  592. compress: bool=...,
  593. data=...,
  594. **kwargs
  595. ) -> Line2D: ...
  596. def psd(
  597. self,
  598. x: ArrayLike,
  599. NFFT: int | None = ...,
  600. Fs: float | None = ...,
  601. Fc: int | None = ...,
  602. detrend: Literal["none", "mean", "linear"]
  603. | Callable[[ArrayLike], ArrayLike]
  604. | None = ...,
  605. window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ...,
  606. noverlap: int | None = ...,
  607. pad_to: int | None = ...,
  608. sides: Literal["default", "onesided", "twosided"] | None = ...,
  609. scale_by_freq: bool | None = ...,
  610. return_line: bool | None = ...,
  611. *,
  612. data=...,
  613. **kwargs
  614. ) -> tuple[np.ndarray, np.ndarray] | tuple[np.ndarray, np.ndarray, Line2D]: ...
  615. def csd(
  616. self,
  617. x: ArrayLike,
  618. y: ArrayLike,
  619. NFFT: int | None = ...,
  620. Fs: float | None = ...,
  621. Fc: int | None = ...,
  622. detrend: Literal["none", "mean", "linear"]
  623. | Callable[[ArrayLike], ArrayLike]
  624. | None = ...,
  625. window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ...,
  626. noverlap: int | None = ...,
  627. pad_to: int | None = ...,
  628. sides: Literal["default", "onesided", "twosided"] | None = ...,
  629. scale_by_freq: bool | None = ...,
  630. return_line: bool | None = ...,
  631. *,
  632. data=...,
  633. **kwargs
  634. ) -> tuple[np.ndarray, np.ndarray] | tuple[np.ndarray, np.ndarray, Line2D]: ...
  635. def magnitude_spectrum(
  636. self,
  637. x: ArrayLike,
  638. Fs: float | None = ...,
  639. Fc: int | None = ...,
  640. window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ...,
  641. pad_to: int | None = ...,
  642. sides: Literal["default", "onesided", "twosided"] | None = ...,
  643. scale: Literal["default", "linear", "dB"] | None = ...,
  644. *,
  645. data=...,
  646. **kwargs
  647. ) -> tuple[np.ndarray, np.ndarray, Line2D]: ...
  648. def angle_spectrum(
  649. self,
  650. x: ArrayLike,
  651. Fs: float | None = ...,
  652. Fc: int | None = ...,
  653. window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ...,
  654. pad_to: int | None = ...,
  655. sides: Literal["default", "onesided", "twosided"] | None = ...,
  656. *,
  657. data=...,
  658. **kwargs
  659. ) -> tuple[np.ndarray, np.ndarray, Line2D]: ...
  660. def phase_spectrum(
  661. self,
  662. x: ArrayLike,
  663. Fs: float | None = ...,
  664. Fc: int | None = ...,
  665. window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ...,
  666. pad_to: int | None = ...,
  667. sides: Literal["default", "onesided", "twosided"] | None = ...,
  668. *,
  669. data=...,
  670. **kwargs
  671. ) -> tuple[np.ndarray, np.ndarray, Line2D]: ...
  672. def cohere(
  673. self,
  674. x: ArrayLike,
  675. y: ArrayLike,
  676. NFFT: int = ...,
  677. Fs: float = ...,
  678. Fc: int = ...,
  679. detrend: Literal["none", "mean", "linear"]
  680. | Callable[[ArrayLike], ArrayLike] = ...,
  681. window: Callable[[ArrayLike], ArrayLike] | ArrayLike = ...,
  682. noverlap: int = ...,
  683. pad_to: int | None = ...,
  684. sides: Literal["default", "onesided", "twosided"] = ...,
  685. scale_by_freq: bool | None = ...,
  686. *,
  687. data=...,
  688. **kwargs
  689. ) -> tuple[np.ndarray, np.ndarray]: ...
  690. def specgram(
  691. self,
  692. x: ArrayLike,
  693. NFFT: int | None = ...,
  694. Fs: float | None = ...,
  695. Fc: int | None = ...,
  696. detrend: Literal["none", "mean", "linear"]
  697. | Callable[[ArrayLike], ArrayLike]
  698. | None = ...,
  699. window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ...,
  700. noverlap: int | None = ...,
  701. cmap: str | Colormap | None = ...,
  702. xextent: tuple[float, float] | None = ...,
  703. pad_to: int | None = ...,
  704. sides: Literal["default", "onesided", "twosided"] | None = ...,
  705. scale_by_freq: bool | None = ...,
  706. mode: Literal["default", "psd", "magnitude", "angle", "phase"] | None = ...,
  707. scale: Literal["default", "linear", "dB"] | None = ...,
  708. vmin: float | None = ...,
  709. vmax: float | None = ...,
  710. *,
  711. data=...,
  712. **kwargs
  713. ) -> tuple[np.ndarray, np.ndarray, np.ndarray, AxesImage]: ...
  714. def spy(
  715. self,
  716. Z: ArrayLike,
  717. precision: float | Literal["present"] = ...,
  718. marker: str | None = ...,
  719. markersize: float | None = ...,
  720. aspect: Literal["equal", "auto"] | float | None = ...,
  721. origin: Literal["upper", "lower"] = ...,
  722. **kwargs
  723. ) -> AxesImage: ...
  724. def matshow(self, Z: ArrayLike, **kwargs) -> AxesImage: ...
  725. def violinplot(
  726. self,
  727. dataset: ArrayLike | Sequence[ArrayLike],
  728. positions: ArrayLike | None = ...,
  729. vert: bool = ...,
  730. widths: float | ArrayLike = ...,
  731. showmeans: bool = ...,
  732. showextrema: bool = ...,
  733. showmedians: bool = ...,
  734. quantiles: Sequence[float | Sequence[float]] | None = ...,
  735. points: int = ...,
  736. bw_method: Literal["scott", "silverman"]
  737. | float
  738. | Callable[[GaussianKDE], float]
  739. | None = ...,
  740. *,
  741. data=...,
  742. ) -> dict[str, Collection]: ...
  743. def violin(
  744. self,
  745. vpstats: Sequence[dict[str, Any]],
  746. positions: ArrayLike | None = ...,
  747. vert: bool = ...,
  748. widths: float | ArrayLike = ...,
  749. showmeans: bool = ...,
  750. showextrema: bool = ...,
  751. showmedians: bool = ...,
  752. ) -> dict[str, Collection]: ...
  753. table = mtable.table
  754. stackplot = mstack.stackplot
  755. streamplot = mstream.streamplot
  756. tricontour = mtri.tricontour
  757. tricontourf = mtri.tricontourf
  758. tripcolor = mtri.tripcolor
  759. triplot = mtri.triplot