_axes.pyi 26 KB

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