Initial configuration commit

master
Alex Selimov 7 months ago
commit 31c8abea59

@ -0,0 +1,7 @@
{
"suggest.autoTrigger": "none",
"suggest.timeout": 500,
"pyright.disableDocumentation":false,
"hover.target": "preview"
}

@ -0,0 +1,8 @@
set spell spelllang=en_us
map <C-b> : w % <Bar> ! md2pdf % <CR>
map <A-b> : w % <Bar> ! md2docx % <CR>
map <C-z> : !zathura %:r.pdf & <CR>
inoremap ;i ** <++><Esc>5hi
inoremap ;b **** <++><Esc>6hi
inoremap ;I ![](<++>)<Esc>6hi
inoremap ;c ```<CR>```<Esc>Oi

@ -0,0 +1 @@
map <C-b> : w % <Bar> ! make <CR>

@ -0,0 +1,13 @@
map <C-b> : w % <Bar> ! make <CR>
"Some code snippets for filling in
inoremap ;d do<Space><CR>end<Space>do<Esc>O<Tab><++><Esc>kA
inoremap ;i if<Space>()<Space>then<CR>end<Space>if<Esc>O<Tab><++><Esc>kF(a
inoremap ;s select<Space>case(<++>)<CR>case(<++>)<CR><Tab><++><CR><Esc>4hicase(<++>)<CR><Tab><++><CR><Esc>4hiend<Space>select<CR><Esc>5kFsi
inoremap ;ph print *, '------------------------------------------------------------'<CR>print *, ''<CR>print *, '------------------------------------------------------------'<Esc>kci'
inoremap ;pr read(, *, iostat=iospara) <++><CR>if(iospara>0) then<CR>print *, "Error: Invalid read of <++> with error code", iospara<CR>call mpi_abort(mpi_comm_world, 1, ierr)<CR>end if<ESC>4k0f(a
inoremap ;ptp print *, '[OK] - '<ESC>i
inoremap ;ptf print *, '[FAILED] - '<ESC>i
set colorcolumn=132

@ -0,0 +1,12 @@
if &ft=="markdown"
finish
endif
map <C-b> : w % <Bar> ! firefox % & <CR>
inoremap ;d <div class="" ><Return><++><Return></div><Esc>kkf"a
inoremap ;a <a href=""><++></a><Esc>2F"a
inoremap ;p <p><Return></p><Esc>O
inoremap ;b <strong></strong> <++><Esc>2F>a
inoremap ;li <li></li><Esc>F>a
inoremap ;ll <ul><Return></ul><Esc>O
inoremap ;i <img src="" alt="<++>" width="<++>" height=auto><Esc>5F"i
inoremap ;s <body><Enter><div class="container"><Enter></div><Enter></body><Esc>kO

@ -0,0 +1 @@
set textwidth=0

@ -0,0 +1,19 @@
set spell spellfile="~/.config/nvim/spell/wordlist"
let g:markdown_fenced_languages = ['html', 'python', 'bash=sh', 'fortran']
"set conceallevel=2
"let g:vim_markdown_math = 1
"let g:tex_conceal = "abdmg"
hi clear Conceal
map <C-b> : w % <Bar> AsyncRun md2pdf "%" <CR>
map <A-p> : w % <Bar> AsyncRun md2beamer "%" <CR>
map <A-b> : w % <Bar> AsyncRun md2docx % <CR>
map <C-z> : !zathura %:r.pdf & <CR>
inoremap ;i ** <++><Esc>5hi
inoremap ;b **** <++><Esc>6hi
inoremap ;l [](<++>)<Esc>6hi
inoremap ;I ![](<++>)<Esc>6hi
inoremap ;pc ```<CR>```<Esc>O
inoremap ;cu - [ ]
inoremap ;cc - [x]

@ -0,0 +1,2 @@
set colorcolumn=100
nmap ;x [hv]h]hk$;sc

@ -0,0 +1,7 @@
map <C-b> : w % <Bar> ! ./% <CR>
inoremap ;ph ####<CR>#Help<CR>####<CR>Help(){<CR>echo ""<CR>echo<CR>echo "Syntax: <++> [<++>] <++>"<CR>echo "options:"<CR>echo "<++>"<CR><BACKSPACE>}<ESC>5k0f"a
inoremap ;pf function fail {<CR>printf '%s\n' "$1" >&2<CR>exit "${2-1}"<CR>}
inoremap ;i if [ ]; then<CR><++><CR>fi<ESC>2k0f[a<Space>
inoremap ;pg args=()<CR>argnum=0<CR>while [ $# -gt 0 ]; do<CR>unset OPTIND<CR>unset OPTARG<CR>#Parse Flags<CR>while getopts 'h' options; do <CR>case $options in<CR>h)<CR>Help<CR>break;;<CR><++>)<CR><++>;;<CR>esac<CR>done<CR>shift $((OPTIND-1))<CR>args+=("$1")<CR> (( argnum++ ))<CR>shift<CR>done<ESC>13kf'la
inoremap ;pf ####<CR>#Error<CR>####<CR>function fail {<CR>printf '%s\n' "$1" >&2<CR>exit "${2-1}"<CR>}<CR>

@ -0,0 +1,19 @@
set spell
set spelllang=en_us
map <C-b> : w % <Bar> make! <CR>
map <C-z> : !make read & <CR>
inoremap ;f \begin{figure}<Enter>\centering<Enter>\includegraphics[]{<++>}<Enter>\caption{<++>}<Enter>\end{figure}<Esc>2kf[a
inoremap ;2f \begin{figure}<CR>\centering<CR>\begin{subfigure}[t]{0.49\textwidth}<CR>\centering<CR>\includegraphics[width=\textwidth]{<++>}<CR>\caption{<++>}<CR>\end{subfigure}<CR>\begin{subfigure}[t]{0.49\textwidth}<CR>\centering<CR>\includegraphics[width=\textwidth]{<++>}<CR>\caption{<++>}<CR>\end{subfigure}<CR>\end{figure}<Esc>8k/<++><Enter>"_c4l
inoremap ;3f \begin{figure}<CR>\centering<CR>\begin{subfigure}[t]{0.32\textwidth}<CR>\centering<CR>\includegraphics[width=\textwidth]{<++>}<CR>\caption{<++>}<CR>\end{subfigure}<CR>\begin{subfigure}[t]{0.32\textwidth}<CR>\centering<CR>\includegraphics[width=\textwidth]{<++>}<CR>\caption{<++>}<CR>\end{subfigure}<CR>\begin{subfigure}[t]{0.32\textwidth}<CR>\centering<CR>\includegraphics[width=\textwidth]{<++>}<CR>\caption{<++>}<CR>\end{subfigure}<CR>\end{figure}<Esc>13k/<++><Enter>"_c4l
inoremap ;F \begin{frame}{<++>}<Enter>\end{frame}<Esc>O<++><Esc>-i
inoremap ;b \textbf{} <++><Esc>F{a
inoremap ;c \caption{}<Esc>i
inoremap ;C \begin{columns}<Enter>\column{0.49\textwidth}<Enter>\column{0.49\textwidth}<Enter><++><Enter>\end{columns}<Esc>2kO
inoremap ;ig \includegraphics[width=\textwidth]{<++>}<Esc>16hi
inoremap ;li \begin{itemize}<Enter>\item<Enter>\end{itemize}<Esc>kA
inoremap ;le \begin{enumerate}<Enter>\item<Enter>\end{enumerate}<Esc>kA
inoremap ;ll \item<Space>
inoremap ;2t \begin{table}[h!]<Enter>\begin{center}<Enter>\begin{tabular}{c c}<Enter> \toprule<Enter>\textbf{} & \textbf{<++>} \\<Enter>\midrule<Enter><++> & <++> \\<Enter>\bottomrule<Enter>\end{tabular}<Enter>\end{center}<Enter>\end{table}<Esc>6kf{a
inoremap ;e \begin{equation}<Enter>\label{<++>}<Enter>\end{equation}<ESC>kO
inoremap ;fw width=\textwidth<Esc>F\i
inoremap ;fh height=\textheight<Esc>F\i

@ -0,0 +1,190 @@
" Plugins will be downloaded under the specified directory.
call plug#begin('~/.vim/plugged')
" Declare the list of plugins.
Plug 'kana/vim-textobj-user'
Plug 'godlygeek/tabular'
Plug 'Vigemus/iron.nvim'
Plug 'tpope/vim-markdown'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'kien/ctrlp.vim'
Plug 'morhetz/gruvbox'
"Plug 'rhysd/vim-grammarous'
Plug 'skywind3000/asyncrun.vim'
Plug 'norcalli/nvim-colorizer.lua'
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'christoomey/vim-tmux-navigator'
Plug 'GCBallesteros/vim-textobj-hydrogen'
" List ends here. Plugins become visible to Vim after this call.
call plug#end()
" All system-wide defaults are set in $VIMRUNTIME/debian.vim and sourced by
" the call to :runtime you can find below. If you wish to change any of those
" settings, you should do it in this file (/etc/vim/vimrc), since debian.vim
" will be overwritten everytime an upgrade of the vim packages is performed.
" It is recommended to make changes after sourcing debian.vim since it alters
" the value of the 'compatible' option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim
" Vim will load $VIMRUNTIME/defaults.vim if the user does not have a vimrc.
" This happens after /etc/vim/vimrc(.local) are loaded, so it will override
" any settings in these files.
" If you don't want that to happen, uncomment the below line to prevent
" defaults.vim from being loaded.
" let g:skip_defaults_vim = 1
" Uncomment the next line to make Vim more Vi-compatible
" NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes numerous
" options, so any other options should be set AFTER setting 'compatible'.
"set compatible
" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
"if has("syntax")
" syntax on
"endif
" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
set background=dark
" Uncomment the following to have Vim jump to the last position when
" reopening a file
"if has("autocmd")
" au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
"endif
" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
"if has("autocmd")
" filetype plugin indent on
"endif
" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
"set showcmd " Show (partial) command in status line.
"set showmatch " Show matching brackets.
"set ignorecase " Do case insensitive matching
"set smartcase " Do smart case matching
"set incsearch " Incremental search
"set autowrite " Automatically save before commands like :next and :make
"set hidden " Hide buffers when they are abandoned
"set mouse=a " Enable mouse usage (all modes)
" Source a global configuration file if available
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
"Set the shell, required to make xclip work
set shell=/bin/sh
syntax enable
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set shiftwidth=0
set number
set relativenumber
set cursorline
let g:airline_theme='gruvbox'
let g:airline_powerline_fonts = 1
colorscheme gruvbox
"Filetype support
filetype on
filetype plugin on
"Disable markdown cold folding
let g:vim_markdown_folding_disabled = 1
"Keybindings
inoremap <Space><Space> <Esc>/<++><Enter>"_c4l
"map <C-f> :NERDTreeToggle<CR>
map <C-s> :set spell spellfile=~/.config/nvim/spell/wordlist.utf-8.spl
"Set up some Asyncrun commands
let g:asyncrun_open=6
"Set terminal for ipython setup
let g:slime_target = "neovim"
set splitbelow
set splitright
command! -nargs=* T split| resize 20 | terminal <args>
"Use netrw instead of NerdTree
let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netrw_browse_split = 2
let g:netrw_altv = 1
let g:netrw_winsize = 25
let g:NetrwIsOpen=0
function! ToggleNetrw()
if g:NetrwIsOpen
let i = bufnr("$")
while (i >= 1)
if (getbufvar(i, "&filetype") == "netrw")
silent exe "bwipeout " . i
endif
let i-=1
endwhile
let g:NetrwIsOpen=0
else
let g:NetrwIsOpen=1
silent Lexplore
endif
endfunction
noremap <silent> <C-t> :call ToggleNetrw()<CR>
"Disable cold folding in markdown plugin, and other options
let g:vim_markdown_folding_disabled=1
"Set default fortran type
let fortran_free_source=1
"Add open command
nnoremap gX :silent :execute
\ "!xdg-open" expand('%:p:h') . "/" . expand("<cfile>") " &"<cr>
map <S-u> <Nop>
inoremap <C-u> <Nop>
"calcurse commands
autocmd BufRead,BufNewFile /tmp/calcurse* set filetype=markdown
autocmd BufRead,BufNewFile ~/.calcurse/notes/* set filetype=markdown
"hi Normal guibg=NONE ctermbg=NONE
"Some autocommands
"Clean up when Latex exits
autocmd VimLeave *.tex ! cleanLatex %:r
"Setup lua colorizer
set termguicolors
lua require'colorizer'.setup()
"Set up telescope
noremap <silent> <C-f> <cmd>Telescope live_grep<cr>
lua require('telescope_settings')
"Neomutt settings
autocmd BufNewFile,BufRead /tmp/neomutt* set noautoindent filetype=mail wm=0 tw=0 nonumber nolist
autocmd BufNewFile,BufRead ~/tmp/neomutt* set noautoindent filetype=mail wm=0 tw=0 nonumber nolist
set mouse=
"Change from ctrl-w+key to ctrl-key
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
"iron.nvim
lua require('iron')

@ -0,0 +1,45 @@
local iron = require("iron.core")
local view = require("iron.view")
iron.setup {
config = {
-- Whether a repl should be discarded or not
scratch_repl = true,
-- Your repl definitions come here
repl_definition = {
python = {
-- Can be a table or a function that
-- returns a table (see below)
command = "ipython --no-autoindent"
}
},
-- How the repl window will be displayed
-- See below for more information
repl_open_cmd = require('iron.view').bottom(20),
},
-- Iron doesn't set keymaps by default anymore.
-- You can set them here or manually add keymaps to the functions in iron.core
keymaps = {
visual_send = ";sc",
send_file = ";sf",
send_line = ";sl",
cr = ";s<cr>",
interrupt = ";s<space>",
exit = ";sq",
clear = ";cl",
},
-- If the highlight is on, you can change how it looks
-- For the available options, check nvim_set_hl
highlight = {
italic = true
},
ignore_blank_lines = true, -- ignore blank lines when sending visual select lines
}
-- iron also has a list of commands, see :h iron-commands for all available commands
vim.keymap.set('n', ';rs', '<cmd>IronRepl<cr>')
vim.keymap.set('n', ';rr', '<cmd>IronRestart<cr>')
vim.keymap.set('n', ';rf', '<cmd>IronFocus<cr>')
vim.keymap.set('n', ';rh', '<cmd>IronHide<cr>')
repl_open_cmd = "horizontal bot 20 split"

@ -0,0 +1,9 @@
local actions = require('telescope.actions')require('telescope').setup{
defaults = {
mappings = {
n = {
["q"] = actions.close
},
},
}
}

@ -0,0 +1,55 @@
require("todo-comments").setup({
signs = true, -- show icons in the signs column
sign_priority = 8, -- sign priority
-- keywords recognized as todo comments
keywords = {
FIX = {
icon = "", -- icon used for the sign, and in search results
color = "error", -- can be a hex color, or a named color (see below)
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
-- signs = false, -- configure signs for some keywords individually
},
TODO = { icon = "", color = "info" },
HACK = { icon = "", color = "warning" },
WARN = { icon = "", color = "warning", alt = { "WARNING", "XXX" } },
PERF = { icon = "󰾆 ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
NOTE = { icon = "󰎞 ", color = "hint", alt = { "INFO" } },
},
merge_keywords = true, -- when true, custom keywords will be merged with the defaults
-- highlighting of the line containing the todo comment
-- * before: highlights before the keyword (typically comment characters)
-- * keyword: highlights of the keyword
-- * after: highlights after the keyword (todo text)
highlight = {
before = "", -- "fg" or "bg" or empty
keyword = "wide", -- "fg", "bg", "wide" or empty. (wide is the same as bg, but will also highlight surrounding characters)
after = "fg", -- "fg" or "bg" or empty
pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlightng (vim regex)
comments_only = true, -- uses treesitter to match keywords in comments only
max_line_len = 400, -- ignore lines longer than this
exclude = {}, -- list of file types to exclude highlighting
},
-- list of named colors where we try to extract the guifg from the
-- list of hilight groups or use the hex color if hl not found as a fallback
colors = {
error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
warning = { "DiagnosticWarning", "WarningMsg", "#FBBF24" },
info = { "DiagnosticInfo", "#2563EB" },
hint = { "DiagnosticHint", "#10B981" },
default = { "Identifier", "#7C3AED" },
},
search = {
command = "rg",
args = {
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
},
-- regex that will be used to match keywords.
-- don't replace the (KEYWORDS) placeholder
pattern = [[\b(KEYWORDS):]], -- ripgrep regex
-- pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon. You'll likely get false positives
},
})

@ -0,0 +1,40 @@
require'nvim-treesitter.configs'.setup{
-- A list of parser names, or "all" (the five listed parsers should always be installed)
ensure_installed = 'all',
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
-- List of parsers to ignore installing (or "all")
ignore_install = { "javascript" },
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
highlight = {
enable = true,
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
-- the name of the parser)
-- list of language that will be disabled
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
-- disable = function(lang, buf)
-- local max_filesize = 100 * 1024 -- 100 KB
-- local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
-- if ok and stats and stats.size > max_filesize then
-- return true
-- end
-- end,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
}

@ -0,0 +1,48 @@
interphase
nanolaminate
microstructures
multilayers
multiscale
microrotation
microcontinuum
microstructure
heterostructured
proven
diffusionless
martensitic
embrittlement
deliverables
minima
energetics
Predictiveness
atomistic
foundational
diffusivity
equilibrated
compositionally
compositional
nanometers
undeformed
interdiffusion
nanolaminates
interdiffused
monatomic
atomistics
interfacial
interatomic
Fortran
runtimes
spacings
unrelaxed
a
nm
centroids
microrotations
centroid
evolutions
recomendations
rhombohedron
inhibitive
parallelized
assumming
exhibitted

Binary file not shown.

370103
spell/en_us

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

@ -0,0 +1,10 @@
import seaborn as sns
import pandas as pd
data=pd.read_csv('some_file')
sns.relplot(

@ -0,0 +1,116 @@
"""
This type stub file was generated by pyright.
"""
import os
import contextlib
from pathlib import Path
from collections.abc import Callable, Generator
from packaging.version import Version
from matplotlib._api import MatplotlibDeprecationWarning
from typing import Any, NamedTuple
from matplotlib.cm import _colormaps as colormaps
from matplotlib.colors import _color_sequences as color_sequences
__all__ = ["__bibtex__", "__version__", "__version_info__", "set_loglevel", "ExecutableNotFoundError", "get_configdir", "get_cachedir", "get_data_path", "matplotlib_fname", "MatplotlibDeprecationWarning", "RcParams", "rc_params", "rc_params_from_file", "rcParamsDefault", "rcParams", "rcParamsOrig", "defaultParams", "rc", "rcdefaults", "rc_file_defaults", "rc_file", "rc_context", "use", "get_backend", "interactive", "is_interactive", "colormaps", "color_sequences"]
class _VersionInfo(NamedTuple):
major: int
minor: int
micro: int
releaselevel: str
serial: int
...
__bibtex__: str
__version__: str
__version_info__: _VersionInfo
def set_loglevel(level: str) -> None:
...
class _ExecInfo(NamedTuple):
executable: str
raw_version: str
version: Version
...
class ExecutableNotFoundError(FileNotFoundError):
...
def get_configdir() -> str:
...
def get_cachedir() -> str:
...
def get_data_path() -> str:
...
def matplotlib_fname() -> str:
...
class RcParams(dict[str, Any]):
validate: dict[str, Callable]
def __init__(self, *args, **kwargs) -> None:
...
def __setitem__(self, key: str, val: Any) -> None:
...
def __getitem__(self, key: str) -> Any:
...
def __iter__(self) -> Generator[str, None, None]:
...
def __len__(self) -> int:
...
def find_all(self, pattern: str) -> RcParams:
...
def copy(self) -> RcParams:
...
def rc_params(fail_on_error: bool = ...) -> RcParams:
...
def rc_params_from_file(fname: str | Path | os.PathLike, fail_on_error: bool = ..., use_default_template: bool = ...) -> RcParams:
...
rcParamsDefault: RcParams
rcParams: RcParams
rcParamsOrig: RcParams
defaultParams: dict[str, Any]
def rc(group: str, **kwargs) -> None:
...
def rcdefaults() -> None:
...
def rc_file_defaults() -> None:
...
def rc_file(fname: str | Path | os.PathLike, *, use_default_template: bool = ...) -> None:
...
@contextlib.contextmanager
def rc_context(rc: dict[str, Any] | None = ..., fname: str | Path | os.PathLike | None = ...) -> Generator[None, None, None]:
...
def use(backend: str, *, force: bool = ...) -> None:
...
def get_backend() -> str:
...
def interactive(b: bool) -> None:
...
def is_interactive() -> bool:
...

@ -0,0 +1,154 @@
"""
This type stub file was generated by pyright.
"""
"""
A python interface to Adobe Font Metrics Files.
Although a number of other Python implementations exist, and may be more
complete than this, it was decided not to go with them because they were
either:
1) copyrighted or used a non-BSD compatible license
2) had too many dependencies and a free standing lib was needed
3) did more than needed and it was easier to write afresh rather than
figure out how to get just what was needed.
It is pretty easy to use, and has no external dependencies:
>>> import matplotlib as mpl
>>> from pathlib import Path
>>> afm_path = Path(mpl.get_data_path(), 'fonts', 'afm', 'ptmr8a.afm')
>>>
>>> from matplotlib.afm import AFM
>>> with afm_path.open('rb') as fh:
... afm = AFM(fh)
>>> afm.string_width_height('What the heck?')
(6220.0, 694)
>>> afm.get_fontname()
'Times-Roman'
>>> afm.get_kern_dist('A', 'f')
0
>>> afm.get_kern_dist('A', 'y')
-92.0
>>> afm.get_bbox_char('!')
[130, -9, 238, 676]
As in the Adobe Font Metrics File Format Specification, all dimensions
are given in units of 1/1000 of the scale factor (point size) of the font
being used.
"""
_log = ...
CharMetrics = ...
CompositePart = ...
class AFM:
def __init__(self, fh) -> None:
"""Parse the AFM file in file object *fh*."""
...
def get_bbox_char(self, c, isord=...):
...
def string_width_height(self, s): # -> tuple[Literal[0], Literal[0]] | tuple[Unknown | Literal[0], float]:
"""
Return the string width (including kerning) and string height
as a (*w*, *h*) tuple.
"""
...
def get_str_bbox_and_descent(self, s): # -> tuple[Literal[0], Literal[0], Literal[0], Literal[0], Literal[0]] | tuple[int, float, Unknown | Literal[0], float, float]:
"""Return the string bounding box and the maximal descent."""
...
def get_str_bbox(self, s): # -> tuple[Literal[0], Literal[0], Literal[0], Literal[0]] | tuple[int, float, Unknown | Literal[0], float]:
"""Return the string bounding box."""
...
def get_name_char(self, c, isord=...):
"""Get the name of the character, i.e., ';' is 'semicolon'."""
...
def get_width_char(self, c, isord=...):
"""
Get the width of the character from the character metric WX field.
"""
...
def get_width_from_char_name(self, name):
"""Get the width of the character from a type1 character name."""
...
def get_height_char(self, c, isord=...):
"""Get the bounding box (ink) height of character *c* (space is 0)."""
...
def get_kern_dist(self, c1, c2):
"""
Return the kerning pair distance (possibly 0) for chars *c1* and *c2*.
"""
...
def get_kern_dist_from_name(self, name1, name2):
"""
Return the kerning pair distance (possibly 0) for chars
*name1* and *name2*.
"""
...
def get_fontname(self):
"""Return the font name, e.g., 'Times-Roman'."""
...
@property
def postscript_name(self):
...
def get_fullname(self):
"""Return the font full name, e.g., 'Times-Roman'."""
...
def get_familyname(self): # -> str:
"""Return the font family name, e.g., 'Times'."""
...
@property
def family_name(self): # -> str:
"""The font family name, e.g., 'Times'."""
...
def get_weight(self):
"""Return the font weight, e.g., 'Bold' or 'Roman'."""
...
def get_angle(self):
"""Return the fontangle as float."""
...
def get_capheight(self):
"""Return the cap height as float."""
...
def get_xheight(self):
"""Return the xheight as float."""
...
def get_underline_thickness(self):
"""Return the underline thickness as float."""
...
def get_horizontal_stem_width(self):
"""
Return the standard horizontal stem width as float, or *None* if
not specified in AFM file.
"""
...
def get_vertical_stem_width(self):
"""
Return the standard vertical stem width as float, or *None* if
not specified in AFM file.
"""
...

@ -0,0 +1,8 @@
"""
This type stub file was generated by pyright.
"""
JS_INCLUDE = ...
STYLE_INCLUDE = ...
DISPLAY_TEMPLATE = ...
INCLUDED_FRAMES = ...

@ -0,0 +1,66 @@
"""
This type stub file was generated by pyright.
"""
from collections.abc import Callable, Generator, Mapping, Sequence
from typing import Any, Iterable, TypeVar, overload
from numpy.typing import NDArray
from .deprecation import MatplotlibDeprecationWarning as MatplotlibDeprecationWarning, delete_parameter as delete_parameter, deprecate_method_override as deprecate_method_override, deprecate_privatize_attribute as deprecate_privatize_attribute, deprecated as deprecated, make_keyword_only as make_keyword_only, rename_parameter as rename_parameter, suppress_matplotlib_deprecation_warning as suppress_matplotlib_deprecation_warning, warn_deprecated as warn_deprecated
_T = TypeVar("_T")
class classproperty(Any):
def __init__(self, fget: Callable[[_T], Any], fset: None = ..., fdel: None = ..., doc: str | None = ...) -> None:
...
@overload
def __get__(self, instance: None, owner: None) -> classproperty:
...
@overload
def __get__(self, instance: object, owner: type[object]) -> Any:
...
@property
def fget(self) -> Callable[[_T], Any]:
...
def check_isinstance(types: type | tuple[type | None, ...], /, **kwargs: Any) -> None:
...
def check_in_list(values: Sequence[Any], /, *, _print_supported_values: bool = ..., **kwargs: Any) -> None:
...
def check_shape(shape: tuple[int | None, ...], /, **kwargs: NDArray) -> None:
...
def check_getitem(mapping: Mapping[Any, Any], /, **kwargs: Any) -> Any:
...
def caching_module_getattr(cls: type) -> Callable[[str], Any]:
...
@overload
def define_aliases(alias_d: dict[str, list[str]], cls: None = ...) -> Callable[[type[_T]], type[_T]]:
...
@overload
def define_aliases(alias_d: dict[str, list[str]], cls: type[_T]) -> type[_T]:
...
def select_matching_signature(funcs: list[Callable], *args: Any, **kwargs: Any) -> Any:
...
def nargs_error(name: str, takes: int | str, given: int) -> TypeError:
...
def kwarg_error(name: str, kw: str | Iterable[str]) -> TypeError:
...
def recursive_subclasses(cls: type) -> Generator[type, None, None]:
...
def warn_external(message: str | Warning, category: type[Warning] | None = ...) -> None:
...

@ -0,0 +1,82 @@
"""
This type stub file was generated by pyright.
"""
import contextlib
from collections.abc import Callable
from typing import Any, TypeVar, TypedDict, overload
from typing_extensions import ParamSpec, Unpack
_P = ParamSpec("_P")
_R = TypeVar("_R")
_T = TypeVar("_T")
class MatplotlibDeprecationWarning(DeprecationWarning):
...
class DeprecationKwargs(TypedDict, total=False):
message: str
alternative: str
pending: bool
obj_type: str
addendum: str
removal: str
...
class NamedDeprecationKwargs(DeprecationKwargs, total=False):
name: str
...
def warn_deprecated(since: str, **kwargs: Unpack[NamedDeprecationKwargs]) -> None:
...
def deprecated(since: str, **kwargs: Unpack[NamedDeprecationKwargs]) -> Callable[[_T], _T]:
...
class deprecate_privatize_attribute(Any):
def __init__(self, since: str, **kwargs: Unpack[NamedDeprecationKwargs]) -> None:
...
def __set_name__(self, owner: type[object], name: str) -> None:
...
DECORATORS: dict[Callable, Callable] = ...
@overload
def rename_parameter(since: str, old: str, new: str, func: None = ...) -> Callable[[Callable[_P, _R]], Callable[_P, _R]]:
...
@overload
def rename_parameter(since: str, old: str, new: str, func: Callable[_P, _R]) -> Callable[_P, _R]:
...
class _deprecated_parameter_class:
...
_deprecated_parameter: _deprecated_parameter_class
@overload
def delete_parameter(since: str, name: str, func: None = ..., **kwargs: Unpack[DeprecationKwargs]) -> Callable[[Callable[_P, _R]], Callable[_P, _R]]:
...
@overload
def delete_parameter(since: str, name: str, func: Callable[_P, _R], **kwargs: Unpack[DeprecationKwargs]) -> Callable[_P, _R]:
...
@overload
def make_keyword_only(since: str, name: str, func: None = ...) -> Callable[[Callable[_P, _R]], Callable[_P, _R]]:
...
@overload
def make_keyword_only(since: str, name: str, func: Callable[_P, _R]) -> Callable[_P, _R]:
...
def deprecate_method_override(method: Callable[_P, _R], obj: object | type, *, allow_empty: bool = ..., since: str, **kwargs: Unpack[NamedDeprecationKwargs]) -> Callable[_P, _R]:
...
def suppress_matplotlib_deprecation_warning() -> contextlib.AbstractContextManager[None]:
...

@ -0,0 +1,26 @@
"""
This type stub file was generated by pyright.
"""
def blocking_input_loop(figure, event_names, timeout, handler): # -> None:
"""
Run *figure*'s event loop while listening to interactive events.
The events listed in *event_names* are passed to *handler*.
This function is used to implement `.Figure.waitforbuttonpress`,
`.Figure.ginput`, and `.Axes.clabel`.
Parameters
----------
figure : `~matplotlib.figure.Figure`
event_names : list of str
The names of the events passed to *handler*.
timeout : float
If positive, the event loop is stopped after *timeout* seconds.
handler : Callable[[Event], Any]
Function called for each event; it can force an early exit of the event
loop by calling ``canvas.stop_event_loop()``.
"""
...

@ -0,0 +1,7 @@
"""
This type stub file was generated by pyright.
"""
def display_is_valid() -> bool:
...

@ -0,0 +1,126 @@
"""
This type stub file was generated by pyright.
"""
"""
Nothing here but dictionaries for generating LinearSegmentedColormaps,
and a dictionary of these dictionaries.
Documentation for each is in pyplot.colormaps(). Please update this
with the purpose and type of your colormap if you add data for one here.
"""
_binary_data = ...
_autumn_data = ...
_bone_data = ...
_cool_data = ...
_copper_data = ...
_flag_data = ...
_prism_data = ...
def cubehelix(gamma=..., s=..., r=..., h=...): # -> dict[str, partial[Unknown]]:
"""
Return custom data dictionary of (r, g, b) conversion functions, which can
be used with :func:`register_cmap`, for the cubehelix color scheme.
Unlike most other color schemes cubehelix was designed by D.A. Green to
be monotonically increasing in terms of perceived brightness.
Also, when printed on a black and white postscript printer, the scheme
results in a greyscale with monotonically increasing brightness.
This color scheme is named cubehelix because the (r, g, b) values produced
can be visualised as a squashed helix around the diagonal in the
(r, g, b) color cube.
For a unit color cube (i.e. 3D coordinates for (r, g, b) each in the
range 0 to 1) the color scheme starts at (r, g, b) = (0, 0, 0), i.e. black,
and finishes at (r, g, b) = (1, 1, 1), i.e. white. For some fraction *x*,
between 0 and 1, the color is the corresponding grey value at that
fraction along the black to white diagonal (x, x, x) plus a color
element. This color element is calculated in a plane of constant
perceived intensity and controlled by the following parameters.
Parameters
----------
gamma : float, default: 1
Gamma factor emphasizing either low intensity values (gamma < 1), or
high intensity values (gamma > 1).
s : float, default: 0.5 (purple)
The starting color.
r : float, default: -1.5
The number of r, g, b rotations in color that are made from the start
to the end of the color scheme. The default of -1.5 corresponds to ->
B -> G -> R -> B.
h : float, default: 1
The hue, i.e. how saturated the colors are. If this parameter is zero
then the color scheme is purely a greyscale.
"""
...
_cubehelix_data = ...
_bwr_data = ...
_brg_data = ...
gfunc = ...
_gnuplot_data = ...
_gnuplot2_data = ...
_ocean_data = ...
_afmhot_data = ...
_rainbow_data = ...
_seismic_data = ...
_terrain_data = ...
_gray_data = ...
_hot_data = ...
_hsv_data = ...
_jet_data = ...
_pink_data = ...
_spring_data = ...
_summer_data = ...
_winter_data = ...
_nipy_spectral_data = ...
_Blues_data = ...
_BrBG_data = ...
_BuGn_data = ...
_BuPu_data = ...
_GnBu_data = ...
_Greens_data = ...
_Greys_data = ...
_Oranges_data = ...
_OrRd_data = ...
_PiYG_data = ...
_PRGn_data = ...
_PuBu_data = ...
_PuBuGn_data = ...
_PuOr_data = ...
_PuRd_data = ...
_Purples_data = ...
_RdBu_data = ...
_RdGy_data = ...
_RdPu_data = ...
_RdYlBu_data = ...
_RdYlGn_data = ...
_Reds_data = ...
_Spectral_data = ...
_YlGn_data = ...
_YlGnBu_data = ...
_YlOrBr_data = ...
_YlOrRd_data = ...
_Accent_data = ...
_Dark2_data = ...
_Paired_data = ...
_Pastel1_data = ...
_Pastel2_data = ...
_Set1_data = ...
_Set2_data = ...
_Set3_data = ...
_gist_earth_data = ...
_gist_gray_data = ...
_gist_heat_data = ...
_gist_ncar_data = ...
_gist_rainbow_data = ...
_gist_stern_data = ...
_gist_yarg_data = ...
_coolwarm_data = ...
_CMRmap_data = ...
_wistia_data = ...
_tab10_data = ...
_tab20_data = ...
_tab20b_data = ...
_tab20c_data = ...
datad = ...

@ -0,0 +1,13 @@
"""
This type stub file was generated by pyright.
"""
_magma_data = ...
_inferno_data = ...
_plasma_data = ...
_viridis_data = ...
_cividis_data = ...
_twilight_data = ...
_twilight_shifted_data = ...
_turbo_data = ...
cmaps = ...

@ -0,0 +1,10 @@
"""
This type stub file was generated by pyright.
"""
from .typing import ColorType
BASE_COLORS: dict[str, ColorType]
TABLEAU_COLORS: dict[str, ColorType]
XKCD_COLORS: dict[str, ColorType]
CSS4_COLORS: dict[str, ColorType]

@ -0,0 +1,233 @@
"""
This type stub file was generated by pyright.
"""
"""
Adjust subplot layouts so that there are no overlapping axes or axes
decorations. All axes decorations are dealt with (labels, ticks, titles,
ticklabels) and some dependent artists are also dealt with (colorbar,
suptitle).
Layout is done via `~matplotlib.gridspec`, with one constraint per gridspec,
so it is possible to have overlapping axes if the gridspecs overlap (i.e.
using `~matplotlib.gridspec.GridSpecFromSubplotSpec`). Axes placed using
``figure.subplots()`` or ``figure.add_subplots()`` will participate in the
layout. Axes manually placed via ``figure.add_axes()`` will not.
See Tutorial: :ref:`constrainedlayout_guide`
General idea:
-------------
First, a figure has a gridspec that divides the figure into nrows and ncols,
with heights and widths set by ``height_ratios`` and ``width_ratios``,
often just set to 1 for an equal grid.
Subplotspecs that are derived from this gridspec can contain either a
``SubPanel``, a ``GridSpecFromSubplotSpec``, or an ``Axes``. The ``SubPanel``
and ``GridSpecFromSubplotSpec`` are dealt with recursively and each contain an
analogous layout.
Each ``GridSpec`` has a ``_layoutgrid`` attached to it. The ``_layoutgrid``
has the same logical layout as the ``GridSpec``. Each row of the grid spec
has a top and bottom "margin" and each column has a left and right "margin".
The "inner" height of each row is constrained to be the same (or as modified
by ``height_ratio``), and the "inner" width of each column is
constrained to be the same (as modified by ``width_ratio``), where "inner"
is the width or height of each column/row minus the size of the margins.
Then the size of the margins for each row and column are determined as the
max width of the decorators on each axes that has decorators in that margin.
For instance, a normal axes would have a left margin that includes the
left ticklabels, and the ylabel if it exists. The right margin may include a
colorbar, the bottom margin the xaxis decorations, and the top margin the
title.
With these constraints, the solver then finds appropriate bounds for the
columns and rows. It's possible that the margins take up the whole figure,
in which case the algorithm is not applied and a warning is raised.
See the tutorial :ref:`constrainedlayout_guide`
for more discussion of the algorithm with examples.
"""
_log = ...
def do_constrained_layout(fig, h_pad, w_pad, hspace=..., wspace=..., rect=..., compress=...): # -> dict[Unknown, Unknown] | None:
"""
Do the constrained_layout. Called at draw time in
``figure.constrained_layout()``
Parameters
----------
fig : `~matplotlib.figure.Figure`
`.Figure` instance to do the layout in.
h_pad, w_pad : float
Padding around the axes elements in figure-normalized units.
hspace, wspace : float
Fraction of the figure to dedicate to space between the
axes. These are evenly spread between the gaps between the axes.
A value of 0.2 for a three-column layout would have a space
of 0.1 of the figure width between each column.
If h/wspace < h/w_pad, then the pads are used instead.
rect : tuple of 4 floats
Rectangle in figure coordinates to perform constrained layout in
[left, bottom, width, height], each from 0-1.
compress : bool
Whether to shift Axes so that white space in between them is
removed. This is useful for simple grids of fixed-aspect Axes (e.g.
a grid of images).
Returns
-------
layoutgrid : private debugging structure
"""
...
def make_layoutgrids(fig, layoutgrids, rect=...): # -> dict[Unknown, Unknown]:
"""
Make the layoutgrid tree.
(Sub)Figures get a layoutgrid so we can have figure margins.
Gridspecs that are attached to axes get a layoutgrid so axes
can have margins.
"""
...
def make_layoutgrids_gs(layoutgrids, gs):
"""
Make the layoutgrid for a gridspec (and anything nested in the gridspec)
"""
...
def check_no_collapsed_axes(layoutgrids, fig): # -> bool:
"""
Check that no axes have collapsed to zero size.
"""
...
def compress_fixed_aspect(layoutgrids, fig):
...
def get_margin_from_padding(obj, *, w_pad=..., h_pad=..., hspace=..., wspace=...): # -> dict[str, int]:
...
def make_layout_margins(layoutgrids, fig, renderer, *, w_pad=..., h_pad=..., hspace=..., wspace=...):
"""
For each axes, make a margin between the *pos* layoutbox and the
*axes* layoutbox be a minimum size that can accommodate the
decorations on the axis.
Then make room for colorbars.
Parameters
----------
layoutgrids : dict
fig : `~matplotlib.figure.Figure`
`.Figure` instance to do the layout in.
renderer : `~matplotlib.backend_bases.RendererBase` subclass.
The renderer to use.
w_pad, h_pad : float, default: 0
Width and height padding (in fraction of figure).
hspace, wspace : float, default: 0
Width and height padding as fraction of figure size divided by
number of columns or rows.
"""
...
def make_margin_suptitles(layoutgrids, fig, renderer, *, w_pad=..., h_pad=...): # -> None:
...
def match_submerged_margins(layoutgrids, fig): # -> None:
"""
Make the margins that are submerged inside an Axes the same size.
This allows axes that span two columns (or rows) that are offset
from one another to have the same size.
This gives the proper layout for something like::
fig = plt.figure(constrained_layout=True)
axs = fig.subplot_mosaic("AAAB\nCCDD")
Without this routine, the axes D will be wider than C, because the
margin width between the two columns in C has no width by default,
whereas the margins between the two columns of D are set by the
width of the margin between A and B. However, obviously the user would
like C and D to be the same size, so we need to add constraints to these
"submerged" margins.
This routine makes all the interior margins the same, and the spacing
between the three columns in A and the two column in C are all set to the
margins between the two columns of D.
See test_constrained_layout::test_constrained_layout12 for an example.
"""
...
def get_cb_parent_spans(cbax): # -> tuple[range, range]:
"""
Figure out which subplotspecs this colorbar belongs to.
Parameters
----------
cbax : `~matplotlib.axes.Axes`
Axes for the colorbar.
"""
...
def get_pos_and_bbox(ax, renderer): # -> tuple[Unknown, Unknown]:
"""
Get the position and the bbox for the axes.
Parameters
----------
ax : `~matplotlib.axes.Axes`
renderer : `~matplotlib.backend_bases.RendererBase` subclass.
Returns
-------
pos : `~matplotlib.transforms.Bbox`
Position in figure coordinates.
bbox : `~matplotlib.transforms.Bbox`
Tight bounding box in figure coordinates.
"""
...
def reposition_axes(layoutgrids, fig, renderer, *, w_pad=..., h_pad=..., hspace=..., wspace=...): # -> None:
"""
Reposition all the axes based on the new inner bounding box.
"""
...
def reposition_colorbar(layoutgrids, cbax, renderer, *, offset=...): # -> None:
"""
Place the colorbar in its new place.
Parameters
----------
layoutgrids : dict
cbax : `~matplotlib.axes.Axes`
Axes for the colorbar.
renderer : `~matplotlib.backend_bases.RendererBase` subclass.
The renderer to use.
offset : array-like
Offset the colorbar needs to be pushed to in order to
account for multiple colorbars.
"""
...
def reset_margins(layoutgrids, fig): # -> None:
"""
Reset the margins in the layoutboxes of *fig*.
Margins are usually set as a minimum, so if the figure gets smaller
the minimum needs to be zero in order for it to grow again.
"""
...
def colorbar_get_pad(layoutgrids, cax):
...

@ -0,0 +1,44 @@
"""
This type stub file was generated by pyright.
"""
from typing import Any, Callable, TypeVar, overload
_T = TypeVar('_T')
class Substitution:
@overload
def __init__(self, *args: str) -> None:
...
@overload
def __init__(self, **kwargs: str) -> None:
...
def __call__(self, func: _T) -> _T:
...
def update(self, *args, **kwargs):
...
class _ArtistKwdocLoader(dict[str, str]):
def __missing__(self, key: str) -> str:
...
class _ArtistPropertiesSubstitution(Substitution):
def __init__(self) -> None:
...
def __call__(self, obj: _T) -> _T:
...
def copy(source: Any) -> Callable[[_T], _T]:
...
dedent_interpd: _ArtistPropertiesSubstitution
interpd: _ArtistPropertiesSubstitution

@ -0,0 +1,32 @@
"""
This type stub file was generated by pyright.
"""
from enum import Enum
class _AutoStringNameEnum(Enum):
def __hash__(self) -> int:
...
class JoinStyle(str, _AutoStringNameEnum):
miter: str
round: str
bevel: str
@staticmethod
def demo() -> None:
...
class CapStyle(str, _AutoStringNameEnum):
butt: str
projecting: str
round: str
@staticmethod
def demo() -> None:
...

@ -0,0 +1,31 @@
"""
This type stub file was generated by pyright.
"""
from functools import lru_cache
"""
A module for parsing and generating `fontconfig patterns`_.
.. _fontconfig patterns:
https://www.freedesktop.org/software/fontconfig/fontconfig-user.html
"""
_family_punc = ...
_family_unescape = ...
_family_escape = ...
_value_punc = ...
_value_unescape = ...
_value_escape = ...
_CONSTANTS = ...
@lru_cache
def parse_fontconfig_pattern(pattern): # -> dict[Unknown, Unknown]:
"""
Parse a fontconfig *pattern* into a dict that can initialize a
`.font_manager.FontProperties` object.
"""
...
def generate_fontconfig_pattern(d): # -> str:
"""Convert a `.FontProperties` to a fontconfig pattern string."""
...

@ -0,0 +1,4 @@
"""
This type stub file was generated by pyright.
"""

@ -0,0 +1,30 @@
"""
This type stub file was generated by pyright.
"""
"""
Internal debugging utilities, that are not expected to be used in the rest of
the codebase.
WARNING: Code in this module may change without prior notice!
"""
def graphviz_dump_transform(transform, dest, *, highlight=...): # -> None:
"""
Generate a graphical representation of the transform tree for *transform*
using the :program:`dot` program (which this function depends on). The
output format (png, dot, etc.) is determined from the suffix of *dest*.
Parameters
----------
transform : `~matplotlib.transform.Transform`
The represented transform.
dest : str
Output filename. The extension must be one of the formats supported
by :program:`dot`, e.g. png, svg, dot, ...
(see https://www.graphviz.org/doc/info/output.html).
highlight : list of `~matplotlib.transform.Transform` or None
The transforms in the tree to be drawn in bold.
If *None*, *transform* is highlighted.
"""
...

@ -0,0 +1,212 @@
"""
This type stub file was generated by pyright.
"""
"""
A layoutgrid is a nrows by ncols set of boxes, meant to be used by
`._constrained_layout`, each box is analogous to a subplotspec element of
a gridspec.
Each box is defined by left[ncols], right[ncols], bottom[nrows] and top[nrows],
and by two editable margins for each side. The main margin gets its value
set by the size of ticklabels, titles, etc on each axes that is in the figure.
The outer margin is the padding around the axes, and space for any
colorbars.
The "inner" widths and heights of these boxes are then constrained to be the
same (relative the values of `width_ratios[ncols]` and `height_ratios[nrows]`).
The layoutgrid is then constrained to be contained within a parent layoutgrid,
its column(s) and row(s) specified when it is created.
"""
_log = ...
class LayoutGrid:
"""
Analogous to a gridspec, and contained in another LayoutGrid.
"""
def __init__(self, parent=..., parent_pos=..., parent_inner=..., name=..., ncols=..., nrows=..., h_pad=..., w_pad=..., width_ratios=..., height_ratios=...) -> None:
...
def __repr__(self): # -> str:
...
def reset_margins(self): # -> None:
"""
Reset all the margins to zero. Must do this after changing
figure size, for instance, because the relative size of the
axes labels etc changes.
"""
...
def add_constraints(self, parent): # -> None:
...
def hard_constraints(self): # -> None:
"""
These are the redundant constraints, plus ones that make the
rest of the code easier.
"""
...
def add_child(self, child, i=..., j=...): # -> None:
...
def parent_constraints(self, parent): # -> None:
...
def grid_constraints(self): # -> None:
...
def edit_margin(self, todo, size, cell): # -> None:
"""
Change the size of the margin for one cell.
Parameters
----------
todo : string (one of 'left', 'right', 'bottom', 'top')
margin to alter.
size : float
Size of the margin. If it is larger than the existing minimum it
updates the margin size. Fraction of figure size.
cell : int
Cell column or row to edit.
"""
...
def edit_margin_min(self, todo, size, cell=...): # -> None:
"""
Change the minimum size of the margin for one cell.
Parameters
----------
todo : string (one of 'left', 'right', 'bottom', 'top')
margin to alter.
size : float
Minimum size of the margin . If it is larger than the
existing minimum it updates the margin size. Fraction of
figure size.
cell : int
Cell column or row to edit.
"""
...
def edit_margins(self, todo, size): # -> None:
"""
Change the size of all the margin of all the cells in the layout grid.
Parameters
----------
todo : string (one of 'left', 'right', 'bottom', 'top')
margin to alter.
size : float
Size to set the margins. Fraction of figure size.
"""
...
def edit_all_margins_min(self, todo, size): # -> None:
"""
Change the minimum size of all the margin of all
the cells in the layout grid.
Parameters
----------
todo : {'left', 'right', 'bottom', 'top'}
The margin to alter.
size : float
Minimum size of the margin. If it is larger than the
existing minimum it updates the margin size. Fraction of
figure size.
"""
...
def edit_outer_margin_mins(self, margin, ss): # -> None:
"""
Edit all four margin minimums in one statement.
Parameters
----------
margin : dict
size of margins in a dict with keys 'left', 'right', 'bottom',
'top'
ss : SubplotSpec
defines the subplotspec these margins should be applied to
"""
...
def get_margins(self, todo, col):
"""Return the margin at this position"""
...
def get_outer_bbox(self, rows=..., cols=...): # -> Bbox:
"""
Return the outer bounding box of the subplot specs
given by rows and cols. rows and cols can be spans.
"""
...
def get_inner_bbox(self, rows=..., cols=...): # -> Bbox:
"""
Return the inner bounding box of the subplot specs
given by rows and cols. rows and cols can be spans.
"""
...
def get_bbox_for_cb(self, rows=..., cols=...): # -> Bbox:
"""
Return the bounding box that includes the
decorations but, *not* the colorbar...
"""
...
def get_left_margin_bbox(self, rows=..., cols=...): # -> Bbox:
"""
Return the left margin bounding box of the subplot specs
given by rows and cols. rows and cols can be spans.
"""
...
def get_bottom_margin_bbox(self, rows=..., cols=...): # -> Bbox:
"""
Return the left margin bounding box of the subplot specs
given by rows and cols. rows and cols can be spans.
"""
...
def get_right_margin_bbox(self, rows=..., cols=...): # -> Bbox:
"""
Return the left margin bounding box of the subplot specs
given by rows and cols. rows and cols can be spans.
"""
...
def get_top_margin_bbox(self, rows=..., cols=...): # -> Bbox:
"""
Return the left margin bounding box of the subplot specs
given by rows and cols. rows and cols can be spans.
"""
...
def update_variables(self): # -> None:
"""
Update the variables for the solver attached to this layoutgrid.
"""
...
_layoutboxobjnum = ...
def seq_id(): # -> str:
"""Generate a short sequential id for layoutbox objects."""
...
def plot_children(fig, lg=..., level=...): # -> None:
"""Simple plotting to show where boxes are."""
...

@ -0,0 +1,928 @@
"""
This type stub file was generated by pyright.
"""
import abc
import enum
import functools
import typing as T
from typing import NamedTuple
from pyparsing import Literal, ParseResults, ParserElement, __version__ as pyparsing_version
from .font_manager import FontProperties
from .ft2font import FT2Font, FT2Image, Glyph
from packaging.version import parse as parse_version
"""
Implementation details for :mod:`.mathtext`.
"""
if parse_version(pyparsing_version).major < 3:
...
else:
...
if T.TYPE_CHECKING:
...
_log = ...
def get_unicode_index(symbol: str) -> int:
r"""
Return the integer index (from the Unicode table) of *symbol*.
Parameters
----------
symbol : str
A single (Unicode) character, a TeX command (e.g. r'\pi') or a Type1
symbol name (e.g. 'phi').
"""
...
class VectorParse(NamedTuple):
"""
The namedtuple type returned by ``MathTextParser("path").parse(...)``.
Attributes
----------
width, height, depth : float
The global metrics.
glyphs : list
The glyphs including their positions.
rect : list
The list of rectangles.
"""
width: float
height: float
depth: float
glyphs: list[tuple[FT2Font, float, int, float, float]]
rects: list[tuple[float, float, float, float]]
...
class RasterParse(NamedTuple):
"""
The namedtuple type returned by ``MathTextParser("agg").parse(...)``.
Attributes
----------
ox, oy : float
The offsets are always zero.
width, height, depth : float
The global metrics.
image : FT2Image
A raster image.
"""
ox: float
oy: float
width: float
height: float
depth: float
image: FT2Image
...
class Output:
r"""
Result of `ship`\ping a box: lists of positioned glyphs and rectangles.
This class is not exposed to end users, but converted to a `VectorParse` or
a `RasterParse` by `.MathTextParser.parse`.
"""
def __init__(self, box: Box) -> None:
...
def to_vector(self) -> VectorParse:
...
def to_raster(self, *, antialiased: bool) -> RasterParse:
...
class FontMetrics(NamedTuple):
"""
Metrics of a font.
Attributes
----------
advance : float
The advance distance (in points) of the glyph.
height : float
The height of the glyph in points.
width : float
The width of the glyph in points.
xmin, xmax, ymin, ymax : float
The ink rectangle of the glyph.
iceberg : float
The distance from the baseline to the top of the glyph. (This corresponds to
TeX's definition of "height".)
slanted : bool
Whether the glyph should be considered as "slanted" (currently used for kerning
sub/superscripts).
"""
advance: float
height: float
width: float
xmin: float
xmax: float
ymin: float
ymax: float
iceberg: float
slanted: bool
...
class FontInfo(NamedTuple):
font: FT2Font
fontsize: float
postscript_name: str
metrics: FontMetrics
num: int
glyph: Glyph
offset: float
...
class Fonts(abc.ABC):
"""
An abstract base class for a system of fonts to use for mathtext.
The class must be able to take symbol keys and font file names and
return the character metrics. It also delegates to a backend class
to do the actual drawing.
"""
def __init__(self, default_font_prop: FontProperties, load_glyph_flags: int) -> None:
"""
Parameters
----------
default_font_prop : `~.font_manager.FontProperties`
The default non-math font, or the base font for Unicode (generic)
font rendering.
load_glyph_flags : int
Flags passed to the glyph loader (e.g. ``FT_Load_Glyph`` and
``FT_Load_Char`` for FreeType-based fonts).
"""
...
def get_kern(self, font1: str, fontclass1: str, sym1: str, fontsize1: float, font2: str, fontclass2: str, sym2: str, fontsize2: float, dpi: float) -> float:
"""
Get the kerning distance for font between *sym1* and *sym2*.
See `~.Fonts.get_metrics` for a detailed description of the parameters.
"""
...
def get_metrics(self, font: str, font_class: str, sym: str, fontsize: float, dpi: float) -> FontMetrics:
r"""
Parameters
----------
font : str
One of the TeX font names: "tt", "it", "rm", "cal", "sf", "bf",
"default", "regular", "bb", "frak", "scr". "default" and "regular"
are synonyms and use the non-math font.
font_class : str
One of the TeX font names (as for *font*), but **not** "bb",
"frak", or "scr". This is used to combine two font classes. The
only supported combination currently is ``get_metrics("frak", "bf",
...)``.
sym : str
A symbol in raw TeX form, e.g., "1", "x", or "\sigma".
fontsize : float
Font size in points.
dpi : float
Rendering dots-per-inch.
Returns
-------
FontMetrics
"""
...
def render_glyph(self, output: Output, ox: float, oy: float, font: str, font_class: str, sym: str, fontsize: float, dpi: float) -> None:
"""
At position (*ox*, *oy*), draw the glyph specified by the remaining
parameters (see `get_metrics` for their detailed description).
"""
...
def render_rect_filled(self, output: Output, x1: float, y1: float, x2: float, y2: float) -> None:
"""
Draw a filled rectangle from (*x1*, *y1*) to (*x2*, *y2*).
"""
...
def get_xheight(self, font: str, fontsize: float, dpi: float) -> float:
"""
Get the xheight for the given *font* and *fontsize*.
"""
...
def get_underline_thickness(self, font: str, fontsize: float, dpi: float) -> float:
"""
Get the line thickness that matches the given font. Used as a
base unit for drawing lines such as in a fraction or radical.
"""
...
def get_sized_alternatives_for_symbol(self, fontname: str, sym: str) -> list[tuple[str, str]]:
"""
Override if your font provides multiple sizes of the same
symbol. Should return a list of symbols matching *sym* in
various sizes. The expression renderer will select the most
appropriate size for a given situation from this list.
"""
...
class TruetypeFonts(Fonts, metaclass=abc.ABCMeta):
"""
A generic base class for all font setups that use Truetype fonts
(through FT2Font).
"""
def __init__(self, default_font_prop: FontProperties, load_glyph_flags: int) -> None:
...
def get_xheight(self, fontname: str, fontsize: float, dpi: float) -> float:
...
def get_underline_thickness(self, font: str, fontsize: float, dpi: float) -> float:
...
def get_kern(self, font1: str, fontclass1: str, sym1: str, fontsize1: float, font2: str, fontclass2: str, sym2: str, fontsize2: float, dpi: float) -> float:
...
class BakomaFonts(TruetypeFonts):
"""
Use the Bakoma TrueType fonts for rendering.
Symbols are strewn about a number of font files, each of which has
its own proprietary 8-bit encoding.
"""
_fontmap = ...
def __init__(self, default_font_prop: FontProperties, load_glyph_flags: int) -> None:
...
_slanted_symbols = ...
_size_alternatives = ...
def get_sized_alternatives_for_symbol(self, fontname: str, sym: str) -> list[tuple[str, str]]:
...
class UnicodeFonts(TruetypeFonts):
"""
An abstract base class for handling Unicode fonts.
While some reasonably complete Unicode fonts (such as DejaVu) may
work in some situations, the only Unicode font I'm aware of with a
complete set of math symbols is STIX.
This class will "fallback" on the Bakoma fonts when a required
symbol cannot be found in the font.
"""
_cmr10_substitutions = ...
def __init__(self, default_font_prop: FontProperties, load_glyph_flags: int) -> None:
...
_slanted_symbols = ...
def get_sized_alternatives_for_symbol(self, fontname: str, sym: str) -> list[tuple[str, str]]:
...
class DejaVuFonts(UnicodeFonts, metaclass=abc.ABCMeta):
_fontmap: dict[str | int, str] = ...
def __init__(self, default_font_prop: FontProperties, load_glyph_flags: int) -> None:
...
class DejaVuSerifFonts(DejaVuFonts):
"""
A font handling class for the DejaVu Serif fonts
If a glyph is not found it will fallback to Stix Serif
"""
_fontmap = ...
class DejaVuSansFonts(DejaVuFonts):
"""
A font handling class for the DejaVu Sans fonts
If a glyph is not found it will fallback to Stix Sans
"""
_fontmap = ...
class StixFonts(UnicodeFonts):
"""
A font handling class for the STIX fonts.
In addition to what UnicodeFonts provides, this class:
- supports "virtual fonts" which are complete alpha numeric
character sets with different font styles at special Unicode
code points, such as "Blackboard".
- handles sized alternative characters for the STIXSizeX fonts.
"""
_fontmap: dict[str | int, str] = ...
_fallback_font = ...
_sans = ...
def __init__(self, default_font_prop: FontProperties, load_glyph_flags: int) -> None:
...
@functools.cache
def get_sized_alternatives_for_symbol(self, fontname: str, sym: str) -> list[tuple[str, str]] | list[tuple[int, str]]:
...
class StixSansFonts(StixFonts):
"""
A font handling class for the STIX fonts (that uses sans-serif
characters by default).
"""
_sans = ...
SHRINK_FACTOR = ...
NUM_SIZE_LEVELS = ...
class FontConstantsBase:
"""
A set of constants that controls how certain things, such as sub-
and superscripts are laid out. These are all metrics that can't
be reliably retrieved from the font metrics in the font itself.
"""
script_space: T.ClassVar[float] = ...
subdrop: T.ClassVar[float] = ...
sup1: T.ClassVar[float] = ...
sub1: T.ClassVar[float] = ...
sub2: T.ClassVar[float] = ...
delta: T.ClassVar[float] = ...
delta_slanted: T.ClassVar[float] = ...
delta_integral: T.ClassVar[float] = ...
class ComputerModernFontConstants(FontConstantsBase):
script_space = ...
subdrop = ...
sup1 = ...
sub1 = ...
sub2 = ...
delta = ...
delta_slanted = ...
delta_integral = ...
class STIXFontConstants(FontConstantsBase):
script_space = ...
sup1 = ...
sub2 = ...
delta = ...
delta_slanted = ...
delta_integral = ...
class STIXSansFontConstants(FontConstantsBase):
script_space = ...
sup1 = ...
delta_slanted = ...
delta_integral = ...
class DejaVuSerifFontConstants(FontConstantsBase):
...
class DejaVuSansFontConstants(FontConstantsBase):
...
_font_constant_mapping = ...
class Node:
"""A node in the TeX box model."""
def __init__(self) -> None:
...
def __repr__(self) -> str:
...
def get_kerning(self, next: Node | None) -> float:
...
def shrink(self) -> None:
"""
Shrinks one level smaller. There are only three levels of
sizes, after which things will no longer get smaller.
"""
...
def render(self, output: Output, x: float, y: float) -> None:
"""Render this node."""
...
class Box(Node):
"""A node with a physical location."""
def __init__(self, width: float, height: float, depth: float) -> None:
...
def shrink(self) -> None:
...
def render(self, output: Output, x1: float, y1: float, x2: float, y2: float) -> None:
...
class Vbox(Box):
"""A box with only height (zero width)."""
def __init__(self, height: float, depth: float) -> None:
...
class Hbox(Box):
"""A box with only width (zero height and depth)."""
def __init__(self, width: float) -> None:
...
class Char(Node):
"""
A single character.
Unlike TeX, the font information and metrics are stored with each `Char`
to make it easier to lookup the font metrics when needed. Note that TeX
boxes have a width, height, and depth, unlike Type1 and TrueType which use
a full bounding box and an advance in the x-direction. The metrics must
be converted to the TeX model, and the advance (if different from width)
must be converted into a `Kern` node when the `Char` is added to its parent
`Hlist`.
"""
def __init__(self, c: str, state: ParserState) -> None:
...
def __repr__(self) -> str:
...
def is_slanted(self) -> bool:
...
def get_kerning(self, next: Node | None) -> float:
"""
Return the amount of kerning between this and the given character.
This method is called when characters are strung together into `Hlist`
to create `Kern` nodes.
"""
...
def render(self, output: Output, x: float, y: float) -> None:
...
def shrink(self) -> None:
...
class Accent(Char):
"""
The font metrics need to be dealt with differently for accents,
since they are already offset correctly from the baseline in
TrueType fonts.
"""
def shrink(self) -> None:
...
def render(self, output: Output, x: float, y: float) -> None:
...
class List(Box):
"""A list of nodes (either horizontal or vertical)."""
def __init__(self, elements: T.Sequence[Node]) -> None:
...
def __repr__(self) -> str:
...
def shrink(self) -> None:
...
class Hlist(List):
"""A horizontal list of boxes."""
def __init__(self, elements: T.Sequence[Node], w: float = ..., m: T.Literal['additional', 'exactly'] = ..., do_kern: bool = ...) -> None:
...
def kern(self) -> None:
"""
Insert `Kern` nodes between `Char` nodes to set kerning.
The `Char` nodes themselves determine the amount of kerning they need
(in `~Char.get_kerning`), and this function just creates the correct
linked list.
"""
...
def hpack(self, w: float = ..., m: T.Literal['additional', 'exactly'] = ...) -> None:
r"""
Compute the dimensions of the resulting boxes, and adjust the glue if
one of those dimensions is pre-specified. The computed sizes normally
enclose all of the material inside the new box; but some items may
stick out if negative glue is used, if the box is overfull, or if a
``\vbox`` includes other boxes that have been shifted left.
Parameters
----------
w : float, default: 0
A width.
m : {'exactly', 'additional'}, default: 'additional'
Whether to produce a box whose width is 'exactly' *w*; or a box
with the natural width of the contents, plus *w* ('additional').
Notes
-----
The defaults produce a box with the natural width of the contents.
"""
...
class Vlist(List):
"""A vertical list of boxes."""
def __init__(self, elements: T.Sequence[Node], h: float = ..., m: T.Literal['additional', 'exactly'] = ...) -> None:
...
def vpack(self, h: float = ..., m: T.Literal['additional', 'exactly'] = ..., l: float = ...) -> None:
"""
Compute the dimensions of the resulting boxes, and to adjust the glue
if one of those dimensions is pre-specified.
Parameters
----------
h : float, default: 0
A height.
m : {'exactly', 'additional'}, default: 'additional'
Whether to produce a box whose height is 'exactly' *h*; or a box
with the natural height of the contents, plus *h* ('additional').
l : float, default: np.inf
The maximum height.
Notes
-----
The defaults produce a box with the natural height of the contents.
"""
...
class Rule(Box):
"""
A solid black rectangle.
It has *width*, *depth*, and *height* fields just as in an `Hlist`.
However, if any of these dimensions is inf, the actual value will be
determined by running the rule up to the boundary of the innermost
enclosing box. This is called a "running dimension". The width is never
running in an `Hlist`; the height and depth are never running in a `Vlist`.
"""
def __init__(self, width: float, height: float, depth: float, state: ParserState) -> None:
...
def render(self, output: Output, x: float, y: float, w: float, h: float) -> None:
...
class Hrule(Rule):
"""Convenience class to create a horizontal rule."""
def __init__(self, state: ParserState, thickness: float | None = ...) -> None:
...
class Vrule(Rule):
"""Convenience class to create a vertical rule."""
def __init__(self, state: ParserState) -> None:
...
class _GlueSpec(NamedTuple):
width: float
stretch: float
stretch_order: int
shrink: float
shrink_order: int
...
class Glue(Node):
"""
Most of the information in this object is stored in the underlying
``_GlueSpec`` class, which is shared between multiple glue objects.
(This is a memory optimization which probably doesn't matter anymore, but
it's easier to stick to what TeX does.)
"""
def __init__(self, glue_type: _GlueSpec | T.Literal["fil", "fill", "filll", "neg_fil", "neg_fill", "neg_filll", "empty", "ss"]) -> None:
...
def shrink(self) -> None:
...
class HCentered(Hlist):
"""
A convenience class to create an `Hlist` whose contents are
centered within its enclosing box.
"""
def __init__(self, elements: list[Node]) -> None:
...
class VCentered(Vlist):
"""
A convenience class to create a `Vlist` whose contents are
centered within its enclosing box.
"""
def __init__(self, elements: list[Node]) -> None:
...
class Kern(Node):
"""
A `Kern` node has a width field to specify a (normally
negative) amount of spacing. This spacing correction appears in
horizontal lists between letters like A and V when the font
designer said that it looks better to move them closer together or
further apart. A kern node can also appear in a vertical list,
when its *width* denotes additional spacing in the vertical
direction.
"""
height = ...
depth = ...
def __init__(self, width: float) -> None:
...
def __repr__(self) -> str:
...
def shrink(self) -> None:
...
class AutoHeightChar(Hlist):
"""
A character as close to the given height and depth as possible.
When using a font with multiple height versions of some characters (such as
the BaKoMa fonts), the correct glyph will be selected, otherwise this will
always just return a scaled version of the glyph.
"""
def __init__(self, c: str, height: float, depth: float, state: ParserState, always: bool = ..., factor: float | None = ...) -> None:
...
class AutoWidthChar(Hlist):
"""
A character as close to the given width as possible.
When using a font with multiple width versions of some characters (such as
the BaKoMa fonts), the correct glyph will be selected, otherwise this will
always just return a scaled version of the glyph.
"""
def __init__(self, c: str, width: float, state: ParserState, always: bool = ..., char_class: type[Char] = ...) -> None:
...
def ship(box: Box, xy: tuple[float, float] = ...) -> Output:
"""
Ship out *box* at offset *xy*, converting it to an `Output`.
Since boxes can be inside of boxes inside of boxes, the main work of `ship`
is done by two mutually recursive routines, `hlist_out` and `vlist_out`,
which traverse the `Hlist` nodes and `Vlist` nodes inside of horizontal
and vertical boxes. The global variables used in TeX to store state as it
processes have become local variables here.
"""
...
def Error(msg: str) -> ParserElement:
"""Helper class to raise parser errors."""
...
class ParserState:
"""
Parser state.
States are pushed and popped from a stack as necessary, and the "current"
state is always at the top of the stack.
Upon entering and leaving a group { } or math/non-math, the stack is pushed
and popped accordingly.
"""
def __init__(self, fontset: Fonts, font: str, font_class: str, fontsize: float, dpi: float) -> None:
...
def copy(self) -> ParserState:
...
@property
def font(self) -> str:
...
@font.setter
def font(self, name: str) -> None:
...
def get_current_underline_thickness(self) -> float:
"""Return the underline thickness for this state."""
...
def cmd(expr: str, args: ParserElement) -> ParserElement:
r"""
Helper to define TeX commands.
``cmd("\cmd", args)`` is equivalent to
``"\cmd" - (args | Error("Expected \cmd{arg}{...}"))`` where the names in
the error message are taken from element names in *args*. If *expr*
already includes arguments (e.g. "\cmd{arg}{...}"), then they are stripped
when constructing the parse element, but kept (and *expr* is used as is) in
the error message.
"""
...
class Parser:
"""
A pyparsing-based parser for strings containing math expressions.
Raw text may also appear outside of pairs of ``$``.
The grammar is based directly on that in TeX, though it cuts a few corners.
"""
class _MathStyle(enum.Enum):
DISPLAYSTYLE = ...
TEXTSTYLE = ...
SCRIPTSTYLE = ...
SCRIPTSCRIPTSTYLE = ...
_binary_operators = ...
_relation_symbols = ...
_arrow_symbols = ...
_spaced_symbols = ...
_punctuation_symbols = ...
_overunder_symbols = ...
_overunder_functions = ...
_dropsub_symbols = ...
_fontnames = ...
_function_names = ...
_ambi_delims = ...
_left_delims = ...
_right_delims = ...
_delims = ...
_small_greek = ...
_latin_alphabets = ...
def __init__(self) -> None:
...
def parse(self, s: str, fonts_object: Fonts, fontsize: float, dpi: float) -> Hlist:
"""
Parse expression *s* using the given *fonts_object* for
output, at the given *fontsize* and *dpi*.
Returns the parse tree of `Node` instances.
"""
...
def get_state(self) -> ParserState:
"""Get the current `State` of the parser."""
...
def pop_state(self) -> None:
"""Pop a `State` off of the stack."""
...
def push_state(self) -> None:
"""Push a new `State` onto the stack, copying the current state."""
...
def main(self, toks: ParseResults) -> list[Hlist]:
...
def math_string(self, toks: ParseResults) -> ParseResults:
...
def math(self, toks: ParseResults) -> T.Any:
...
def non_math(self, toks: ParseResults) -> T.Any:
...
float_literal = ...
def text(self, toks: ParseResults) -> T.Any:
...
_space_widths = ...
def space(self, toks: ParseResults) -> T.Any:
...
def customspace(self, toks: ParseResults) -> T.Any:
...
def symbol(self, s: str, loc: int, toks: ParseResults | dict[str, str]) -> T.Any:
...
def unknown_symbol(self, s: str, loc: int, toks: ParseResults) -> T.Any:
...
_accent_map = ...
_wide_accents = ...
def accent(self, toks: ParseResults) -> T.Any:
...
def function(self, s: str, loc: int, toks: ParseResults) -> T.Any:
...
def operatorname(self, s: str, loc: int, toks: ParseResults) -> T.Any:
...
def start_group(self, toks: ParseResults) -> T.Any:
...
def group(self, toks: ParseResults) -> T.Any:
...
def required_group(self, toks: ParseResults) -> T.Any:
...
optional_group = ...
def end_group(self) -> T.Any:
...
def unclosed_group(self, s: str, loc: int, toks: ParseResults) -> T.Any:
...
def font(self, toks: ParseResults) -> T.Any:
...
def is_overunder(self, nucleus: Node) -> bool:
...
def is_dropsub(self, nucleus: Node) -> bool:
...
def is_slanted(self, nucleus: Node) -> bool:
...
def subsuper(self, s: str, loc: int, toks: ParseResults) -> T.Any:
...
def style_literal(self, toks: ParseResults) -> T.Any:
...
def genfrac(self, toks: ParseResults) -> T.Any:
...
def frac(self, toks: ParseResults) -> T.Any:
...
def dfrac(self, toks: ParseResults) -> T.Any:
...
def binom(self, toks: ParseResults) -> T.Any:
...
underset = ...
def sqrt(self, toks: ParseResults) -> T.Any:
...
def overline(self, toks: ParseResults) -> T.Any:
...
def auto_delim(self, toks: ParseResults) -> T.Any:
...
def boldsymbol(self, toks: ParseResults) -> T.Any:
...
def substack(self, toks: ParseResults) -> T.Any:
...

@ -0,0 +1,13 @@
"""
This type stub file was generated by pyright.
"""
"""
font data tables for truetype and afm computer modern fonts
"""
latex_to_bakoma = ...
type12uni = ...
uni2type1 = ...
tex2uni = ...
stix_virtual_fonts: dict[str, dict[str, list[tuple[int, int, str, int]]] | list[tuple[int, int, str, int]]] = ...
stix_glyph_fixes = ...

@ -0,0 +1,17 @@
"""
This type stub file was generated by pyright.
"""
import numpy as np
from collections.abc import Sequence
from .transforms import BboxBase
def affine_transform(points: np.ndarray, trans: np.ndarray) -> np.ndarray:
...
def count_bboxes_overlapping_bbox(bbox: BboxBase, bboxes: Sequence[BboxBase]) -> int:
...
def update_path_extents(path, trans, rect, minpos, ignore):
...

@ -0,0 +1,52 @@
"""
This type stub file was generated by pyright.
"""
from collections import OrderedDict
from matplotlib.backend_bases import FigureManagerBase
from matplotlib.figure import Figure
class Gcf:
figs: OrderedDict[int, FigureManagerBase]
@classmethod
def get_fig_manager(cls, num: int) -> FigureManagerBase | None:
...
@classmethod
def destroy(cls, num: int | FigureManagerBase) -> None:
...
@classmethod
def destroy_fig(cls, fig: Figure) -> None:
...
@classmethod
def destroy_all(cls) -> None:
...
@classmethod
def has_fignum(cls, num: int) -> bool:
...
@classmethod
def get_all_fig_managers(cls) -> list[FigureManagerBase]:
...
@classmethod
def get_num_fig_managers(cls) -> int:
...
@classmethod
def get_active(cls) -> FigureManagerBase | None:
...
@classmethod
def set_active(cls, manager: FigureManagerBase) -> None:
...
@classmethod
def draw_all(cls, force: bool = ...) -> None:
...

@ -0,0 +1,4 @@
"""
This type stub file was generated by pyright.
"""

@ -0,0 +1,33 @@
"""
This type stub file was generated by pyright.
"""
"""
Low-level text helper utilities.
"""
LayoutItem = ...
def warn_on_missing_glyph(codepoint): # -> None:
...
def layout(string, font, *, kern_mode=...): # -> Generator[Any, Any, None]:
"""
Render *string* with *font*. For each character in *string*, yield a
(glyph-index, x-position) pair. When such a pair is yielded, the font's
glyph is set to the corresponding character.
Parameters
----------
string : str
The string to be rendered.
font : FT2Font
The font.
kern_mode : int
A FreeType kerning mode.
Yields
------
glyph_index : int
x_position : float
"""
...

@ -0,0 +1,27 @@
"""
This type stub file was generated by pyright.
"""
"""
Helper module for the *bbox_inches* parameter in `.Figure.savefig`.
"""
def adjust_bbox(fig, bbox_inches, fixed_dpi=...): # -> () -> None:
"""
Temporarily adjust the figure so that only the specified area
(bbox_inches) is saved.
It modifies fig.bbox, fig.bbox_inches,
fig.transFigure._boxout, and fig.patch. While the figure size
changes, the scale of the original figure is conserved. A
function which restores the original values are returned.
"""
...
def process_figure_for_rasterizing(fig, bbox_inches_restore, fixed_dpi=...): # -> tuple[Unknown, () -> None]:
"""
A function that needs to be called when figure dpi changes during the
drawing (e.g., rasterizing). It recovers the bbox and re-adjust it with
the new dpi.
"""
...

@ -0,0 +1,56 @@
"""
This type stub file was generated by pyright.
"""
"""
Routines to adjust subplot params so that subplots are
nicely fit in the figure. In doing so, only axis labels, tick labels, axes
titles and offsetboxes that are anchored to axes are currently considered.
Internally, this module assumes that the margins (left margin, etc.) which are
differences between ``Axes.get_tightbbox`` and ``Axes.bbox`` are independent of
Axes position. This may fail if ``Axes.adjustable`` is ``datalim`` as well as
such cases as when left or right margin are affected by xlabel.
"""
def get_subplotspec_list(axes_list, grid_spec=...): # -> list[Unknown]:
"""
Return a list of subplotspec from the given list of axes.
For an instance of axes that does not support subplotspec, None is inserted
in the list.
If grid_spec is given, None is inserted for those not from the given
grid_spec.
"""
...
def get_tight_layout_figure(fig, axes_list, subplotspec_list, renderer, pad=..., h_pad=..., w_pad=..., rect=...): # -> dict[Unknown, Unknown]:
"""
Return subplot parameters for tight-layouted-figure with specified padding.
Parameters
----------
fig : Figure
axes_list : list of Axes
subplotspec_list : list of `.SubplotSpec`
The subplotspecs of each axes.
renderer : renderer
pad : float
Padding between the figure edge and the edges of subplots, as a
fraction of the font size.
h_pad, w_pad : float
Padding (height/width) between edges of adjacent subplots. Defaults to
*pad*.
rect : tuple (left, bottom, right, top), default: None.
rectangle in normalized figure coordinates
that the whole subplots area (including labels) will fit into.
Defaults to using the entire figure.
Returns
-------
subplotspec or None
subplotspec kwargs to be passed to `.Figure.subplots_adjust` or
None if tight_layout could not be accomplished.
"""
...

@ -0,0 +1,54 @@
"""
This type stub file was generated by pyright.
"""
from typing import Any
class TrapezoidMapTriFinder:
def __init__(self, *args, **kwargs) -> None:
...
def find_many(self, *args, **kwargs) -> Any:
...
def get_tree_stats(self, *args, **kwargs) -> Any:
...
def initialize(self, *args, **kwargs) -> Any:
...
def print_tree(self, *args, **kwargs) -> Any:
...
class TriContourGenerator:
def __init__(self, *args, **kwargs) -> None:
...
def create_contour(self, *args, **kwargs) -> Any:
...
def create_filled_contour(self, *args, **kwargs) -> Any:
...
class Triangulation:
def __init__(self, *args, **kwargs) -> None:
...
def calculate_plane_coefficients(self, *args, **kwargs) -> Any:
...
def get_edges(self, *args, **kwargs) -> Any:
...
def get_neighbors(self, *args, **kwargs) -> Any:
...
def set_mask(self, *args, **kwargs) -> Any:
...

@ -0,0 +1,4 @@
"""
This type stub file was generated by pyright.
"""

@ -0,0 +1,207 @@
"""
This type stub file was generated by pyright.
"""
import functools
"""
A class representing a Type 1 font.
This version reads pfa and pfb files and splits them for embedding in
pdf files. It also supports SlantFont and ExtendFont transformations,
similarly to pdfTeX and friends. There is no support yet for subsetting.
Usage::
font = Type1Font(filename)
clear_part, encrypted_part, finale = font.parts
slanted_font = font.transform({'slant': 0.167})
extended_font = font.transform({'extend': 1.2})
Sources:
* Adobe Technical Note #5040, Supporting Downloadable PostScript
Language Fonts.
* Adobe Type 1 Font Format, Adobe Systems Incorporated, third printing,
v1.1, 1993. ISBN 0-201-57044-0.
"""
_log = ...
class _Token:
"""
A token in a PostScript stream.
Attributes
----------
pos : int
Position, i.e. offset from the beginning of the data.
raw : str
Raw text of the token.
kind : str
Description of the token (for debugging or testing).
"""
__slots__ = ...
kind = ...
def __init__(self, pos, raw) -> None:
...
def __str__(self) -> str:
...
def endpos(self):
"""Position one past the end of the token"""
...
def is_keyword(self, *names): # -> Literal[False]:
"""Is this a name token with one of the names?"""
...
def is_slash_name(self): # -> Literal[False]:
"""Is this a name token that starts with a slash?"""
...
def is_delim(self): # -> Literal[False]:
"""Is this a delimiter token?"""
...
def is_number(self): # -> Literal[False]:
"""Is this a number token?"""
...
def value(self): # -> Unknown:
...
class _NameToken(_Token):
kind = ...
def is_slash_name(self):
...
def value(self):
...
class _BooleanToken(_Token):
kind = ...
def value(self):
...
class _KeywordToken(_Token):
kind = ...
def is_keyword(self, *names): # -> bool:
...
class _DelimiterToken(_Token):
kind = ...
def is_delim(self): # -> Literal[True]:
...
def opposite(self): # -> str:
...
class _WhitespaceToken(_Token):
kind = ...
class _StringToken(_Token):
kind = ...
_escapes_re = ...
_replacements = ...
_ws_re = ...
@functools.lru_cache
def value(self): # -> str | bytes:
...
class _BinaryToken(_Token):
kind = ...
def value(self):
...
class _NumberToken(_Token):
kind = ...
def is_number(self): # -> Literal[True]:
...
def value(self): # -> int | float:
...
class _BalancedExpression(_Token):
...
class Type1Font:
"""
A class representing a Type-1 font, for use by backends.
Attributes
----------
parts : tuple
A 3-tuple of the cleartext part, the encrypted part, and the finale of
zeros.
decrypted : bytes
The decrypted form of ``parts[1]``.
prop : dict[str, Any]
A dictionary of font properties. Noteworthy keys include:
- FontName: PostScript name of the font
- Encoding: dict from numeric codes to glyph names
- FontMatrix: bytes object encoding a matrix
- UniqueID: optional font identifier, dropped when modifying the font
- CharStrings: dict from glyph names to byte code
- Subrs: array of byte code subroutines
- OtherSubrs: bytes object encoding some PostScript code
"""
__slots__ = ...
def __init__(self, input) -> None:
"""
Initialize a Type-1 font.
Parameters
----------
input : str or 3-tuple
Either a pfb file name, or a 3-tuple of already-decoded Type-1
font `~.Type1Font.parts`.
"""
...
def transform(self, effects): # -> Type1Font:
"""
Return a new font that is slanted and/or extended.
Parameters
----------
effects : dict
A dict with optional entries:
- 'slant' : float, default: 0
Tangent of the angle that the font is to be slanted to the
right. Negative values slant to the left.
- 'extend' : float, default: 1
Scaling factor for the font width. Values less than 1 condense
the glyphs.
Returns
-------
`Type1Font`
"""
...
_StandardEncoding = ...

@ -0,0 +1,17 @@
"""
This type stub file was generated by pyright.
"""
from typing import Tuple, Union
TYPE_CHECKING = ...
if TYPE_CHECKING:
VERSION_TUPLE = Tuple[Union[int, str], ...]
else:
...
version: str
__version__: str
__version_tuple__: VERSION_TUPLE
version_tuple: VERSION_TUPLE
version = ...
version_tuple = ...

@ -0,0 +1,251 @@
"""
This type stub file was generated by pyright.
"""
import abc
import contextlib
from collections.abc import Callable, Collection, Generator, Iterable, Sequence
from pathlib import Path
from matplotlib.artist import Artist
from matplotlib.backend_bases import TimerBase
from matplotlib.figure import Figure
from typing import Any
subprocess_creation_flags: int
def adjusted_figsize(w: float, h: float, dpi: float, n: int) -> tuple[float, float]:
...
class MovieWriterRegistry:
def __init__(self) -> None:
...
def register(self, name: str) -> Callable[[type[AbstractMovieWriter]], type[AbstractMovieWriter]]:
...
def is_available(self, name: str) -> bool:
...
def __iter__(self) -> Generator[str, None, None]:
...
def list(self) -> list[str]:
...
def __getitem__(self, name: str) -> type[AbstractMovieWriter]:
...
writers: MovieWriterRegistry
class AbstractMovieWriter(abc.ABC, metaclass=abc.ABCMeta):
fps: int
metadata: dict[str, str]
codec: str
bitrate: int
def __init__(self, fps: int = ..., metadata: dict[str, str] | None = ..., codec: str | None = ..., bitrate: int | None = ...) -> None:
...
outfile: str | Path
fig: Figure
dpi: float
@abc.abstractmethod
def setup(self, fig: Figure, outfile: str | Path, dpi: float | None = ...) -> None:
...
@property
def frame_size(self) -> tuple[int, int]:
...
@abc.abstractmethod
def grab_frame(self, **savefig_kwargs) -> None:
...
@abc.abstractmethod
def finish(self) -> None:
...
@contextlib.contextmanager
def saving(self, fig: Figure, outfile: str | Path, dpi: float | None, *args, **kwargs) -> Generator[AbstractMovieWriter, None, None]:
...
class MovieWriter(AbstractMovieWriter):
supported_formats: list[str]
frame_format: str
extra_args: list[str] | None
def __init__(self, fps: int = ..., codec: str | None = ..., bitrate: int | None = ..., extra_args: list[str] | None = ..., metadata: dict[str, str] | None = ...) -> None:
...
def setup(self, fig: Figure, outfile: str | Path, dpi: float | None = ...) -> None:
...
def grab_frame(self, **savefig_kwargs) -> None:
...
def finish(self) -> None:
...
@classmethod
def bin_path(cls) -> str:
...
@classmethod
def isAvailable(cls) -> bool:
...
class FileMovieWriter(MovieWriter):
fig: Figure
outfile: str | Path
dpi: float
temp_prefix: str
fname_format_str: str
def setup(self, fig: Figure, outfile: str | Path, dpi: float | None = ..., frame_prefix: str | Path | None = ...) -> None:
...
def __del__(self) -> None:
...
@property
def frame_format(self) -> str:
...
@frame_format.setter
def frame_format(self, frame_format: str) -> None:
...
class PillowWriter(AbstractMovieWriter):
@classmethod
def isAvailable(cls) -> bool:
...
def setup(self, fig: Figure, outfile: str | Path, dpi: float | None = ...) -> None:
...
def grab_frame(self, **savefig_kwargs) -> None:
...
def finish(self) -> None:
...
class FFMpegBase:
codec: str
@property
def output_args(self) -> list[str]:
...
class FFMpegWriter(FFMpegBase, MovieWriter):
...
class FFMpegFileWriter(FFMpegBase, FileMovieWriter):
supported_formats: list[str]
...
class ImageMagickBase:
@classmethod
def bin_path(cls) -> str:
...
@classmethod
def isAvailable(cls) -> bool:
...
class ImageMagickWriter(ImageMagickBase, MovieWriter):
input_names: str
...
class ImageMagickFileWriter(ImageMagickBase, FileMovieWriter):
supported_formats: list[str]
@property
def input_names(self) -> str:
...
class HTMLWriter(FileMovieWriter):
supported_formats: list[str]
@classmethod
def isAvailable(cls) -> bool:
...
embed_frames: bool
default_mode: str
def __init__(self, fps: int = ..., codec: str | None = ..., bitrate: int | None = ..., extra_args: list[str] | None = ..., metadata: dict[str, str] | None = ..., embed_frames: bool = ..., default_mode: str = ..., embed_limit: float | None = ...) -> None:
...
def setup(self, fig: Figure, outfile: str | Path, dpi: float | None = ..., frame_dir: str | Path | None = ...) -> None:
...
def grab_frame(self, **savefig_kwargs):
...
def finish(self) -> None:
...
class Animation:
frame_seq: Iterable[Artist]
event_source: Any
def __init__(self, fig: Figure, event_source: Any | None = ..., blit: bool = ...) -> None:
...
def __del__(self) -> None:
...
def save(self, filename: str | Path, writer: AbstractMovieWriter | str | None = ..., fps: int | None = ..., dpi: float | None = ..., codec: str | None = ..., bitrate: int | None = ..., extra_args: list[str] | None = ..., metadata: dict[str, str] | None = ..., extra_anim: list[Animation] | None = ..., savefig_kwargs: dict[str, Any] | None = ..., *, progress_callback: Callable[[int, int], Any] | None = ...) -> None:
...
def new_frame_seq(self) -> Iterable[Artist]:
...
def new_saved_frame_seq(self) -> Iterable[Artist]:
...
def to_html5_video(self, embed_limit: float | None = ...) -> str:
...
def to_jshtml(self, fps: int | None = ..., embed_frames: bool = ..., default_mode: str | None = ...) -> str:
...
def pause(self) -> None:
...
def resume(self) -> None:
...
class TimedAnimation(Animation):
repeat: bool
def __init__(self, fig: Figure, interval: int = ..., repeat_delay: int = ..., repeat: bool = ..., event_source: TimerBase | None = ..., *args, **kwargs) -> None:
...
class ArtistAnimation(TimedAnimation):
def __init__(self, fig: Figure, artists: Sequence[Collection[Artist]], *args, **kwargs) -> None:
...
class FuncAnimation(TimedAnimation):
save_count: int
def __init__(self, fig: Figure, func: Callable[..., Iterable[Artist]], frames: Iterable[Artist] | int | Callable[[], Generator] | None = ..., init_func: Callable[[], Iterable[Artist]] | None = ..., fargs: tuple[Any, ...] | None = ..., save_count: int | None = ..., *, cache_frame_data: bool = ..., **kwargs) -> None:
...

@ -0,0 +1,320 @@
"""
This type stub file was generated by pyright.
"""
import numpy as np
from .axes._base import _AxesBase
from .backend_bases import MouseEvent, RendererBase
from .figure import Figure, SubFigure
from .path import Path
from .patches import Patch
from .patheffects import AbstractPathEffect
from .transforms import Bbox, BboxBase, Transform, TransformedPatchPath, TransformedPath
from collections.abc import Callable, Iterable
from typing import Any, NamedTuple, TextIO, overload
from numpy.typing import ArrayLike
def allow_rasterization(draw):
...
class _XYPair(NamedTuple):
x: ArrayLike
y: ArrayLike
...
class _Unset:
...
class Artist:
zorder: float
stale_callback: Callable[[Artist, bool], None] | None
figure: Figure | SubFigure | None
clipbox: BboxBase | None
def __init__(self) -> None:
...
def remove(self) -> None:
...
def have_units(self) -> bool:
...
def convert_xunits(self, x):
...
def convert_yunits(self, y):
...
@property
def axes(self) -> _AxesBase | None:
...
@axes.setter
def axes(self, new_axes: _AxesBase | None) -> None:
...
@property
def stale(self) -> bool:
...
@stale.setter
def stale(self, val: bool) -> None:
...
def get_window_extent(self, renderer: RendererBase | None = ...) -> Bbox:
...
def get_tightbbox(self, renderer: RendererBase | None = ...) -> Bbox | None:
...
def add_callback(self, func: Callable[[Artist], Any]) -> int:
...
def remove_callback(self, oid: int) -> None:
...
def pchanged(self) -> None:
...
def is_transform_set(self) -> bool:
...
def set_transform(self, t: Transform | None) -> None:
...
def get_transform(self) -> Transform:
...
def get_children(self) -> list[Artist]:
...
def contains(self, mouseevent: MouseEvent) -> tuple[bool, dict[Any, Any]]:
...
def pickable(self) -> bool:
...
def pick(self, mouseevent: MouseEvent) -> None:
...
def set_picker(self, picker: None | bool | float | Callable[[Artist, MouseEvent], tuple[bool, dict[Any, Any]]]) -> None:
...
def get_picker(self) -> None | bool | float | Callable[[Artist, MouseEvent], tuple[bool, dict[Any, Any]]]:
...
def get_url(self) -> str | None:
...
def set_url(self, url: str | None) -> None:
...
def get_gid(self) -> str | None:
...
def set_gid(self, gid: str | None) -> None:
...
def get_snap(self) -> bool | None:
...
def set_snap(self, snap: bool | None) -> None:
...
def get_sketch_params(self) -> tuple[float, float, float] | None:
...
def set_sketch_params(self, scale: float | None = ..., length: float | None = ..., randomness: float | None = ...) -> None:
...
def set_path_effects(self, path_effects: list[AbstractPathEffect]) -> None:
...
def get_path_effects(self) -> list[AbstractPathEffect]:
...
def get_figure(self) -> Figure | None:
...
def set_figure(self, fig: Figure) -> None:
...
def set_clip_box(self, clipbox: BboxBase | None) -> None:
...
def set_clip_path(self, path: Patch | Path | TransformedPath | TransformedPatchPath | None, transform: Transform | None = ...) -> None:
...
def get_alpha(self) -> float | None:
...
def get_visible(self) -> bool:
...
def get_animated(self) -> bool:
...
def get_in_layout(self) -> bool:
...
def get_clip_on(self) -> bool:
...
def get_clip_box(self) -> Bbox | None:
...
def get_clip_path(self) -> Patch | Path | TransformedPath | TransformedPatchPath | None:
...
def get_transformed_clip_path_and_affine(self) -> tuple[None, None] | tuple[Path, Transform]:
...
def set_clip_on(self, b: bool) -> None:
...
def get_rasterized(self) -> bool:
...
def set_rasterized(self, rasterized: bool) -> None:
...
def get_agg_filter(self) -> Callable[[ArrayLike, float], tuple[np.ndarray, float, float]] | None:
...
def set_agg_filter(self, filter_func: Callable[[ArrayLike, float], tuple[np.ndarray, float, float]] | None) -> None:
...
def draw(self, renderer: RendererBase) -> None:
...
def set_alpha(self, alpha: float | None) -> None:
...
def set_visible(self, b: bool) -> None:
...
def set_animated(self, b: bool) -> None:
...
def set_in_layout(self, in_layout: bool) -> None:
...
def get_label(self) -> object:
...
def set_label(self, s: object) -> None:
...
def get_zorder(self) -> float:
...
def set_zorder(self, level: float) -> None:
...
@property
def sticky_edges(self) -> _XYPair:
...
def update_from(self, other: Artist) -> None:
...
def properties(self) -> dict[str, Any]:
...
def update(self, props: dict[str, Any]) -> list[Any]:
...
def set(self, **kwargs: Any) -> list[Any]:
...
def findobj(self, match: None | Callable[[Artist], bool] | type[Artist] = ..., include_self: bool = ...) -> list[Artist]:
...
def get_cursor_data(self, event: MouseEvent) -> Any:
...
def format_cursor_data(self, data: Any) -> str:
...
def get_mouseover(self) -> bool:
...
def set_mouseover(self, mouseover: bool) -> None:
...
@property
def mouseover(self) -> bool:
...
@mouseover.setter
def mouseover(self, mouseover: bool) -> None:
...
class ArtistInspector:
oorig: Artist | type[Artist]
o: type[Artist]
aliasd: dict[str, set[str]]
def __init__(self, o: Artist | type[Artist] | Iterable[Artist | type[Artist]]) -> None:
...
def get_aliases(self) -> dict[str, set[str]]:
...
def get_valid_values(self, attr: str) -> str | None:
...
def get_setters(self) -> list[str]:
...
@staticmethod
def number_of_parameters(func: Callable) -> int:
...
@staticmethod
def is_alias(method: Callable) -> bool:
...
def aliased_name(self, s: str) -> str:
...
def aliased_name_rest(self, s: str, target: str) -> str:
...
@overload
def pprint_setters(self, prop: None = ..., leadingspace: int = ...) -> list[str]:
...
@overload
def pprint_setters(self, prop: str, leadingspace: int = ...) -> str:
...
@overload
def pprint_setters_rest(self, prop: None = ..., leadingspace: int = ...) -> list[str]:
...
@overload
def pprint_setters_rest(self, prop: str, leadingspace: int = ...) -> str:
...
def properties(self) -> dict[str, Any]:
...
def pprint_getters(self) -> list[str]:
...
def getp(obj: Artist, property: str | None = ...) -> Any:
...
get = ...
def setp(obj: Artist, *args, file: TextIO | None = ..., **kwargs) -> list[Any] | None:
...
def kwdoc(artist: Artist | type[Artist] | Iterable[Artist | type[Artist]]) -> str:
...

@ -0,0 +1,22 @@
"""
This type stub file was generated by pyright.
"""
from typing import TypeVar
from ._axes import *
from ._axes import Axes as Subplot
_T = TypeVar("_T")
class _SubplotBaseMeta(type):
def __instancecheck__(self, obj) -> bool:
...
class SubplotBase(metaclass=_SubplotBaseMeta):
...
def subplot_class_factory(cls: type[_T]) -> type[_T]:
...

@ -0,0 +1,258 @@
"""
This type stub file was generated by pyright.
"""
import datetime
import PIL.Image
import numpy as np
from matplotlib.axes._base import _AxesBase
from matplotlib.axes._secondary_axes import SecondaryAxis
from matplotlib.artist import Artist
from matplotlib.backend_bases import RendererBase
from matplotlib.collections import BrokenBarHCollection, Collection, EventCollection, LineCollection, PathCollection, PolyCollection, QuadMesh
from matplotlib.colors import Colormap, Normalize
from matplotlib.container import BarContainer, ErrorbarContainer, StemContainer
from matplotlib.contour import ContourSet, QuadContourSet
from matplotlib.image import AxesImage, PcolorImage
from matplotlib.legend import Legend
from matplotlib.legend_handler import HandlerBase
from matplotlib.lines import Line2D
from matplotlib.mlab import GaussianKDE
from matplotlib.patches import FancyArrow, Polygon, Rectangle, StepPatch, Wedge
from matplotlib.quiver import Barbs, Quiver, QuiverKey
from matplotlib.text import Annotation, Text
from matplotlib.transforms import Bbox, Transform
from collections.abc import Callable, Sequence
from typing import Any, Literal, overload
from numpy.typing import ArrayLike
from matplotlib.typing import ColorType, LineStyleType, MarkerType
class Axes(_AxesBase):
def get_title(self, loc: Literal["left", "center", "right"] = ...) -> str:
...
def set_title(self, label: str, fontdict: dict[str, Any] | None = ..., loc: Literal["left", "center", "right"] | None = ..., pad: float | None = ..., *, y: float | None = ..., **kwargs) -> Text:
...
def get_legend_handles_labels(self, legend_handler_map: dict[type, HandlerBase] | None = ...) -> tuple[list[Artist], list[Any]]:
...
legend_: Legend | None
@overload
def legend(self) -> Legend:
...
@overload
def legend(self, handles: Sequence[Artist | tuple[Artist, ...]], labels: Sequence[str], **kwargs) -> Legend:
...
@overload
def legend(self, *, handles: Sequence[Artist | tuple[Artist, ...]], **kwargs) -> Legend:
...
@overload
def legend(self, labels: Sequence[str], **kwargs) -> Legend:
...
@overload
def legend(self, **kwargs) -> Legend:
...
def inset_axes(self, bounds: tuple[float, float, float, float], *, transform: Transform | None = ..., zorder: float = ..., **kwargs) -> Axes:
...
def indicate_inset(self, bounds: tuple[float, float, float, float], inset_ax: Axes | None = ..., *, transform: Transform | None = ..., facecolor: ColorType = ..., edgecolor: ColorType = ..., alpha: float = ..., zorder: float = ..., **kwargs) -> Rectangle:
...
def indicate_inset_zoom(self, inset_ax: Axes, **kwargs) -> Rectangle:
...
def secondary_xaxis(self, location: Literal["top", "bottom"] | float, *, functions: tuple[Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]] | Transform | None = ..., **kwargs) -> SecondaryAxis:
...
def secondary_yaxis(self, location: Literal["left", "right"] | float, *, functions: tuple[Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]] | Transform | None = ..., **kwargs) -> SecondaryAxis:
...
def text(self, x: float, y: float, s: str, fontdict: dict[str, Any] | None = ..., **kwargs) -> Text:
...
def annotate(self, text: str, xy: tuple[float, float], xytext: tuple[float, float] | None = ..., xycoords: str | Artist | Transform | Callable[[RendererBase], Bbox | Transform] | tuple[float, float] = ..., textcoords: str | Artist | Transform | Callable[[RendererBase], Bbox | Transform] | tuple[float, float] | None = ..., arrowprops: dict[str, Any] | None = ..., annotation_clip: bool | None = ..., **kwargs) -> Annotation:
...
def axhline(self, y: float = ..., xmin: float = ..., xmax: float = ..., **kwargs) -> Line2D:
...
def axvline(self, x: float = ..., ymin: float = ..., ymax: float = ..., **kwargs) -> Line2D:
...
def axline(self, xy1: tuple[float, float], xy2: tuple[float, float] | None = ..., *, slope: float | None = ..., **kwargs) -> Line2D:
...
def axhspan(self, ymin: float, ymax: float, xmin: float = ..., xmax: float = ..., **kwargs) -> Polygon:
...
def axvspan(self, xmin: float, xmax: float, ymin: float = ..., ymax: float = ..., **kwargs) -> Polygon:
...
def hlines(self, y: float | ArrayLike, xmin: float | ArrayLike, xmax: float | ArrayLike, colors: ColorType | Sequence[ColorType] | None = ..., linestyles: LineStyleType = ..., label: str = ..., *, data=..., **kwargs) -> LineCollection:
...
def vlines(self, x: float | ArrayLike, ymin: float | ArrayLike, ymax: float | ArrayLike, colors: ColorType | Sequence[ColorType] | None = ..., linestyles: LineStyleType = ..., label: str = ..., *, data=..., **kwargs) -> LineCollection:
...
def eventplot(self, positions: ArrayLike | Sequence[ArrayLike], orientation: Literal["horizontal", "vertical"] = ..., lineoffsets: float | Sequence[float] = ..., linelengths: float | Sequence[float] = ..., linewidths: float | Sequence[float] | None = ..., colors: ColorType | Sequence[ColorType] | None = ..., alpha: float | Sequence[float] | None = ..., linestyles: LineStyleType | Sequence[LineStyleType] = ..., *, data=..., **kwargs) -> EventCollection:
...
def plot(self, *args: float | ArrayLike | str, scalex: bool = ..., scaley: bool = ..., data=..., **kwargs) -> list[Line2D]:
...
def plot_date(self, x: ArrayLike, y: ArrayLike, fmt: str = ..., tz: str | datetime.tzinfo | None = ..., xdate: bool = ..., ydate: bool = ..., *, data=..., **kwargs) -> list[Line2D]:
...
def loglog(self, *args, **kwargs) -> list[Line2D]:
...
def semilogx(self, *args, **kwargs) -> list[Line2D]:
...
def semilogy(self, *args, **kwargs) -> list[Line2D]:
...
def acorr(self, x: ArrayLike, *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, LineCollection | Line2D, Line2D | None]:
...
def xcorr(self, x: ArrayLike, y: ArrayLike, normed: bool = ..., detrend: Callable[[ArrayLike], ArrayLike] = ..., usevlines: bool = ..., maxlags: int = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, LineCollection | Line2D, Line2D | None]:
...
def step(self, x: ArrayLike, y: ArrayLike, *args, where: Literal["pre", "post", "mid"] = ..., data=..., **kwargs) -> list[Line2D]:
...
def bar(self, x: float | ArrayLike, height: float | ArrayLike, width: float | ArrayLike = ..., bottom: float | ArrayLike | None = ..., *, align: Literal["center", "edge"] = ..., data=..., **kwargs) -> BarContainer:
...
def barh(self, y: float | ArrayLike, width: float | ArrayLike, height: float | ArrayLike = ..., left: float | ArrayLike | None = ..., *, align: Literal["center", "edge"] = ..., data=..., **kwargs) -> BarContainer:
...
def bar_label(self, container: BarContainer, labels: ArrayLike | None = ..., *, fmt: str | Callable[[float], str] = ..., label_type: Literal["center", "edge"] = ..., padding: float = ..., **kwargs) -> list[Annotation]:
...
def broken_barh(self, xranges: Sequence[tuple[float, float]], yrange: tuple[float, float], *, data=..., **kwargs) -> BrokenBarHCollection:
...
def stem(self, *args: ArrayLike | str, linefmt: str | None = ..., markerfmt: str | None = ..., basefmt: str | None = ..., bottom: float = ..., label: str | None = ..., orientation: Literal["vertical", "horizontal"] = ..., data=...) -> StemContainer:
...
def pie(self, x: ArrayLike, explode: ArrayLike | None = ..., labels: Sequence[str] | None = ..., colors: ColorType | Sequence[ColorType] | None = ..., autopct: str | Callable[[float], str] | None = ..., pctdistance: float = ..., shadow: bool = ..., labeldistance: float | None = ..., startangle: float = ..., radius: float = ..., counterclock: bool = ..., wedgeprops: dict[str, Any] | None = ..., textprops: dict[str, Any] | None = ..., center: tuple[float, float] = ..., frame: bool = ..., rotatelabels: bool = ..., *, normalize: bool = ..., hatch: str | Sequence[str] | None = ..., data=...) -> tuple[list[Wedge], list[Text]] | tuple[list[Wedge], list[Text], list[Text]]:
...
def errorbar(self, x: float | ArrayLike, y: float | ArrayLike, yerr: float | ArrayLike | None = ..., xerr: float | ArrayLike | None = ..., fmt: str = ..., ecolor: ColorType | None = ..., elinewidth: float | None = ..., capsize: float | None = ..., barsabove: bool = ..., lolims: bool | ArrayLike = ..., uplims: bool | ArrayLike = ..., xlolims: bool | ArrayLike = ..., xuplims: bool | ArrayLike = ..., errorevery: int | tuple[int, int] = ..., capthick: float | None = ..., *, data=..., **kwargs) -> ErrorbarContainer:
...
def boxplot(self, x: ArrayLike | Sequence[ArrayLike], notch: bool | None = ..., sym: str | None = ..., vert: bool | None = ..., whis: float | tuple[float, float] | None = ..., positions: ArrayLike | None = ..., widths: float | ArrayLike | None = ..., patch_artist: bool | None = ..., bootstrap: int | None = ..., usermedians: ArrayLike | None = ..., conf_intervals: ArrayLike | None = ..., meanline: bool | None = ..., showmeans: bool | None = ..., showcaps: bool | None = ..., showbox: bool | None = ..., showfliers: bool | None = ..., boxprops: dict[str, Any] | None = ..., labels: Sequence[str] | None = ..., flierprops: dict[str, Any] | None = ..., medianprops: dict[str, Any] | None = ..., meanprops: dict[str, Any] | None = ..., capprops: dict[str, Any] | None = ..., whiskerprops: dict[str, Any] | None = ..., manage_ticks: bool = ..., autorange: bool = ..., zorder: float | None = ..., capwidths: float | ArrayLike | None = ..., *, data=...) -> dict[str, Any]:
...
def bxp(self, bxpstats: Sequence[dict[str, Any]], positions: ArrayLike | None = ..., widths: float | ArrayLike | None = ..., vert: bool = ..., patch_artist: bool = ..., shownotches: bool = ..., showmeans: bool = ..., showcaps: bool = ..., showbox: bool = ..., showfliers: bool = ..., boxprops: dict[str, Any] | None = ..., whiskerprops: dict[str, Any] | None = ..., flierprops: dict[str, Any] | None = ..., medianprops: dict[str, Any] | None = ..., capprops: dict[str, Any] | None = ..., meanprops: dict[str, Any] | None = ..., meanline: bool = ..., manage_ticks: bool = ..., zorder: float | None = ..., capwidths: float | ArrayLike | None = ...) -> dict[str, Any]:
...
def scatter(self, x: float | ArrayLike, y: float | ArrayLike, s: float | ArrayLike | None = ..., c: Sequence[ColorType] | ColorType | None = ..., marker: MarkerType | None = ..., cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., vmin: float | None = ..., vmax: float | None = ..., alpha: float | None = ..., linewidths: float | Sequence[float] | None = ..., *, edgecolors: Literal["face", "none"] | ColorType | Sequence[ColorType] | None = ..., plotnonfinite: bool = ..., data=..., **kwargs) -> PathCollection:
...
def hexbin(self, x: ArrayLike, y: ArrayLike, C: ArrayLike | None = ..., gridsize: int | tuple[int, int] = ..., bins: Literal["log"] | int | Sequence[float] | None = ..., xscale: Literal["linear", "log"] = ..., yscale: Literal["linear", "log"] = ..., extent: tuple[float, float, float, float] | None = ..., cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., vmin: float | None = ..., vmax: float | None = ..., alpha: float | None = ..., linewidths: float | None = ..., edgecolors: Literal["face", "none"] | ColorType = ..., reduce_C_function: Callable[[np.ndarray | list[float]], float] = ..., mincnt: int | None = ..., marginals: bool = ..., *, data=..., **kwargs) -> PolyCollection:
...
def arrow(self, x: float, y: float, dx: float, dy: float, **kwargs) -> FancyArrow:
...
def quiverkey(self, Q: Quiver, X: float, Y: float, U: float, label: str, **kwargs) -> QuiverKey:
...
def quiver(self, *args, data=..., **kwargs) -> Quiver:
...
def barbs(self, *args, data=..., **kwargs) -> Barbs:
...
def fill(self, *args, data=..., **kwargs) -> list[Polygon]:
...
def fill_between(self, x: ArrayLike, y1: ArrayLike | float, y2: ArrayLike | float = ..., where: Sequence[bool] | None = ..., interpolate: bool = ..., step: Literal["pre", "post", "mid"] | None = ..., *, data=..., **kwargs) -> PolyCollection:
...
def fill_betweenx(self, y: ArrayLike, x1: ArrayLike | float, x2: ArrayLike | float = ..., where: Sequence[bool] | None = ..., step: Literal["pre", "post", "mid"] | None = ..., interpolate: bool = ..., *, data=..., **kwargs) -> PolyCollection:
...
def imshow(self, X: ArrayLike | PIL.Image.Image, cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., *, aspect: Literal["equal", "auto"] | float | None = ..., interpolation: str | None = ..., alpha: float | ArrayLike | None = ..., vmin: float | None = ..., vmax: float | None = ..., origin: Literal["upper", "lower"] | None = ..., extent: tuple[float, float, float, float] | None = ..., interpolation_stage: Literal["data", "rgba"] | None = ..., filternorm: bool = ..., filterrad: float = ..., resample: bool | None = ..., url: str | None = ..., data=..., **kwargs) -> AxesImage:
...
def pcolor(self, *args: ArrayLike, shading: Literal["flat", "nearest", "auto"] | None = ..., alpha: float | None = ..., norm: str | Normalize | None = ..., cmap: str | Colormap | None = ..., vmin: float | None = ..., vmax: float | None = ..., data=..., **kwargs) -> Collection:
...
def pcolormesh(self, *args: ArrayLike, alpha: float | None = ..., norm: str | Normalize | None = ..., cmap: str | Colormap | None = ..., vmin: float | None = ..., vmax: float | None = ..., shading: Literal["flat", "nearest", "gouraud", "auto"] | None = ..., antialiased: bool = ..., data=..., **kwargs) -> QuadMesh:
...
def pcolorfast(self, *args: ArrayLike | tuple[float, float], alpha: float | None = ..., norm: str | Normalize | None = ..., cmap: str | Colormap | None = ..., vmin: float | None = ..., vmax: float | None = ..., data=..., **kwargs) -> AxesImage | PcolorImage | QuadMesh:
...
def contour(self, *args, data=..., **kwargs) -> QuadContourSet:
...
def contourf(self, *args, data=..., **kwargs) -> QuadContourSet:
...
def clabel(self, CS: ContourSet, levels: ArrayLike | None = ..., **kwargs) -> list[Text]:
...
def hist(self, x: ArrayLike | Sequence[ArrayLike], bins: int | Sequence[float] | str | None = ..., range: tuple[float, float] | None = ..., density: bool = ..., weights: ArrayLike | None = ..., cumulative: bool | float = ..., bottom: ArrayLike | float | None = ..., histtype: Literal["bar", "barstacked", "step", "stepfilled"] = ..., align: Literal["left", "mid", "right"] = ..., orientation: Literal["vertical", "horizontal"] = ..., rwidth: float | None = ..., log: bool = ..., color: ColorType | Sequence[ColorType] | None = ..., label: str | Sequence[str] | None = ..., stacked: bool = ..., *, data=..., **kwargs) -> tuple[np.ndarray | list[np.ndarray], np.ndarray, BarContainer | Polygon | list[BarContainer | Polygon],]:
...
def stairs(self, values: ArrayLike, edges: ArrayLike | None = ..., *, orientation: Literal["vertical", "horizontal"] = ..., baseline: float | ArrayLike | None = ..., fill: bool = ..., data=..., **kwargs) -> StepPatch:
...
def hist2d(self, x: ArrayLike, y: ArrayLike, bins: None | int | tuple[int, int] | ArrayLike | tuple[ArrayLike, ArrayLike] = ..., range: ArrayLike | None = ..., density: bool = ..., weights: ArrayLike | None = ..., cmin: float | None = ..., cmax: float | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, np.ndarray, QuadMesh]:
...
def ecdf(self, x: ArrayLike, weights: ArrayLike | None = ..., *, complementary: bool = ..., orientation: Literal["vertical", "horizonatal"] = ..., compress: bool = ..., data=..., **kwargs) -> Line2D:
...
def psd(self, x: ArrayLike, NFFT: int | None = ..., Fs: float | None = ..., Fc: int | None = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike], ArrayLike] | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., noverlap: int | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale_by_freq: bool | None = ..., return_line: bool | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray] | tuple[np.ndarray, np.ndarray, Line2D]:
...
def csd(self, x: ArrayLike, y: ArrayLike, NFFT: int | None = ..., Fs: float | None = ..., Fc: int | None = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike], ArrayLike] | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., noverlap: int | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale_by_freq: bool | None = ..., return_line: bool | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray] | tuple[np.ndarray, np.ndarray, Line2D]:
...
def magnitude_spectrum(self, x: ArrayLike, Fs: float | None = ..., Fc: int | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale: Literal["default", "linear", "dB"] | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, Line2D]:
...
def angle_spectrum(self, x: ArrayLike, Fs: float | None = ..., Fc: int | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, Line2D]:
...
def phase_spectrum(self, x: ArrayLike, Fs: float | None = ..., Fc: int | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, Line2D]:
...
def cohere(self, x: ArrayLike, y: ArrayLike, NFFT: int = ..., Fs: float = ..., Fc: int = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike], ArrayLike] = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike = ..., noverlap: int = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] = ..., scale_by_freq: bool | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray]:
...
def specgram(self, x: ArrayLike, NFFT: int | None = ..., Fs: float | None = ..., Fc: int | None = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike], ArrayLike] | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., noverlap: int | None = ..., cmap: str | Colormap | None = ..., xextent: tuple[float, float] | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale_by_freq: bool | None = ..., mode: Literal["default", "psd", "magnitude", "angle", "phase"] | None = ..., scale: Literal["default", "linear", "dB"] | None = ..., vmin: float | None = ..., vmax: float | None = ..., *, data=..., **kwargs) -> tuple[np.ndarray, np.ndarray, np.ndarray, AxesImage]:
...
def spy(self, Z: ArrayLike, precision: float | Literal["present"] = ..., marker: str | None = ..., markersize: float | None = ..., aspect: Literal["equal", "auto"] | float | None = ..., origin: Literal["upper", "lower"] = ..., **kwargs) -> AxesImage:
...
def matshow(self, Z: ArrayLike, **kwargs) -> AxesImage:
...
def violinplot(self, dataset: ArrayLike | Sequence[ArrayLike], positions: ArrayLike | None = ..., vert: bool = ..., widths: float | ArrayLike = ..., showmeans: bool = ..., showextrema: bool = ..., showmedians: bool = ..., quantiles: Sequence[float | Sequence[float]] | None = ..., points: int = ..., bw_method: Literal["scott", "silverman"] | float | Callable[[GaussianKDE], float] | None = ..., *, data=...) -> dict[str, Collection]:
...
def violin(self, vpstats: Sequence[dict[str, Any]], positions: ArrayLike | None = ..., vert: bool = ..., widths: float | ArrayLike = ..., showmeans: bool = ..., showextrema: bool = ..., showmedians: bool = ...) -> dict[str, Collection]:
...
table = ...
stackplot = ...
streamplot = ...
tricontour = ...
tricontourf = ...
tripcolor = ...
triplot = ...

@ -0,0 +1,570 @@
"""
This type stub file was generated by pyright.
"""
import matplotlib.artist as martist
import datetime
import numpy as np
from collections.abc import Callable, Iterable, Iterator, Sequence
from matplotlib import cbook
from matplotlib.artist import Artist
from matplotlib.axis import Tick, XAxis, YAxis
from matplotlib.backend_bases import MouseButton, MouseEvent, RendererBase
from matplotlib.container import Container
from matplotlib.collections import Collection
from matplotlib.legend import Legend
from matplotlib.lines import Line2D
from matplotlib.gridspec import GridSpec, SubplotSpec
from matplotlib.figure import Figure
from matplotlib.image import AxesImage
from matplotlib.patches import Patch
from matplotlib.scale import ScaleBase
from matplotlib.spines import Spines
from matplotlib.table import Table
from matplotlib.text import Text
from matplotlib.transforms import Bbox, Transform
from cycler import Cycler
from numpy.typing import ArrayLike
from typing import Any, Literal, overload
from matplotlib.typing import ColorType
class _axis_method_wrapper:
attr_name: str
method_name: str
__doc__: str
def __init__(self, attr_name: str, method_name: str, *, doc_sub: dict[str, str] | None = ...) -> None:
...
def __set_name__(self, owner: Any, name: str) -> None:
...
class _AxesBase(martist.Artist):
name: str
patch: Patch
spines: Spines
fmt_xdata: Callable[[float], str] | None
fmt_ydata: Callable[[float], str] | None
xaxis: XAxis
yaxis: YAxis
bbox: Bbox
dataLim: Bbox
transAxes: Transform
transScale: Transform
transLimits: Transform
transData: Transform
ignore_existing_data_limits: bool
axison: bool
_projection_init: Any
def __init__(self, fig: Figure, *args: tuple[float, float, float, float] | Bbox | int, facecolor: ColorType | None = ..., frameon: bool = ..., sharex: _AxesBase | None = ..., sharey: _AxesBase | None = ..., label: Any = ..., xscale: str | ScaleBase | None = ..., yscale: str | ScaleBase | None = ..., box_aspect: float | None = ..., **kwargs) -> None:
...
def get_subplotspec(self) -> SubplotSpec | None:
...
def set_subplotspec(self, subplotspec: SubplotSpec) -> None:
...
def get_gridspec(self) -> GridSpec | None:
...
def set_figure(self, fig: Figure) -> None:
...
@property
def viewLim(self) -> Bbox:
...
def get_xaxis_transform(self, which: Literal["grid", "tick1", "tick2"] = ...) -> Transform:
...
def get_xaxis_text1_transform(self, pad_points: float) -> tuple[Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]:
...
def get_xaxis_text2_transform(self, pad_points) -> tuple[Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]:
...
def get_yaxis_transform(self, which: Literal["grid", "tick1", "tick2"] = ...) -> Transform:
...
def get_yaxis_text1_transform(self, pad_points) -> tuple[Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]:
...
def get_yaxis_text2_transform(self, pad_points) -> tuple[Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]:
...
def get_position(self, original: bool = ...) -> Bbox:
...
def set_position(self, pos: Bbox | tuple[float, float, float, float], which: Literal["both", "active", "original"] = ...) -> None:
...
def reset_position(self) -> None:
...
def set_axes_locator(self, locator: Callable[[_AxesBase, RendererBase], Bbox]) -> None:
...
def get_axes_locator(self) -> Callable[[_AxesBase, RendererBase], Bbox]:
...
def sharex(self, other: _AxesBase) -> None:
...
def sharey(self, other: _AxesBase) -> None:
...
def clear(self) -> None:
...
def cla(self) -> None:
...
class ArtistList(Sequence[Artist]):
def __init__(self, axes: _AxesBase, prop_name: str, valid_types: type | Iterable[type] | None = ..., invalid_types: type | Iterable[type] | None = ...) -> None:
...
def __len__(self) -> int:
...
def __iter__(self) -> Iterator[Artist]:
...
@overload
def __getitem__(self, key: int) -> Artist:
...
@overload
def __getitem__(self, key: slice) -> list[Artist]:
...
@overload
def __add__(self, other: _AxesBase.ArtistList) -> list[Artist]:
...
@overload
def __add__(self, other: list[Any]) -> list[Any]:
...
@overload
def __add__(self, other: tuple[Any]) -> tuple[Any]:
...
@overload
def __radd__(self, other: _AxesBase.ArtistList) -> list[Artist]:
...
@overload
def __radd__(self, other: list[Any]) -> list[Any]:
...
@overload
def __radd__(self, other: tuple[Any]) -> tuple[Any]:
...
@property
def artists(self) -> _AxesBase.ArtistList:
...
@property
def collections(self) -> _AxesBase.ArtistList:
...
@property
def images(self) -> _AxesBase.ArtistList:
...
@property
def lines(self) -> _AxesBase.ArtistList:
...
@property
def patches(self) -> _AxesBase.ArtistList:
...
@property
def tables(self) -> _AxesBase.ArtistList:
...
@property
def texts(self) -> _AxesBase.ArtistList:
...
def get_facecolor(self) -> ColorType:
...
def set_facecolor(self, color: ColorType | None) -> None:
...
@overload
def set_prop_cycle(self, cycler: Cycler) -> None:
...
@overload
def set_prop_cycle(self, label: str, values: Iterable[Any]) -> None:
...
@overload
def set_prop_cycle(self, **kwargs: Iterable[Any]) -> None:
...
def get_aspect(self) -> float | Literal["auto"]:
...
def set_aspect(self, aspect: float | Literal["auto", "equal"], adjustable: Literal["box", "datalim"] | None = ..., anchor: str | tuple[float, float] | None = ..., share: bool = ...) -> None:
...
def get_adjustable(self) -> Literal["box", "datalim"]:
...
def set_adjustable(self, adjustable: Literal["box", "datalim"], share: bool = ...) -> None:
...
def get_box_aspect(self) -> float | None:
...
def set_box_aspect(self, aspect: float | None = ...) -> None:
...
def get_anchor(self) -> str | tuple[float, float]:
...
def set_anchor(self, anchor: str | tuple[float, float], share: bool = ...) -> None:
...
def get_data_ratio(self) -> float:
...
def apply_aspect(self, position: Bbox | None = ...) -> None:
...
@overload
def axis(self, arg: tuple[float, float, float, float] | bool | str | None = ..., /, *, emit: bool = ...) -> tuple[float, float, float, float]:
...
@overload
def axis(self, *, emit: bool = ..., xmin: float | None = ..., xmax: float | None = ..., ymin: float | None = ..., ymax: float | None = ...) -> tuple[float, float, float, float]:
...
def get_legend(self) -> Legend:
...
def get_images(self) -> list[AxesImage]:
...
def get_lines(self) -> list[Line2D]:
...
def get_xaxis(self) -> XAxis:
...
def get_yaxis(self) -> YAxis:
...
def has_data(self) -> bool:
...
def add_artist(self, a: Artist) -> Artist:
...
def add_child_axes(self, ax: _AxesBase) -> _AxesBase:
...
def add_collection(self, collection: Collection, autolim: bool = ...) -> Collection:
...
def add_image(self, image: AxesImage) -> AxesImage:
...
def add_line(self, line: Line2D) -> Line2D:
...
def add_patch(self, p: Patch) -> Patch:
...
def add_table(self, tab: Table) -> Table:
...
def add_container(self, container: Container) -> Container:
...
def relim(self, visible_only: bool = ...) -> None:
...
def update_datalim(self, xys: ArrayLike, updatex: bool = ..., updatey: bool = ...) -> None:
...
def in_axes(self, mouseevent: MouseEvent) -> bool:
...
def get_autoscale_on(self) -> bool:
...
def set_autoscale_on(self, b: bool) -> None:
...
@property
def use_sticky_edges(self) -> bool:
...
@use_sticky_edges.setter
def use_sticky_edges(self, b: bool) -> None:
...
def set_xmargin(self, m: float) -> None:
...
def set_ymargin(self, m: float) -> None:
...
def margins(self, *margins: float, x: float | None = ..., y: float | None = ..., tight: bool | None = ...) -> tuple[float, float] | None:
...
def set_rasterization_zorder(self, z: float | None) -> None:
...
def get_rasterization_zorder(self) -> float | None:
...
def autoscale(self, enable: bool = ..., axis: Literal["both", "x", "y"] = ..., tight: bool | None = ...) -> None:
...
def autoscale_view(self, tight: bool | None = ..., scalex: bool = ..., scaley: bool = ...) -> None:
...
def draw_artist(self, a: Artist) -> None:
...
def redraw_in_frame(self) -> None:
...
def get_frame_on(self) -> bool:
...
def set_frame_on(self, b: bool) -> None:
...
def get_axisbelow(self) -> bool | Literal["line"]:
...
def set_axisbelow(self, b: bool | Literal["line"]) -> None:
...
def grid(self, visible: bool | None = ..., which: Literal["major", "minor", "both"] = ..., axis: Literal["both", "x", "y"] = ..., **kwargs) -> None:
...
def ticklabel_format(self, *, axis: Literal["both", "x", "y"] = ..., style: Literal["", "sci", "scientific", "plain"] = ..., scilimits: tuple[int, int] | None = ..., useOffset: bool | float | None = ..., useLocale: bool | None = ..., useMathText: bool | None = ...) -> None:
...
def locator_params(self, axis: Literal["both", "x", "y"] = ..., tight: bool | None = ..., **kwargs) -> None:
...
def tick_params(self, axis: Literal["both", "x", "y"] = ..., **kwargs) -> None:
...
def set_axis_off(self) -> None:
...
def set_axis_on(self) -> None:
...
def get_xlabel(self) -> str:
...
def set_xlabel(self, xlabel: str, fontdict: dict[str, Any] | None = ..., labelpad: float | None = ..., *, loc: Literal["left", "center", "right"] | None = ..., **kwargs) -> Text:
...
def invert_xaxis(self) -> None:
...
def get_xbound(self) -> tuple[float, float]:
...
def set_xbound(self, lower: float | None = ..., upper: float | None = ...) -> None:
...
def get_xlim(self) -> tuple[float, float]:
...
def set_xlim(self, left: float | tuple[float, float] | None = ..., right: float | None = ..., *, emit: bool = ..., auto: bool | None = ..., xmin: float | None = ..., xmax: float | None = ...) -> tuple[float, float]:
...
def get_ylabel(self) -> str:
...
def set_ylabel(self, ylabel: str, fontdict: dict[str, Any] | None = ..., labelpad: float | None = ..., *, loc: Literal["bottom", "center", "top"] | None = ..., **kwargs) -> Text:
...
def invert_yaxis(self) -> None:
...
def get_ybound(self) -> tuple[float, float]:
...
def set_ybound(self, lower: float | None = ..., upper: float | None = ...) -> None:
...
def get_ylim(self) -> tuple[float, float]:
...
def set_ylim(self, bottom: float | tuple[float, float] | None = ..., top: float | None = ..., *, emit: bool = ..., auto: bool | None = ..., ymin: float | None = ..., ymax: float | None = ...) -> tuple[float, float]:
...
def format_xdata(self, x: float) -> str:
...
def format_ydata(self, y: float) -> str:
...
def format_coord(self, x: float, y: float) -> str:
...
def minorticks_on(self) -> None:
...
def minorticks_off(self) -> None:
...
def can_zoom(self) -> bool:
...
def can_pan(self) -> bool:
...
def get_navigate(self) -> bool:
...
def set_navigate(self, b: bool) -> None:
...
def get_navigate_mode(self) -> Literal["PAN", "ZOOM"] | None:
...
def set_navigate_mode(self, b: Literal["PAN", "ZOOM"] | None) -> None:
...
def start_pan(self, x: float, y: float, button: MouseButton) -> None:
...
def end_pan(self) -> None:
...
def drag_pan(self, button: MouseButton, key: str | None, x: float, y: float) -> None:
...
def get_children(self) -> list[Artist]:
...
def contains_point(self, point: tuple[int, int]) -> bool:
...
def get_default_bbox_extra_artists(self) -> list[Artist]:
...
def get_tightbbox(self, renderer: RendererBase | None = ..., *, call_axes_locator: bool = ..., bbox_extra_artists: Sequence[Artist] | None = ..., for_layout_only: bool = ...) -> Bbox | None:
...
def twinx(self) -> _AxesBase:
...
def twiny(self) -> _AxesBase:
...
def get_shared_x_axes(self) -> cbook.GrouperView:
...
def get_shared_y_axes(self) -> cbook.GrouperView:
...
def label_outer(self, remove_inner_ticks: bool = ...) -> None:
...
def get_xgridlines(self) -> list[Line2D]:
...
def get_xticklines(self, minor: bool = ...) -> list[Line2D]:
...
def get_ygridlines(self) -> list[Line2D]:
...
def get_yticklines(self, minor: bool = ...) -> list[Line2D]:
...
def get_autoscalex_on(self) -> bool:
...
def get_autoscaley_on(self) -> bool:
...
def set_autoscalex_on(self, b: bool) -> None:
...
def set_autoscaley_on(self, b: bool) -> None:
...
def xaxis_inverted(self) -> bool:
...
def get_xscale(self) -> str:
...
def set_xscale(self, value: str | ScaleBase, **kwargs) -> None:
...
def get_xticks(self, *, minor: bool = ...) -> np.ndarray:
...
def set_xticks(self, ticks: ArrayLike, labels: Iterable[str] | None = ..., *, minor: bool = ..., **kwargs) -> list[Tick]:
...
def get_xmajorticklabels(self) -> list[Text]:
...
def get_xminorticklabels(self) -> list[Text]:
...
def get_xticklabels(self, minor: bool = ..., which: Literal["major", "minor", "both"] | None = ...) -> list[Text]:
...
def set_xticklabels(self, labels: Iterable[str | Text], *, minor: bool = ..., fontdict: dict[str, Any] | None = ..., **kwargs) -> list[Text]:
...
def yaxis_inverted(self) -> bool:
...
def get_yscale(self) -> str:
...
def set_yscale(self, value: str | ScaleBase, **kwargs) -> None:
...
def get_yticks(self, *, minor: bool = ...) -> np.ndarray:
...
def set_yticks(self, ticks: ArrayLike, labels: Iterable[str] | None = ..., *, minor: bool = ..., **kwargs) -> list[Tick]:
...
def get_ymajorticklabels(self) -> list[Text]:
...
def get_yminorticklabels(self) -> list[Text]:
...
def get_yticklabels(self, minor: bool = ..., which: Literal["major", "minor", "both"] | None = ...) -> list[Text]:
...
def set_yticklabels(self, labels: Iterable[str | Text], *, minor: bool = ..., fontdict: dict[str, Any] | None = ..., **kwargs) -> list[Text]:
...
def xaxis_date(self, tz: str | datetime.tzinfo | None = ...) -> None:
...
def yaxis_date(self, tz: str | datetime.tzinfo | None = ...) -> None:
...

@ -0,0 +1,36 @@
"""
This type stub file was generated by pyright.
"""
from matplotlib.axes._base import _AxesBase
from matplotlib.axis import Tick
from matplotlib.transforms import Transform
from collections.abc import Callable, Iterable
from typing import Literal
from numpy.typing import ArrayLike
from matplotlib.typing import ColorType
class SecondaryAxis(_AxesBase):
def __init__(self, parent: _AxesBase, orientation: Literal["x", "y"], location: Literal["top", "bottom", "right", "left"] | float, functions: tuple[Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]] | Transform, **kwargs) -> None:
...
def set_alignment(self, align: Literal["top", "bottom", "right", "left"]) -> None:
...
def set_location(self, location: Literal["top", "bottom", "right", "left"] | float) -> None:
...
def set_ticks(self, ticks: ArrayLike, labels: Iterable[str] | None = ..., *, minor: bool = ..., **kwargs) -> list[Tick]:
...
def set_functions(self, functions: tuple[Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]] | Transform) -> None:
...
def set_aspect(self, *args, **kwargs) -> None:
...
def set_color(self, color: ColorType) -> None:
...

@ -0,0 +1,433 @@
"""
This type stub file was generated by pyright.
"""
import datetime
import numpy as np
import matplotlib.artist as martist
from collections.abc import Callable, Iterable, Sequence
from typing import Any, Literal, overload
from numpy.typing import ArrayLike
from matplotlib import cbook
from matplotlib.axes import Axes
from matplotlib.backend_bases import RendererBase
from matplotlib.lines import Line2D
from matplotlib.text import Text
from matplotlib.ticker import Formatter, Locator
from matplotlib.transforms import Bbox, Transform
from matplotlib.typing import ColorType
GRIDLINE_INTERPOLATION_STEPS: int
class Tick(martist.Artist):
axes: Axes
tick1line: Line2D
tick2line: Line2D
gridline: Line2D
label1: Text
label2: Text
def __init__(self, axes: Axes, loc: float, *, size: float | None = ..., width: float | None = ..., color: ColorType | None = ..., tickdir: Literal["in", "inout", "out"] | None = ..., pad: float | None = ..., labelsize: float | None = ..., labelcolor: ColorType | None = ..., labelfontfamily: str | Sequence[str] | None = ..., zorder: float | None = ..., gridOn: bool | None = ..., tick1On: bool = ..., tick2On: bool = ..., label1On: bool = ..., label2On: bool = ..., major: bool = ..., labelrotation: float = ..., grid_color: ColorType | None = ..., grid_linestyle: str | None = ..., grid_linewidth: float | None = ..., grid_alpha: float | None = ..., **kwargs) -> None:
...
def get_tickdir(self) -> Literal["in", "inout", "out"]:
...
def get_tick_padding(self) -> float:
...
def get_children(self) -> list[martist.Artist]:
...
stale: bool
def set_pad(self, val: float) -> None:
...
def get_pad(self) -> None:
...
def get_loc(self) -> float:
...
def set_label1(self, s: object) -> None:
...
def set_label(self, s: object) -> None:
...
def set_label2(self, s: object) -> None:
...
def set_url(self, url: str | None) -> None:
...
def get_view_interval(self) -> ArrayLike:
...
def update_position(self, loc: float) -> None:
...
class XTick(Tick):
__name__: str
def __init__(self, *args, **kwargs) -> None:
...
stale: bool
def update_position(self, loc: float) -> None:
...
def get_view_interval(self) -> np.ndarray:
...
class YTick(Tick):
__name__: str
def __init__(self, *args, **kwargs) -> None:
...
stale: bool
def update_position(self, loc: float) -> None:
...
def get_view_interval(self) -> np.ndarray:
...
class Ticker:
def __init__(self) -> None:
...
@property
def locator(self) -> Locator | None:
...
@locator.setter
def locator(self, locator: Locator) -> None:
...
@property
def formatter(self) -> Formatter | None:
...
@formatter.setter
def formatter(self, formatter: Formatter) -> None:
...
class _LazyTickList:
def __init__(self, major: bool) -> None:
...
@overload
def __get__(self, instance: None, owner: None) -> _LazyTickList:
...
@overload
def __get__(self, instance: Axis, owner: type[Axis]) -> list[Tick]:
...
class Axis(martist.Artist):
OFFSETTEXTPAD: int
isDefault_label: bool
axes: Axes
major: Ticker
minor: Ticker
callbacks: cbook.CallbackRegistry
label: Text
offsetText: Text
labelpad: float
pickradius: float
def __init__(self, axes, *, pickradius: float = ..., clear: bool = ...) -> None:
...
@property
def isDefault_majloc(self) -> bool:
...
@isDefault_majloc.setter
def isDefault_majloc(self, value: bool) -> None:
...
@property
def isDefault_majfmt(self) -> bool:
...
@isDefault_majfmt.setter
def isDefault_majfmt(self, value: bool) -> None:
...
@property
def isDefault_minloc(self) -> bool:
...
@isDefault_minloc.setter
def isDefault_minloc(self, value: bool) -> None:
...
@property
def isDefault_minfmt(self) -> bool:
...
@isDefault_minfmt.setter
def isDefault_minfmt(self, value: bool) -> None:
...
majorTicks: _LazyTickList
minorTicks: _LazyTickList
def get_remove_overlapping_locs(self) -> bool:
...
def set_remove_overlapping_locs(self, val: bool) -> None:
...
@property
def remove_overlapping_locs(self) -> bool:
...
@remove_overlapping_locs.setter
def remove_overlapping_locs(self, val: bool) -> None:
...
stale: bool
def set_label_coords(self, x: float, y: float, transform: Transform | None = ...) -> None:
...
def get_transform(self) -> Transform:
...
def get_scale(self) -> str:
...
def limit_range_for_scale(self, vmin: float, vmax: float) -> tuple[float, float]:
...
def get_children(self) -> list[martist.Artist]:
...
converter: Any
units: Any
def clear(self) -> None:
...
def reset_ticks(self) -> None:
...
def set_tick_params(self, which: Literal["major", "minor", "both"] = ..., reset: bool = ..., **kwargs) -> None:
...
def get_tick_params(self, which: Literal["major", "minor"] = ...) -> dict[str, Any]:
...
def get_view_interval(self) -> tuple[float, float]:
...
def set_view_interval(self, vmin: float, vmax: float, ignore: bool = ...) -> None:
...
def get_data_interval(self) -> tuple[float, float]:
...
def set_data_interval(self, vmin: float, vmax: float, ignore: bool = ...) -> None:
...
def get_inverted(self) -> bool:
...
def set_inverted(self, inverted: bool) -> None:
...
def set_default_intervals(self) -> None:
...
def get_tightbbox(self, renderer: RendererBase | None = ..., *, for_layout_only: bool = ...) -> Bbox | None:
...
def get_tick_padding(self) -> float:
...
def get_gridlines(self) -> list[Line2D]:
...
def get_label(self) -> Text:
...
def get_offset_text(self) -> Text:
...
def get_pickradius(self) -> float:
...
def get_majorticklabels(self) -> list[Text]:
...
def get_minorticklabels(self) -> list[Text]:
...
def get_ticklabels(self, minor: bool = ..., which: Literal["major", "minor", "both"] | None = ...) -> list[Text]:
...
def get_majorticklines(self) -> list[Line2D]:
...
def get_minorticklines(self) -> list[Line2D]:
...
def get_ticklines(self, minor: bool = ...) -> list[Line2D]:
...
def get_majorticklocs(self) -> np.ndarray:
...
def get_minorticklocs(self) -> np.ndarray:
...
def get_ticklocs(self, *, minor: bool = ...) -> np.ndarray:
...
def get_ticks_direction(self, minor: bool = ...) -> np.ndarray:
...
def get_label_text(self) -> str:
...
def get_major_locator(self) -> Locator:
...
def get_minor_locator(self) -> Locator:
...
def get_major_formatter(self) -> Formatter:
...
def get_minor_formatter(self) -> Formatter:
...
def get_major_ticks(self, numticks: int | None = ...) -> list[Tick]:
...
def get_minor_ticks(self, numticks: int | None = ...) -> list[Tick]:
...
def grid(self, visible: bool | None = ..., which: Literal["major", "minor", "both"] = ..., **kwargs) -> None:
...
def update_units(self, data):
...
def have_units(self) -> bool:
...
def convert_units(self, x):
...
def set_units(self, u) -> None:
...
def get_units(self):
...
def set_label_text(self, label: str, fontdict: dict[str, Any] | None = ..., **kwargs) -> Text:
...
def set_major_formatter(self, formatter: Formatter | str | Callable[[float, float], str]) -> None:
...
def set_minor_formatter(self, formatter: Formatter | str | Callable[[float, float], str]) -> None:
...
def set_major_locator(self, locator: Locator) -> None:
...
def set_minor_locator(self, locator: Locator) -> None:
...
def set_pickradius(self, pickradius: float) -> None:
...
def set_ticklabels(self, labels: Iterable[str | Text], *, minor: bool = ..., fontdict: dict[str, Any] | None = ..., **kwargs) -> list[Text]:
...
def set_ticks(self, ticks: ArrayLike, labels: Iterable[str] | None = ..., *, minor: bool = ..., **kwargs) -> list[Tick]:
...
def axis_date(self, tz: str | datetime.tzinfo | None = ...) -> None:
...
def get_tick_space(self) -> int:
...
def get_label_position(self) -> Literal["top", "bottom"]:
...
def set_label_position(self, position: Literal["top", "bottom", "left", "right"]) -> None:
...
def get_minpos(self) -> float:
...
class XAxis(Axis):
__name__: str
axis_name: str
def __init__(self, *args, **kwargs) -> None:
...
label_position: Literal["bottom", "top"]
stale: bool
def set_label_position(self, position: Literal["bottom", "top"]) -> None:
...
def set_ticks_position(self, position: Literal["top", "bottom", "both", "default", "none"]) -> None:
...
def tick_top(self) -> None:
...
def tick_bottom(self) -> None:
...
def get_ticks_position(self) -> Literal["top", "bottom", "default", "unknown"]:
...
def get_tick_space(self) -> int:
...
class YAxis(Axis):
__name__: str
axis_name: str
def __init__(self, *args, **kwargs) -> None:
...
label_position: Literal["left", "right"]
stale: bool
def set_label_position(self, position: Literal["left", "right"]) -> None:
...
def set_offset_position(self, position: Literal["left", "right"]) -> None:
...
def set_ticks_position(self, position: Literal["left", "right", "both", "default", "none"]) -> None:
...
def tick_right(self) -> None:
...
def tick_left(self) -> None:
...
def get_ticks_position(self) -> Literal["left", "right", "default", "unknown"]:
...
def get_tick_space(self) -> int:
...

@ -0,0 +1,647 @@
"""
This type stub file was generated by pyright.
"""
import os
from enum import Enum, IntEnum
from matplotlib import _api, cbook, transforms, widgets
from matplotlib.artist import Artist
from matplotlib.axes import Axes
from matplotlib.backend_managers import ToolManager
from matplotlib.backend_tools import Cursors, ToolBase
from matplotlib.colorbar import Colorbar
from matplotlib.figure import Figure
from matplotlib.font_manager import FontProperties
from matplotlib.path import Path
from matplotlib.texmanager import TexManager
from matplotlib.text import Text
from matplotlib.transforms import Bbox, BboxBase, Transform, TransformedPath
from collections.abc import Callable, Iterable, Sequence
from typing import Any, IO, Literal, NamedTuple, TypeVar
from numpy.typing import ArrayLike
from .typing import CapStyleType, ColorType, JoinStyleType, LineStyleType
def register_backend(format: str, backend: str | type[FigureCanvasBase], description: str | None = ...) -> None:
...
def get_registered_canvas_class(format: str) -> type[FigureCanvasBase]:
...
class RendererBase:
def __init__(self) -> None:
...
def open_group(self, s: str, gid: str | None = ...) -> None:
...
def close_group(self, s: str) -> None:
...
def draw_path(self, gc: GraphicsContextBase, path: Path, transform: Transform, rgbFace: ColorType | None = ...) -> None:
...
def draw_markers(self, gc: GraphicsContextBase, marker_path: Path, marker_trans: Transform, path: Path, trans: Transform, rgbFace: ColorType | None = ...) -> None:
...
def draw_path_collection(self, gc: GraphicsContextBase, master_transform: Transform, paths: Sequence[Path], all_transforms: Sequence[ArrayLike], offsets: ArrayLike | Sequence[ArrayLike], offset_trans: Transform, facecolors: ColorType | Sequence[ColorType], edgecolors: ColorType | Sequence[ColorType], linewidths: float | Sequence[float], linestyles: LineStyleType | Sequence[LineStyleType], antialiaseds: bool | Sequence[bool], urls: str | Sequence[str], offset_position: Any) -> None:
...
def draw_quad_mesh(self, gc: GraphicsContextBase, master_transform: Transform, meshWidth, meshHeight, coordinates: ArrayLike, offsets: ArrayLike | Sequence[ArrayLike], offsetTrans: Transform, facecolors: Sequence[ColorType], antialiased: bool, edgecolors: Sequence[ColorType] | ColorType | None) -> None:
...
def draw_gouraud_triangle(self, gc: GraphicsContextBase, points: ArrayLike, colors: ArrayLike, transform: Transform) -> None:
...
def draw_gouraud_triangles(self, gc: GraphicsContextBase, triangles_array: ArrayLike, colors_array: ArrayLike, transform: Transform) -> None:
...
def get_image_magnification(self) -> float:
...
def draw_image(self, gc: GraphicsContextBase, x: float, y: float, im: ArrayLike, transform: transforms.Affine2DBase | None = ...) -> None:
...
def option_image_nocomposite(self) -> bool:
...
def option_scale_image(self) -> bool:
...
def draw_tex(self, gc: GraphicsContextBase, x: float, y: float, s: str, prop: FontProperties, angle: float, *, mtext: Text | None = ...) -> None:
...
def draw_text(self, gc: GraphicsContextBase, x: float, y: float, s: str, prop: FontProperties, angle: float, ismath: bool | Literal["TeX"] = ..., mtext: Text | None = ...) -> None:
...
def get_text_width_height_descent(self, s: str, prop: FontProperties, ismath: bool | Literal["TeX"]) -> tuple[float, float, float]:
...
def flipy(self) -> bool:
...
def get_canvas_width_height(self) -> tuple[float, float]:
...
def get_texmanager(self) -> TexManager:
...
def new_gc(self) -> GraphicsContextBase:
...
def points_to_pixels(self, points: ArrayLike) -> ArrayLike:
...
def start_rasterizing(self) -> None:
...
def stop_rasterizing(self) -> None:
...
def start_filter(self) -> None:
...
def stop_filter(self, filter_func) -> None:
...
class GraphicsContextBase:
def __init__(self) -> None:
...
def copy_properties(self, gc: GraphicsContextBase) -> None:
...
def restore(self) -> None:
...
def get_alpha(self) -> float:
...
def get_antialiased(self) -> int:
...
def get_capstyle(self) -> Literal["butt", "projecting", "round"]:
...
def get_clip_rectangle(self) -> Bbox | None:
...
def get_clip_path(self) -> tuple[TransformedPath, Transform] | tuple[None, None]:
...
def get_dashes(self) -> tuple[float, ArrayLike | None]:
...
def get_forced_alpha(self) -> bool:
...
def get_joinstyle(self) -> Literal["miter", "round", "bevel"]:
...
def get_linewidth(self) -> float:
...
def get_rgb(self) -> tuple[float, float, float, float]:
...
def get_url(self) -> str | None:
...
def get_gid(self) -> int | None:
...
def get_snap(self) -> bool | None:
...
def set_alpha(self, alpha: float) -> None:
...
def set_antialiased(self, b: bool) -> None:
...
def set_capstyle(self, cs: CapStyleType) -> None:
...
def set_clip_rectangle(self, rectangle: Bbox | None) -> None:
...
def set_clip_path(self, path: TransformedPath | None) -> None:
...
def set_dashes(self, dash_offset: float, dash_list: ArrayLike | None) -> None:
...
def set_foreground(self, fg: ColorType, isRGBA: bool = ...) -> None:
...
def set_joinstyle(self, js: JoinStyleType) -> None:
...
def set_linewidth(self, w: float) -> None:
...
def set_url(self, url: str | None) -> None:
...
def set_gid(self, id: int | None) -> None:
...
def set_snap(self, snap: bool | None) -> None:
...
def set_hatch(self, hatch: str | None) -> None:
...
def get_hatch(self) -> str | None:
...
def get_hatch_path(self, density: float = ...) -> Path:
...
def get_hatch_color(self) -> ColorType:
...
def set_hatch_color(self, hatch_color: ColorType) -> None:
...
def get_hatch_linewidth(self) -> float:
...
def get_sketch_params(self) -> tuple[float, float, float] | None:
...
def set_sketch_params(self, scale: float | None = ..., length: float | None = ..., randomness: float | None = ...) -> None:
...
class TimerBase:
callbacks: list[tuple[Callable, tuple, dict[str, Any]]]
def __init__(self, interval: int | None = ..., callbacks: list[tuple[Callable, tuple, dict[str, Any]]] | None = ...) -> None:
...
def __del__(self) -> None:
...
def start(self, interval: int | None = ...) -> None:
...
def stop(self) -> None:
...
@property
def interval(self) -> int:
...
@interval.setter
def interval(self, interval: int) -> None:
...
@property
def single_shot(self) -> bool:
...
@single_shot.setter
def single_shot(self, ss: bool) -> None:
...
def add_callback(self, func: Callable, *args, **kwargs) -> Callable:
...
def remove_callback(self, func: Callable, *args, **kwargs) -> None:
...
class Event:
name: str
canvas: FigureCanvasBase
def __init__(self, name: str, canvas: FigureCanvasBase, guiEvent: Any | None = ...) -> None:
...
@property
def guiEvent(self) -> Any:
...
class DrawEvent(Event):
renderer: RendererBase
def __init__(self, name: str, canvas: FigureCanvasBase, renderer: RendererBase) -> None:
...
class ResizeEvent(Event):
width: int
height: int
def __init__(self, name: str, canvas: FigureCanvasBase) -> None:
...
class CloseEvent(Event):
...
class LocationEvent(Event):
lastevent: Event | None
x: int
y: int
inaxes: Axes | None
xdata: float | None
ydata: float | None
def __init__(self, name: str, canvas: FigureCanvasBase, x: int, y: int, guiEvent: Any | None = ..., *, modifiers: Iterable[str] | None = ...) -> None:
...
class MouseButton(IntEnum):
LEFT: int
MIDDLE: int
RIGHT: int
BACK: int
FORWARD: int
...
class MouseEvent(LocationEvent):
button: MouseButton | Literal["up", "down"] | None
key: str | None
step: float
dblclick: bool
def __init__(self, name: str, canvas: FigureCanvasBase, x: int, y: int, button: MouseButton | Literal["up", "down"] | None = ..., key: str | None = ..., step: float = ..., dblclick: bool = ..., guiEvent: Any | None = ..., *, modifiers: Iterable[str] | None = ...) -> None:
...
class PickEvent(Event):
mouseevent: MouseEvent
artist: Artist
def __init__(self, name: str, canvas: FigureCanvasBase, mouseevent: MouseEvent, artist: Artist, guiEvent: Any | None = ..., **kwargs) -> None:
...
class KeyEvent(LocationEvent):
key: str | None
def __init__(self, name: str, canvas: FigureCanvasBase, key: str | None, x: int = ..., y: int = ..., guiEvent: Any | None = ...) -> None:
...
class FigureCanvasBase:
required_interactive_framework: str | None
@_api.classproperty
def manager_class(cls) -> type[FigureManagerBase]:
...
events: list[str]
fixed_dpi: None | float
filetypes: dict[str, str]
@_api.classproperty
def supports_blit(cls) -> bool:
...
figure: Figure
manager: None | FigureManagerBase
widgetlock: widgets.LockDraw
mouse_grabber: None | Axes
toolbar: None | NavigationToolbar2
def __init__(self, figure: Figure | None = ...) -> None:
...
@property
def callbacks(self) -> cbook.CallbackRegistry:
...
@property
def button_pick_id(self) -> int:
...
@property
def scroll_pick_id(self) -> int:
...
@classmethod
def new_manager(cls, figure: Figure, num: int | str) -> FigureManagerBase:
...
def is_saving(self) -> bool:
...
def blit(self, bbox: BboxBase | None = ...) -> None:
...
def inaxes(self, xy: tuple[float, float]) -> Axes | None:
...
def grab_mouse(self, ax: Axes) -> None:
...
def release_mouse(self, ax: Axes) -> None:
...
def set_cursor(self, cursor: Cursors) -> None:
...
def draw(self, *args, **kwargs) -> None:
...
def draw_idle(self, *args, **kwargs) -> None:
...
@property
def device_pixel_ratio(self) -> float:
...
def get_width_height(self, *, physical: bool = ...) -> tuple[int, int]:
...
@classmethod
def get_supported_filetypes(cls) -> dict[str, str]:
...
@classmethod
def get_supported_filetypes_grouped(cls) -> dict[str, list[str]]:
...
def print_figure(self, filename: str | os.PathLike | IO, dpi: float | None = ..., facecolor: ColorType | Literal["auto"] | None = ..., edgecolor: ColorType | Literal["auto"] | None = ..., orientation: str = ..., format: str | None = ..., *, bbox_inches: Literal["tight"] | Bbox | None = ..., pad_inches: float | None = ..., bbox_extra_artists: list[Artist] | None = ..., backend: str | None = ..., **kwargs) -> Any:
...
@classmethod
def get_default_filetype(cls) -> str:
...
def get_default_filename(self) -> str:
...
_T = TypeVar("_T", bound=FigureCanvasBase)
def switch_backends(self, FigureCanvasClass: type[_T]) -> _T:
...
def mpl_connect(self, s: str, func: Callable[[Event], Any]) -> int:
...
def mpl_disconnect(self, cid: int) -> None:
...
def new_timer(self, interval: int | None = ..., callbacks: list[tuple[Callable, tuple, dict[str, Any]]] | None = ...) -> TimerBase:
...
def flush_events(self) -> None:
...
def start_event_loop(self, timeout: float = ...) -> None:
...
def stop_event_loop(self) -> None:
...
def key_press_handler(event: KeyEvent, canvas: FigureCanvasBase | None = ..., toolbar: NavigationToolbar2 | None = ...) -> None:
...
def button_press_handler(event: MouseEvent, canvas: FigureCanvasBase | None = ..., toolbar: NavigationToolbar2 | None = ...) -> None:
...
class NonGuiException(Exception):
...
class FigureManagerBase:
canvas: FigureCanvasBase
num: int | str
key_press_handler_id: int | None
button_press_handler_id: int | None
toolmanager: ToolManager | None
toolbar: NavigationToolbar2 | ToolContainerBase | None
def __init__(self, canvas: FigureCanvasBase, num: int | str) -> None:
...
@classmethod
def create_with_canvas(cls, canvas_class: type[FigureCanvasBase], figure: Figure, num: int | str) -> FigureManagerBase:
...
@classmethod
def start_main_loop(cls) -> None:
...
@classmethod
def pyplot_show(cls, *, block: bool | None = ...) -> None:
...
def show(self) -> None:
...
def destroy(self) -> None:
...
def full_screen_toggle(self) -> None:
...
def resize(self, w: int, h: int) -> None:
...
def get_window_title(self) -> str:
...
def set_window_title(self, title: str) -> None:
...
cursors = Cursors
class _Mode(str, Enum):
NONE: str
PAN: str
ZOOM: str
...
class NavigationToolbar2:
toolitems: tuple[tuple[str, ...] | tuple[None, ...], ...]
canvas: FigureCanvasBase
mode: _Mode
def __init__(self, canvas: FigureCanvasBase) -> None:
...
def set_message(self, s: str) -> None:
...
def draw_rubberband(self, event: Event, x0: float, y0: float, x1: float, y1: float) -> None:
...
def remove_rubberband(self) -> None:
...
def home(self, *args) -> None:
...
def back(self, *args) -> None:
...
def forward(self, *args) -> None:
...
def mouse_move(self, event: MouseEvent) -> None:
...
def pan(self, *args) -> None:
...
class _PanInfo(NamedTuple):
button: MouseButton
axes: list[Axes]
cid: int
...
def press_pan(self, event: Event) -> None:
...
def drag_pan(self, event: Event) -> None:
...
def release_pan(self, event: Event) -> None:
...
def zoom(self, *args) -> None:
...
class _ZoomInfo(NamedTuple):
direction: Literal["in", "out"]
start_xy: tuple[float, float]
axes: list[Axes]
cid: int
cbar: Colorbar
...
def press_zoom(self, event: Event) -> None:
...
def drag_zoom(self, event: Event) -> None:
...
def release_zoom(self, event: Event) -> None:
...
def push_current(self) -> None:
...
subplot_tool: widgets.SubplotTool
def configure_subplots(self, *args):
...
def save_figure(self, *args) -> None:
...
def update(self) -> None:
...
def set_history_buttons(self) -> None:
...
class ToolContainerBase:
toolmanager: ToolManager
def __init__(self, toolmanager: ToolManager) -> None:
...
def add_tool(self, tool: ToolBase, group: str, position: int = ...) -> None:
...
def trigger_tool(self, name: str) -> None:
...
def add_toolitem(self, name: str, group: str, position: int, image: str, description: str, toggle: bool) -> None:
...
def toggle_toolitem(self, name: str, toggled: bool) -> None:
...
def remove_toolitem(self, name: str) -> None:
...
def set_message(self, s: str) -> None:
...
class _Backend:
backend_version: str
FigureCanvas: type[FigureCanvasBase] | None
FigureManager: type[FigureManagerBase]
mainloop: None | Callable[[], Any]
@classmethod
def new_figure_manager(cls, num: int | str, *args, **kwargs) -> FigureManagerBase:
...
@classmethod
def new_figure_manager_given_figure(cls, num: int | str, figure: Figure) -> FigureManagerBase:
...
@classmethod
def draw_if_interactive(cls) -> None:
...
@classmethod
def show(cls, *, block: bool | None = ...) -> None:
...
@staticmethod
def export(cls) -> type[_Backend]:
...
class ShowBase(_Backend):
def __call__(self, block: bool | None = ...) -> None:
...

@ -0,0 +1,95 @@
"""
This type stub file was generated by pyright.
"""
from matplotlib import backend_tools, widgets
from matplotlib.backend_bases import FigureCanvasBase
from matplotlib.figure import Figure
from collections.abc import Callable, Iterable
from typing import Any, TypeVar
class ToolEvent:
name: str
sender: Any
tool: backend_tools.ToolBase
data: Any
def __init__(self, name, sender, tool, data: Any | None = ...) -> None:
...
class ToolTriggerEvent(ToolEvent):
canvasevent: ToolEvent
def __init__(self, name, sender, tool, canvasevent: ToolEvent | None = ..., data: Any | None = ...) -> None:
...
class ToolManagerMessageEvent:
name: str
sender: Any
message: str
def __init__(self, name: str, sender: Any, message: str) -> None:
...
class ToolManager:
keypresslock: widgets.LockDraw
messagelock: widgets.LockDraw
def __init__(self, figure: Figure | None = ...) -> None:
...
@property
def canvas(self) -> FigureCanvasBase | None:
...
@property
def figure(self) -> Figure | None:
...
@figure.setter
def figure(self, figure: Figure) -> None:
...
def set_figure(self, figure: Figure, update_tools: bool = ...) -> None:
...
def toolmanager_connect(self, s: str, func: Callable[[ToolEvent], Any]) -> int:
...
def toolmanager_disconnect(self, cid: int) -> None:
...
def message_event(self, message: str, sender: Any | None = ...) -> None:
...
@property
def active_toggle(self) -> dict[str | None, list[str] | str]:
...
def get_tool_keymap(self, name: str) -> list[str]:
...
def update_keymap(self, name: str, key: str | Iterable[str]) -> None:
...
def remove_tool(self, name: str) -> None:
...
_T = TypeVar("_T", bound=backend_tools.ToolBase)
def add_tool(self, name: str, tool: type[_T], *args, **kwargs) -> _T:
...
def trigger_tool(self, name: str | backend_tools.ToolBase, sender: Any | None = ..., canvasevent: ToolEvent | None = ..., data: Any | None = ...) -> None:
...
@property
def tools(self) -> dict[str, backend_tools.ToolBase]:
...
def get_tool(self, name: str | backend_tools.ToolBase, warn: bool = ...) -> backend_tools.ToolBase | None:
...

@ -0,0 +1,244 @@
"""
This type stub file was generated by pyright.
"""
import enum
from matplotlib import cbook
from matplotlib.axes import Axes
from matplotlib.backend_bases import FigureCanvasBase, ToolContainerBase
from matplotlib.backend_managers import ToolEvent, ToolManager
from matplotlib.figure import Figure
from matplotlib.scale import ScaleBase
from typing import Any
class Cursors(enum.IntEnum):
POINTER: int
HAND: int
SELECT_REGION: int
MOVE: int
WAIT: int
RESIZE_HORIZONTAL: int
RESIZE_VERTICAL: int
...
cursors = Cursors
class ToolBase:
@property
def default_keymap(self) -> list[str] | None:
...
description: str | None
image: str | None
def __init__(self, toolmanager: ToolManager, name: str) -> None:
...
@property
def name(self) -> str:
...
@property
def toolmanager(self) -> ToolManager:
...
@property
def canvas(self) -> FigureCanvasBase | None:
...
@property
def figure(self) -> Figure | None:
...
@figure.setter
def figure(self, figure: Figure | None) -> None:
...
def set_figure(self, figure: Figure | None) -> None:
...
def trigger(self, sender: Any, event: ToolEvent, data: Any = ...) -> None:
...
class ToolToggleBase(ToolBase):
radio_group: str | None
cursor: Cursors | None
default_toggled: bool
def __init__(self, *args, **kwargs) -> None:
...
def enable(self, event: ToolEvent | None = ...) -> None:
...
def disable(self, event: ToolEvent | None = ...) -> None:
...
@property
def toggled(self) -> bool:
...
def set_figure(self, figure: Figure | None) -> None:
...
class ToolSetCursor(ToolBase):
...
class ToolCursorPosition(ToolBase):
def send_message(self, event: ToolEvent) -> None:
...
class RubberbandBase(ToolBase):
def draw_rubberband(self, *data) -> None:
...
def remove_rubberband(self) -> None:
...
class ToolQuit(ToolBase):
...
class ToolQuitAll(ToolBase):
...
class ToolGrid(ToolBase):
...
class ToolMinorGrid(ToolBase):
...
class ToolFullScreen(ToolBase):
...
class AxisScaleBase(ToolToggleBase):
def enable(self, event: ToolEvent | None = ...) -> None:
...
def disable(self, event: ToolEvent | None = ...) -> None:
...
class ToolYScale(AxisScaleBase):
def set_scale(self, ax: Axes, scale: str | ScaleBase) -> None:
...
class ToolXScale(AxisScaleBase):
def set_scale(self, ax, scale: str | ScaleBase) -> None:
...
class ToolViewsPositions(ToolBase):
views: dict[Figure | Axes, cbook.Stack]
positions: dict[Figure | Axes, cbook.Stack]
home_views: dict[Figure, dict[Axes, tuple[float, float, float, float]]]
def add_figure(self, figure: Figure) -> None:
...
def clear(self, figure: Figure) -> None:
...
def update_view(self) -> None:
...
def push_current(self, figure: Figure | None = ...) -> None:
...
def update_home_views(self, figure: Figure | None = ...) -> None:
...
def home(self) -> None:
...
def back(self) -> None:
...
def forward(self) -> None:
...
class ViewsPositionsBase(ToolBase):
...
class ToolHome(ViewsPositionsBase):
...
class ToolBack(ViewsPositionsBase):
...
class ToolForward(ViewsPositionsBase):
...
class ConfigureSubplotsBase(ToolBase):
...
class SaveFigureBase(ToolBase):
...
class ZoomPanBase(ToolToggleBase):
base_scale: float
scrollthresh: float
lastscroll: float
def __init__(self, *args) -> None:
...
def enable(self, event: ToolEvent | None = ...) -> None:
...
def disable(self, event: ToolEvent | None = ...) -> None:
...
def scroll_zoom(self, event: ToolEvent) -> None:
...
class ToolZoom(ZoomPanBase):
...
class ToolPan(ZoomPanBase):
...
class ToolHelpBase(ToolBase):
@staticmethod
def format_shortcut(key_sequence: str) -> str:
...
class ToolCopyToClipboardBase(ToolBase):
...
default_tools: dict[str, ToolBase]
default_toolbar_tools: list[list[str | list[str]]]
def add_tools_to_manager(toolmanager: ToolManager, tools: dict[str, type[ToolBase]] = ...) -> None:
...
def add_tools_to_container(container: ToolContainerBase, tools: list[Any] = ...) -> None:
...

@ -0,0 +1,5 @@
"""
This type stub file was generated by pyright.
"""
_QT_FORCE_QT5_BINDING = ...

@ -0,0 +1,81 @@
"""
This type stub file was generated by pyright.
"""
import numpy as np
from collections.abc import Callable
from typing import Literal
from numpy.typing import ArrayLike
from .path import Path
class NonIntersectingPathException(ValueError):
...
def get_intersection(cx1: float, cy1: float, cos_t1: float, sin_t1: float, cx2: float, cy2: float, cos_t2: float, sin_t2: float) -> tuple[float, float]:
...
def get_normal_points(cx: float, cy: float, cos_t: float, sin_t: float, length: float) -> tuple[float, float, float, float]:
...
def split_de_casteljau(beta: ArrayLike, t: float) -> tuple[np.ndarray, np.ndarray]:
...
def find_bezier_t_intersecting_with_closedpath(bezier_point_at_t: Callable[[float], tuple[float, float]], inside_closedpath: Callable[[tuple[float, float]], bool], t0: float = ..., t1: float = ..., tolerance: float = ...) -> tuple[float, float]:
...
class BezierSegment:
def __init__(self, control_points: ArrayLike) -> None:
...
def __call__(self, t: ArrayLike) -> np.ndarray:
...
def point_at_t(self, t: float) -> tuple[float, ...]:
...
@property
def control_points(self) -> np.ndarray:
...
@property
def dimension(self) -> int:
...
@property
def degree(self) -> int:
...
@property
def polynomial_coefficients(self) -> np.ndarray:
...
def axis_aligned_extrema(self) -> tuple[np.ndarray, np.ndarray]:
...
def split_bezier_intersecting_with_closedpath(bezier: ArrayLike, inside_closedpath: Callable[[tuple[float, float]], bool], tolerance: float = ...) -> tuple[np.ndarray, np.ndarray]:
...
def split_path_inout(path: Path, inside: Callable[[tuple[float, float]], bool], tolerance: float = ..., reorder_inout: bool = ...) -> tuple[Path, Path]:
...
def inside_circle(cx: float, cy: float, r: float) -> Callable[[tuple[float, float]], bool]:
...
def get_cos_sin(x0: float, y0: float, x1: float, y1: float) -> tuple[float, float]:
...
def check_if_parallel(dx1: float, dy1: float, dx2: float, dy2: float, tolerance: float = ...) -> Literal[-1, False, 1]:
...
def get_parallels(bezier2: ArrayLike, width: float) -> tuple[list[tuple[float, float]], list[tuple[float, float]]]:
...
def find_control_points(c1x: float, c1y: float, mmx: float, mmy: float, c2x: float, c2y: float) -> list[tuple[float, float]]:
...
def make_wedged_bezier2(bezier2: ArrayLike, width: float, w1: float = ..., wm: float = ..., w2: float = ...) -> tuple[list[tuple[float, float]], list[tuple[float, float]]]:
...

@ -0,0 +1,151 @@
"""
This type stub file was generated by pyright.
"""
from matplotlib import ticker, units
"""
Plotting of string "category" data: ``plot(['d', 'f', 'a'], [1, 2, 3])`` will
plot three points with x-axis values of 'd', 'f', 'a'.
See :doc:`/gallery/lines_bars_and_markers/categorical_variables` for an
example.
The module uses Matplotlib's `matplotlib.units` mechanism to convert from
strings to integers and provides a tick locator, a tick formatter, and the
`.UnitData` class that creates and stores the string-to-integer mapping.
"""
_log = ...
class StrCategoryConverter(units.ConversionInterface):
@staticmethod
def convert(value, unit, axis): # -> Any:
"""
Convert strings in *value* to floats using mapping information stored
in the *unit* object.
Parameters
----------
value : str or iterable
Value or list of values to be converted.
unit : `.UnitData`
An object mapping strings to integers.
axis : `~matplotlib.axis.Axis`
The axis on which the converted value is plotted.
.. note:: *axis* is unused.
Returns
-------
float or `~numpy.ndarray` of float
"""
...
@staticmethod
def axisinfo(unit, axis): # -> AxisInfo:
"""
Set the default axis ticks and labels.
Parameters
----------
unit : `.UnitData`
object string unit information for value
axis : `~matplotlib.axis.Axis`
axis for which information is being set
.. note:: *axis* is not used
Returns
-------
`~matplotlib.units.AxisInfo`
Information to support default tick labeling
"""
...
@staticmethod
def default_units(data, axis):
"""
Set and update the `~matplotlib.axis.Axis` units.
Parameters
----------
data : str or iterable of str
axis : `~matplotlib.axis.Axis`
axis on which the data is plotted
Returns
-------
`.UnitData`
object storing string to integer mapping
"""
...
class StrCategoryLocator(ticker.Locator):
"""Tick at every integer mapping of the string data."""
def __init__(self, units_mapping) -> None:
"""
Parameters
----------
units_mapping : dict
Mapping of category names (str) to indices (int).
"""
...
def __call__(self): # -> list[Unknown]:
...
def tick_values(self, vmin, vmax): # -> list[Unknown]:
...
class StrCategoryFormatter(ticker.Formatter):
"""String representation of the data at every tick."""
def __init__(self, units_mapping) -> None:
"""
Parameters
----------
units_mapping : dict
Mapping of category names (str) to indices (int).
"""
...
def __call__(self, x, pos=...): # -> str:
...
def format_ticks(self, values): # -> list[str]:
...
class UnitData:
def __init__(self, data=...) -> None:
"""
Create mapping between unique categorical values and integer ids.
Parameters
----------
data : iterable
sequence of string values
"""
...
def update(self, data): # -> None:
"""
Map new values to integer identifiers.
Parameters
----------
data : iterable of str or bytes
Raises
------
TypeError
If elements in *data* are neither str nor bytes.
"""
...

@ -0,0 +1,236 @@
"""
This type stub file was generated by pyright.
"""
import collections.abc
import contextlib
import os
import numpy as np
from collections.abc import Callable, Collection, Generator, Iterable, Iterator
from matplotlib.artist import Artist
from numpy.typing import ArrayLike
from typing import Any, Generic, IO, Literal, TypeVar, overload
_T = TypeVar("_T")
class CallbackRegistry:
exception_handler: Callable[[Exception], Any]
callbacks: dict[Any, dict[int, Any]]
def __init__(self, exception_handler: Callable[[Exception], Any] | None = ..., *, signals: Iterable[Any] | None = ...) -> None:
...
def connect(self, signal: Any, func: Callable) -> int:
...
def disconnect(self, cid: int) -> None:
...
def process(self, s: Any, *args, **kwargs) -> None:
...
def blocked(self, *, signal: Any | None = ...) -> contextlib.AbstractContextManager[None]:
...
class silent_list(list[_T]):
type: str | None
def __init__(self, type: str | None, seq: Iterable[_T] | None = ...) -> None:
...
def strip_math(s: str) -> str:
...
def is_writable_file_like(obj: Any) -> bool:
...
def file_requires_unicode(x: Any) -> bool:
...
@overload
def to_filehandle(fname: str | os.PathLike | IO, flag: str = ..., return_opened: Literal[False] = ..., encoding: str | None = ...) -> IO:
...
@overload
def to_filehandle(fname: str | os.PathLike | IO, flag: str, return_opened: Literal[True], encoding: str | None = ...) -> tuple[IO, bool]:
...
@overload
def to_filehandle(fname: str | os.PathLike | IO, *, return_opened: Literal[True], encoding: str | None = ...) -> tuple[IO, bool]:
...
def open_file_cm(path_or_file: str | os.PathLike | IO, mode: str = ..., encoding: str | None = ...) -> contextlib.AbstractContextManager[IO]:
...
def is_scalar_or_string(val: Any) -> bool:
...
@overload
def get_sample_data(fname: str | os.PathLike, asfileobj: Literal[True] = ..., *, np_load: Literal[True]) -> np.ndarray:
...
@overload
def get_sample_data(fname: str | os.PathLike, asfileobj: Literal[True] = ..., *, np_load: Literal[False] = ...) -> IO:
...
@overload
def get_sample_data(fname: str | os.PathLike, asfileobj: Literal[False], *, np_load: bool = ...) -> str:
...
def flatten(seq: Iterable[Any], scalarp: Callable[[Any], bool] = ...) -> Generator[Any, None, None]:
...
class Stack(Generic[_T]):
def __init__(self, default: _T | None = ...) -> None:
...
def __call__(self) -> _T:
...
def __len__(self) -> int:
...
def __getitem__(self, ind: int) -> _T:
...
def forward(self) -> _T:
...
def back(self) -> _T:
...
def push(self, o: _T) -> _T:
...
def home(self) -> _T:
...
def empty(self) -> bool:
...
def clear(self) -> None:
...
def bubble(self, o: _T) -> _T:
...
def remove(self, o: _T) -> None:
...
def safe_masked_invalid(x: ArrayLike, copy: bool = ...) -> np.ndarray:
...
def print_cycles(objects: Iterable[Any], outstream: IO = ..., show_progress: bool = ...) -> None:
...
class Grouper(Generic[_T]):
def __init__(self, init: Iterable[_T] = ...) -> None:
...
def __contains__(self, item: _T) -> bool:
...
def clean(self) -> None:
...
def join(self, a: _T, *args: _T) -> None:
...
def joined(self, a: _T, b: _T) -> bool:
...
def remove(self, a: _T) -> None:
...
def __iter__(self) -> Iterator[list[_T]]:
...
def get_siblings(self, a: _T) -> list[_T]:
...
class GrouperView(Generic[_T]):
def __init__(self, grouper: Grouper[_T]) -> None:
...
def __contains__(self, item: _T) -> bool:
...
def __iter__(self) -> Iterator[list[_T]]:
...
def joined(self, a: _T, b: _T) -> bool:
...
def get_siblings(self, a: _T) -> list[_T]:
...
def simple_linear_interpolation(a: ArrayLike, steps: int) -> np.ndarray:
...
def delete_masked_points(*args):
...
def boxplot_stats(X: ArrayLike, whis: float | tuple[float, float] = ..., bootstrap: int | None = ..., labels: ArrayLike | None = ..., autorange: bool = ...) -> list[dict[str, Any]]:
...
ls_mapper: dict[str, str]
ls_mapper_r: dict[str, str]
def contiguous_regions(mask: ArrayLike) -> list[np.ndarray]:
...
def is_math_text(s: str) -> bool:
...
def violin_stats(X: ArrayLike, method: Callable, points: int = ..., quantiles: ArrayLike | None = ...) -> list[dict[str, Any]]:
...
def pts_to_prestep(x: ArrayLike, *args: ArrayLike) -> np.ndarray:
...
def pts_to_poststep(x: ArrayLike, *args: ArrayLike) -> np.ndarray:
...
def pts_to_midstep(x: np.ndarray, *args: np.ndarray) -> np.ndarray:
...
STEP_LOOKUP_MAP: dict[str, Callable]
def index_of(y: float | ArrayLike) -> tuple[np.ndarray, np.ndarray]:
...
def safe_first_element(obj: Collection[_T]) -> _T:
...
def sanitize_sequence(data):
...
def normalize_kwargs(kw: dict[str, Any], alias_mapping: dict[str, list[str]] | type[Artist] | Artist | None = ...) -> dict[str, Any]:
...
class _OrderedSet(collections.abc.MutableSet):
def __init__(self) -> None:
...
def __contains__(self, key) -> bool:
...
def __iter__(self):
...
def __len__(self) -> int:
...
def add(self, key) -> None:
...
def discard(self, key) -> None:
...

@ -0,0 +1,94 @@
"""
This type stub file was generated by pyright.
"""
import numpy as np
from collections.abc import Iterator, Mapping
from matplotlib import cbook, colors
from matplotlib.colorbar import Colorbar
from numpy.typing import ArrayLike
class ColormapRegistry(Mapping[str, colors.Colormap]):
def __init__(self, cmaps: Mapping[str, colors.Colormap]) -> None:
...
def __getitem__(self, item: str) -> colors.Colormap:
...
def __iter__(self) -> Iterator[str]:
...
def __len__(self) -> int:
...
def __call__(self) -> list[str]:
...
def register(self, cmap: colors.Colormap, *, name: str | None = ..., force: bool = ...) -> None:
...
def unregister(self, name: str) -> None:
...
def get_cmap(self, cmap: str | colors.Colormap) -> colors.Colormap:
...
_colormaps: ColormapRegistry = ...
def get_cmap(name: str | colors.Colormap | None = ..., lut: int | None = ...) -> colors.Colormap:
...
class ScalarMappable:
cmap: colors.Colormap | None
colorbar: Colorbar | None
callbacks: cbook.CallbackRegistry
def __init__(self, norm: colors.Normalize | None = ..., cmap: str | colors.Colormap | None = ...) -> None:
...
def to_rgba(self, x: np.ndarray, alpha: float | ArrayLike | None = ..., bytes: bool = ..., norm: bool = ...) -> np.ndarray:
...
def set_array(self, A: ArrayLike | None) -> None:
...
def get_array(self) -> np.ndarray | None:
...
def get_cmap(self) -> colors.Colormap:
...
def get_clim(self) -> tuple[float, float]:
...
def set_clim(self, vmin: float | tuple[float, float] | None = ..., vmax: float | None = ...) -> None:
...
def get_alpha(self) -> float | None:
...
def set_cmap(self, cmap: str | colors.Colormap) -> None:
...
@property
def norm(self) -> colors.Normalize:
...
@norm.setter
def norm(self, norm: colors.Normalize | str | None) -> None:
...
def set_norm(self, norm: colors.Normalize | str | None) -> None:
...
def autoscale(self) -> None:
...
def autoscale_None(self) -> None:
...
def changed(self) -> None:
...

@ -0,0 +1,362 @@
"""
This type stub file was generated by pyright.
"""
import numpy as np
from collections.abc import Callable, Iterable, Sequence
from typing import Literal
from numpy.typing import ArrayLike, NDArray
from . import artist, cm, transforms
from .backend_bases import MouseEvent
from .artist import Artist
from .colors import Colormap, Normalize
from .lines import Line2D
from .path import Path
from .patches import Patch
from .ticker import Formatter, Locator
from .tri import Triangulation
from .typing import CapStyleType, ColorType, JoinStyleType, LineStyleType
class Collection(artist.Artist, cm.ScalarMappable):
def __init__(self, *, edgecolors: ColorType | Sequence[ColorType] | None = ..., facecolors: ColorType | Sequence[ColorType] | None = ..., linewidths: float | Sequence[float] | None = ..., linestyles: LineStyleType | Sequence[LineStyleType] = ..., capstyle: CapStyleType | None = ..., joinstyle: JoinStyleType | None = ..., antialiaseds: bool | Sequence[bool] | None = ..., offsets: tuple[float, float] | Sequence[tuple[float, float]] | None = ..., offset_transform: transforms.Transform | None = ..., norm: Normalize | None = ..., cmap: Colormap | None = ..., pickradius: float = ..., hatch: str | None = ..., urls: Sequence[str] | None = ..., zorder: float = ..., **kwargs) -> None:
...
def get_paths(self) -> Sequence[Path]:
...
def set_paths(self, paths: Sequence[Path]) -> None:
...
def get_transforms(self) -> Sequence[transforms.Transform]:
...
def get_offset_transform(self) -> transforms.Transform:
...
def set_offset_transform(self, offset_transform: transforms.Transform) -> None:
...
def get_datalim(self, transData: transforms.Transform) -> transforms.Bbox:
...
def set_pickradius(self, pickradius: float) -> None:
...
def get_pickradius(self) -> float:
...
def set_urls(self, urls: Sequence[str | None]) -> None:
...
def get_urls(self) -> Sequence[str | None]:
...
def set_hatch(self, hatch: str) -> None:
...
def get_hatch(self) -> str:
...
def set_offsets(self, offsets: ArrayLike) -> None:
...
def get_offsets(self) -> ArrayLike:
...
def set_linewidth(self, lw: float | Sequence[float]) -> None:
...
def set_linestyle(self, ls: LineStyleType | Sequence[LineStyleType]) -> None:
...
def set_capstyle(self, cs: CapStyleType) -> None:
...
def get_capstyle(self) -> Literal["butt", "projecting", "round"] | None:
...
def set_joinstyle(self, js: JoinStyleType) -> None:
...
def get_joinstyle(self) -> Literal["miter", "round", "bevel"] | None:
...
def set_antialiased(self, aa: bool | Sequence[bool]) -> None:
...
def get_antialiased(self) -> NDArray[np.bool_]:
...
def set_color(self, c: ColorType | Sequence[ColorType]) -> None:
...
def set_facecolor(self, c: ColorType | Sequence[ColorType]) -> None:
...
def get_facecolor(self) -> ColorType | Sequence[ColorType]:
...
def get_edgecolor(self) -> ColorType | Sequence[ColorType]:
...
def set_edgecolor(self, c: ColorType | Sequence[ColorType]) -> None:
...
def set_alpha(self, alpha: float | Sequence[float] | None) -> None:
...
def get_linewidth(self) -> float | Sequence[float]:
...
def get_linestyle(self) -> LineStyleType | Sequence[LineStyleType]:
...
def update_scalarmappable(self) -> None:
...
def get_fill(self) -> bool:
...
def update_from(self, other: Artist) -> None:
...
class _CollectionWithSizes(Collection):
def get_sizes(self) -> np.ndarray:
...
def set_sizes(self, sizes: ArrayLike | None, dpi: float = ...) -> None:
...
class PathCollection(_CollectionWithSizes):
def __init__(self, paths: Sequence[Path], sizes: ArrayLike | None = ..., **kwargs) -> None:
...
def set_paths(self, paths: Sequence[Path]) -> None:
...
def get_paths(self) -> Sequence[Path]:
...
def legend_elements(self, prop: Literal["colors", "sizes"] = ..., num: int | Literal["auto"] | ArrayLike | Locator = ..., fmt: str | Formatter | None = ..., func: Callable[[ArrayLike], ArrayLike] = ..., **kwargs) -> tuple[list[Line2D], list[str]]:
...
class PolyCollection(_CollectionWithSizes):
def __init__(self, verts: Sequence[ArrayLike], sizes: ArrayLike | None = ..., *, closed: bool = ..., **kwargs) -> None:
...
def set_verts(self, verts: Sequence[ArrayLike | Path], closed: bool = ...) -> None:
...
def set_paths(self, verts: Sequence[Path], closed: bool = ...) -> None:
...
def set_verts_and_codes(self, verts: Sequence[ArrayLike | Path], codes: Sequence[int]) -> None:
...
class BrokenBarHCollection(PolyCollection):
def __init__(self, xranges: Iterable[tuple[float, float]], yrange: tuple[float, float], **kwargs) -> None:
...
@classmethod
def span_where(cls, x: ArrayLike, ymin: float, ymax: float, where: ArrayLike, **kwargs) -> BrokenBarHCollection:
...
class RegularPolyCollection(_CollectionWithSizes):
def __init__(self, numsides: int, *, rotation: float = ..., sizes: ArrayLike = ..., **kwargs) -> None:
...
def get_numsides(self) -> int:
...
def get_rotation(self) -> float:
...
class StarPolygonCollection(RegularPolyCollection):
...
class AsteriskPolygonCollection(RegularPolyCollection):
...
class LineCollection(Collection):
def __init__(self, segments: Sequence[ArrayLike], *, zorder: float = ..., **kwargs) -> None:
...
def set_segments(self, segments: Sequence[ArrayLike] | None) -> None:
...
def set_verts(self, segments: Sequence[ArrayLike] | None) -> None:
...
def set_paths(self, segments: Sequence[ArrayLike] | None) -> None:
...
def get_segments(self) -> list[np.ndarray]:
...
def set_color(self, c: ColorType | Sequence[ColorType]) -> None:
...
def set_colors(self, c: ColorType | Sequence[ColorType]) -> None:
...
def set_gapcolor(self, gapcolor: ColorType | Sequence[ColorType] | None) -> None:
...
def get_color(self) -> ColorType | Sequence[ColorType]:
...
def get_colors(self) -> ColorType | Sequence[ColorType]:
...
def get_gapcolor(self) -> ColorType | Sequence[ColorType] | None:
...
class EventCollection(LineCollection):
def __init__(self, positions: ArrayLike, orientation: Literal["horizontal", "vertical"] = ..., *, lineoffset: float = ..., linelength: float = ..., linewidth: float | Sequence[float] | None = ..., color: ColorType | Sequence[ColorType] | None = ..., linestyle: LineStyleType | Sequence[LineStyleType] = ..., antialiased: bool | Sequence[bool] | None = ..., **kwargs) -> None:
...
def get_positions(self) -> list[float]:
...
def set_positions(self, positions: Sequence[float] | None) -> None:
...
def add_positions(self, position: Sequence[float] | None) -> None:
...
def extend_positions(self, position: Sequence[float] | None) -> None:
...
def append_positions(self, position: Sequence[float] | None) -> None:
...
def is_horizontal(self) -> bool:
...
def get_orientation(self) -> Literal["horizontal", "vertical"]:
...
def switch_orientation(self) -> None:
...
def set_orientation(self, orientation: Literal["horizontal", "vertical"]) -> None:
...
def get_linelength(self) -> float | Sequence[float]:
...
def set_linelength(self, linelength: float | Sequence[float]) -> None:
...
def get_lineoffset(self) -> float:
...
def set_lineoffset(self, lineoffset: float) -> None:
...
def get_linewidth(self) -> float:
...
def get_linewidths(self) -> Sequence[float]:
...
def get_color(self) -> ColorType:
...
class CircleCollection(_CollectionWithSizes):
def __init__(self, sizes: float | ArrayLike, **kwargs) -> None:
...
class EllipseCollection(Collection):
def __init__(self, widths: ArrayLike, heights: ArrayLike, angles: ArrayLike, *, units: Literal["points", "inches", "dots", "width", "height", "x", "y", "xy"] = ..., **kwargs) -> None:
...
class PatchCollection(Collection):
def __init__(self, patches: Iterable[Patch], *, match_original: bool = ..., **kwargs) -> None:
...
def set_paths(self, patches: Iterable[Patch]) -> None:
...
class TriMesh(Collection):
def __init__(self, triangulation: Triangulation, **kwargs) -> None:
...
def get_paths(self) -> list[Path]:
...
def set_paths(self) -> None:
...
@staticmethod
def convert_mesh_to_paths(tri: Triangulation) -> list[Path]:
...
class _MeshData:
def __init__(self, coordinates: ArrayLike, *, shading: Literal["flat", "gouraud"] = ...) -> None:
...
def set_array(self, A: ArrayLike | None) -> None:
...
def get_coordinates(self) -> ArrayLike:
...
def get_facecolor(self) -> ColorType | Sequence[ColorType]:
...
def get_edgecolor(self) -> ColorType | Sequence[ColorType]:
...
class QuadMesh(_MeshData, Collection):
def __init__(self, coordinates: ArrayLike, *, antialiased: bool = ..., shading: Literal["flat", "gouraud"] = ..., **kwargs) -> None:
...
def get_paths(self) -> list[Path]:
...
def set_paths(self) -> None:
...
def get_datalim(self, transData: transforms.Transform) -> transforms.Bbox:
...
def get_cursor_data(self, event: MouseEvent) -> float:
...
class PolyQuadMesh(_MeshData, PolyCollection):
def __init__(self, coordinates: ArrayLike, **kwargs) -> None:
...

@ -0,0 +1,138 @@
"""
This type stub file was generated by pyright.
"""
import matplotlib.spines as mspines
import numpy as np
from matplotlib import cm, collections, colors, contour
from matplotlib.axes import Axes
from matplotlib.backend_bases import RendererBase
from matplotlib.patches import Patch
from matplotlib.ticker import Formatter, Locator
from matplotlib.transforms import Bbox
from numpy.typing import ArrayLike
from collections.abc import Sequence
from typing import Any, Literal, overload
from .typing import ColorType
class _ColorbarSpine(mspines.Spines):
def __init__(self, axes: Axes) -> None:
...
def get_window_extent(self, renderer: RendererBase | None = ...) -> Bbox:
...
def set_xy(self, xy: ArrayLike) -> None:
...
def draw(self, renderer: RendererBase | None) -> None:
...
class Colorbar:
n_rasterize: int
mappable: cm.ScalarMappable
ax: Axes
alpha: float | None
cmap: colors.Colormap
norm: colors.Normalize
values: Sequence[float] | None
boundaries: Sequence[float] | None
extend: Literal["neither", "both", "min", "max"]
spacing: Literal["uniform", "proportional"]
orientation: Literal["vertical", "horizontal"]
drawedges: bool
extendfrac: Literal["auto"] | float | Sequence[float] | None
extendrect: bool
solids: None | collections.QuadMesh
solids_patches: list[Patch]
lines: list[collections.LineCollection]
outline: _ColorbarSpine
dividers: collections.LineCollection
ticklocation: Literal["left", "right", "top", "bottom"]
def __init__(self, ax: Axes, mappable: cm.ScalarMappable | None = ..., *, cmap: str | colors.Colormap | None = ..., norm: colors.Normalize | None = ..., alpha: float | None = ..., values: Sequence[float] | None = ..., boundaries: Sequence[float] | None = ..., orientation: Literal["vertical", "horizontal"] | None = ..., ticklocation: Literal["auto", "left", "right", "top", "bottom"] = ..., extend: Literal["neither", "both", "min", "max"] | None = ..., spacing: Literal["uniform", "proportional"] = ..., ticks: Sequence[float] | Locator | None = ..., format: str | Formatter | None = ..., drawedges: bool = ..., extendfrac: Literal["auto"] | float | Sequence[float] | None = ..., extendrect: bool = ..., label: str = ..., location: Literal["left", "right", "top", "bottom"] | None = ...) -> None:
...
@property
def locator(self) -> Locator:
...
@locator.setter
def locator(self, loc: Locator) -> None:
...
@property
def minorlocator(self) -> Locator:
...
@minorlocator.setter
def minorlocator(self, loc: Locator) -> None:
...
@property
def formatter(self) -> Formatter:
...
@formatter.setter
def formatter(self, fmt: Formatter) -> None:
...
@property
def minorformatter(self) -> Formatter:
...
@minorformatter.setter
def minorformatter(self, fmt: Formatter) -> None:
...
def update_normal(self, mappable: cm.ScalarMappable) -> None:
...
@overload
def add_lines(self, CS: contour.ContourSet, erase: bool = ...) -> None:
...
@overload
def add_lines(self, levels: ArrayLike, colors: ColorType | Sequence[ColorType], linewidths: float | ArrayLike, erase: bool = ...) -> None:
...
def update_ticks(self) -> None:
...
def set_ticks(self, ticks: Sequence[float] | Locator, *, labels: Sequence[str] | None = ..., minor: bool = ..., **kwargs) -> None:
...
def get_ticks(self, minor: bool = ...) -> np.ndarray:
...
def set_ticklabels(self, ticklabels: Sequence[str], *, minor: bool = ..., **kwargs) -> None:
...
def minorticks_on(self) -> None:
...
def minorticks_off(self) -> None:
...
def set_label(self, label: str, *, loc: str | None = ..., **kwargs) -> None:
...
def set_alpha(self, alpha: float | np.ndarray) -> None:
...
def remove(self) -> None:
...
def drag_pan(self, button: Any, key: Any, x: float, y: float) -> None:
...
ColorbarBase = Colorbar
def make_axes(parents: Axes | list[Axes] | np.ndarray, location: Literal["left", "right", "top", "bottom"] | None = ..., orientation: Literal["vertical", "horizontal"] | None = ..., fraction: float = ..., shrink: float = ..., aspect: float = ..., **kwargs) -> tuple[Axes, dict[str, Any]]:
...
def make_axes_gridspec(parent: Axes, *, location: Literal["left", "right", "top", "bottom"] | None = ..., orientation: Literal["vertical", "horizontal"] | None = ..., fraction: float = ..., shrink: float = ..., aspect: float = ..., **kwargs) -> tuple[Axes, dict[str, Any]]:
...

@ -0,0 +1,411 @@
"""
This type stub file was generated by pyright.
"""
import re
import numpy as np
from collections.abc import Callable, Iterable, Iterator, Mapping, Sequence
from matplotlib import cbook, scale
from typing import Any, Literal, overload
from .typing import ColorType
from numpy.typing import ArrayLike
BASE_COLORS: dict[str, ColorType]
CSS4_COLORS: dict[str, ColorType]
TABLEAU_COLORS: dict[str, ColorType]
XKCD_COLORS: dict[str, ColorType]
class _ColorMapping(dict[str, ColorType]):
cache: dict[tuple[ColorType, float | None], tuple[float, float, float, float]]
def __init__(self, mapping) -> None:
...
def __setitem__(self, key, value) -> None:
...
def __delitem__(self, key) -> None:
...
def get_named_colors_mapping() -> _ColorMapping:
...
class ColorSequenceRegistry(Mapping):
def __init__(self) -> None:
...
def __getitem__(self, item: str) -> list[ColorType]:
...
def __iter__(self) -> Iterator[str]:
...
def __len__(self) -> int:
...
def register(self, name: str, color_list: Iterable[ColorType]) -> None:
...
def unregister(self, name: str) -> None:
...
_color_sequences: ColorSequenceRegistry = ...
def is_color_like(c: Any) -> bool:
...
def same_color(c1: ColorType, c2: ColorType) -> bool:
...
def to_rgba(c: ColorType, alpha: float | None = ...) -> tuple[float, float, float, float]:
...
def to_rgba_array(c: ColorType | ArrayLike, alpha: float | ArrayLike | None = ...) -> np.ndarray:
...
def to_rgb(c: ColorType) -> tuple[float, float, float]:
...
def to_hex(c: ColorType, keep_alpha: bool = ...) -> str:
...
cnames: dict[str, ColorType]
hexColorPattern: re.Pattern
rgb2hex = ...
hex2color = ...
class ColorConverter:
colors: _ColorMapping
cache: dict[tuple[ColorType, float | None], tuple[float, float, float, float]]
@staticmethod
def to_rgb(c: ColorType) -> tuple[float, float, float]:
...
@staticmethod
def to_rgba(c: ColorType, alpha: float | None = ...) -> tuple[float, float, float, float]:
...
@staticmethod
def to_rgba_array(c: ColorType | ArrayLike, alpha: float | ArrayLike | None = ...) -> np.ndarray:
...
colorConverter: ColorConverter
class Colormap:
name: str
N: int
colorbar_extend: bool
def __init__(self, name: str, N: int = ...) -> None:
...
@overload
def __call__(self, X: Sequence[float] | np.ndarray, alpha: ArrayLike | None = ..., bytes: bool = ...) -> np.ndarray:
...
@overload
def __call__(self, X: float, alpha: float | None = ..., bytes: bool = ...) -> tuple[float, float, float, float]:
...
@overload
def __call__(self, X: ArrayLike, alpha: ArrayLike | None = ..., bytes: bool = ...) -> tuple[float, float, float, float] | np.ndarray:
...
def __copy__(self) -> Colormap:
...
def __eq__(self, other: object) -> bool:
...
def get_bad(self) -> np.ndarray:
...
def set_bad(self, color: ColorType = ..., alpha: float | None = ...) -> None:
...
def get_under(self) -> np.ndarray:
...
def set_under(self, color: ColorType = ..., alpha: float | None = ...) -> None:
...
def get_over(self) -> np.ndarray:
...
def set_over(self, color: ColorType = ..., alpha: float | None = ...) -> None:
...
def set_extremes(self, *, bad: ColorType | None = ..., under: ColorType | None = ..., over: ColorType | None = ...) -> None:
...
def with_extremes(self, *, bad: ColorType | None = ..., under: ColorType | None = ..., over: ColorType | None = ...) -> Colormap:
...
def is_gray(self) -> bool:
...
def resampled(self, lutsize: int) -> Colormap:
...
def reversed(self, name: str | None = ...) -> Colormap:
...
def copy(self) -> Colormap:
...
class LinearSegmentedColormap(Colormap):
monochrome: bool
def __init__(self, name: str, segmentdata: dict[Literal["red", "green", "blue", "alpha"], Sequence[tuple[float, ...]]], N: int = ..., gamma: float = ...) -> None:
...
def set_gamma(self, gamma: float) -> None:
...
@staticmethod
def from_list(name: str, colors: ArrayLike, N: int = ..., gamma: float = ...) -> LinearSegmentedColormap:
...
def resampled(self, lutsize: int) -> LinearSegmentedColormap:
...
def reversed(self, name: str | None = ...) -> LinearSegmentedColormap:
...
class ListedColormap(Colormap):
monochrome: bool
colors: ArrayLike | ColorType
def __init__(self, colors: ArrayLike | ColorType, name: str = ..., N: int | None = ...) -> None:
...
def resampled(self, lutsize: int) -> ListedColormap:
...
def reversed(self, name: str | None = ...) -> ListedColormap:
...
class Normalize:
callbacks: cbook.CallbackRegistry
def __init__(self, vmin: float | None = ..., vmax: float | None = ..., clip: bool = ...) -> None:
...
@property
def vmin(self) -> float | None:
...
@vmin.setter
def vmin(self, value: float | None) -> None:
...
@property
def vmax(self) -> float | None:
...
@vmax.setter
def vmax(self, value: float | None) -> None:
...
@property
def clip(self) -> bool:
...
@clip.setter
def clip(self, value: bool) -> None:
...
@staticmethod
def process_value(value: ArrayLike) -> tuple[np.ma.MaskedArray, bool]:
...
@overload
def __call__(self, value: float, clip: bool | None = ...) -> float:
...
@overload
def __call__(self, value: np.ndarray, clip: bool | None = ...) -> np.ma.MaskedArray:
...
@overload
def __call__(self, value: ArrayLike, clip: bool | None = ...) -> ArrayLike:
...
@overload
def inverse(self, value: float) -> float:
...
@overload
def inverse(self, value: np.ndarray) -> np.ma.MaskedArray:
...
@overload
def inverse(self, value: ArrayLike) -> ArrayLike:
...
def autoscale(self, A: ArrayLike) -> None:
...
def autoscale_None(self, A: ArrayLike) -> None:
...
def scaled(self) -> bool:
...
class TwoSlopeNorm(Normalize):
def __init__(self, vcenter: float, vmin: float | None = ..., vmax: float | None = ...) -> None:
...
@property
def vcenter(self) -> float:
...
@vcenter.setter
def vcenter(self, value: float) -> None:
...
def autoscale_None(self, A: ArrayLike) -> None:
...
class CenteredNorm(Normalize):
def __init__(self, vcenter: float = ..., halfrange: float | None = ..., clip: bool = ...) -> None:
...
@property
def vcenter(self) -> float:
...
@vcenter.setter
def vcenter(self, vcenter: float) -> None:
...
@property
def halfrange(self) -> float:
...
@halfrange.setter
def halfrange(self, halfrange: float) -> None:
...
@overload
def make_norm_from_scale(scale_cls: type[scale.ScaleBase], base_norm_cls: type[Normalize], *, init: Callable | None = ...) -> type[Normalize]:
...
@overload
def make_norm_from_scale(scale_cls: type[scale.ScaleBase], base_norm_cls: None = ..., *, init: Callable | None = ...) -> Callable[[type[Normalize]], type[Normalize]]:
...
class FuncNorm(Normalize):
def __init__(self, functions: tuple[Callable, Callable], vmin: float | None = ..., vmax: float | None = ..., clip: bool = ...) -> None:
...
class LogNorm(Normalize):
...
class SymLogNorm(Normalize):
def __init__(self, linthresh: float, linscale: float = ..., vmin: float | None = ..., vmax: float | None = ..., clip: bool = ..., *, base: float = ...) -> None:
...
@property
def linthresh(self) -> float:
...
@linthresh.setter
def linthresh(self, value: float) -> None:
...
class AsinhNorm(Normalize):
def __init__(self, linear_width: float = ..., vmin: float | None = ..., vmax: float | None = ..., clip: bool = ...) -> None:
...
@property
def linear_width(self) -> float:
...
@linear_width.setter
def linear_width(self, value: float) -> None:
...
class PowerNorm(Normalize):
gamma: float
def __init__(self, gamma: float, vmin: float | None = ..., vmax: float | None = ..., clip: bool = ...) -> None:
...
class BoundaryNorm(Normalize):
boundaries: np.ndarray
N: int
Ncmap: int
extend: Literal["neither", "both", "min", "max"]
def __init__(self, boundaries: ArrayLike, ncolors: int, clip: bool = ..., *, extend: Literal["neither", "both", "min", "max"] = ...) -> None:
...
class NoNorm(Normalize):
...
def rgb_to_hsv(arr: ArrayLike) -> np.ndarray:
...
def hsv_to_rgb(hsv: ArrayLike) -> np.ndarray:
...
class LightSource:
azdeg: float
altdeg: float
hsv_min_val: float
hsv_max_val: float
hsv_min_sat: float
hsv_max_sat: float
def __init__(self, azdeg: float = ..., altdeg: float = ..., hsv_min_val: float = ..., hsv_max_val: float = ..., hsv_min_sat: float = ..., hsv_max_sat: float = ...) -> None:
...
@property
def direction(self) -> np.ndarray:
...
def hillshade(self, elevation: ArrayLike, vert_exag: float = ..., dx: float = ..., dy: float = ..., fraction: float = ...) -> np.ndarray:
...
def shade_normals(self, normals: np.ndarray, fraction: float = ...) -> np.ndarray:
...
def shade(self, data: ArrayLike, cmap: Colormap, norm: Normalize | None = ..., blend_mode: Literal["hsv", "overlay", "soft"] | Callable = ..., vmin: float | None = ..., vmax: float | None = ..., vert_exag: float = ..., dx: float = ..., dy: float = ..., fraction: float = ..., **kwargs) -> np.ndarray:
...
def shade_rgb(self, rgb: ArrayLike, elevation: ArrayLike, fraction: float = ..., blend_mode: Literal["hsv", "overlay", "soft"] | Callable = ..., vert_exag: float = ..., dx: float = ..., dy: float = ..., **kwargs) -> np.ndarray:
...
def blend_hsv(self, rgb: ArrayLike, intensity: ArrayLike, hsv_max_sat: float | None = ..., hsv_max_val: float | None = ..., hsv_min_val: float | None = ..., hsv_min_sat: float | None = ...) -> ArrayLike:
...
def blend_soft_light(self, rgb: np.ndarray, intensity: np.ndarray) -> np.ndarray:
...
def blend_overlay(self, rgb: np.ndarray, intensity: np.ndarray) -> np.ndarray:
...
def from_levels_and_colors(levels: Sequence[float], colors: Sequence[ColorType], extend: Literal["neither", "min", "max", "both"] = ...) -> tuple[ListedColormap, BoundaryNorm]:
...

@ -0,0 +1,70 @@
"""
This type stub file was generated by pyright.
"""
from matplotlib.artist import Artist
from matplotlib.lines import Line2D
from matplotlib.collections import LineCollection
from matplotlib.patches import Rectangle
from collections.abc import Callable
from typing import Any, Literal
from numpy.typing import ArrayLike
class Container(tuple):
def __new__(cls, *args, **kwargs):
...
def __init__(self, kl, label: Any | None = ...) -> None:
...
def remove(self) -> None:
...
def get_children(self) -> list[Artist]:
...
def get_label(self) -> str | None:
...
def set_label(self, s: Any) -> None:
...
def add_callback(self, func: Callable[[Artist], Any]) -> int:
...
def remove_callback(self, oid: int) -> None:
...
def pchanged(self) -> None:
...
class BarContainer(Container):
patches: list[Rectangle]
errorbar: None | ErrorbarContainer
datavalues: None | ArrayLike
orientation: None | Literal["vertical", "horizontal"]
def __init__(self, patches: list[Rectangle], errorbar: ErrorbarContainer | None = ..., *, datavalues: ArrayLike | None = ..., orientation: Literal["vertical", "horizontal"] | None = ..., **kwargs) -> None:
...
class ErrorbarContainer(Container):
lines: tuple[Line2D, Line2D, LineCollection]
has_xerr: bool
has_yerr: bool
def __init__(self, lines: tuple[Line2D, Line2D, LineCollection], has_xerr: bool = ..., has_yerr: bool = ..., **kwargs) -> None:
...
class StemContainer(Container):
markerline: Line2D
stemlines: LineCollection
baseline: Line2D
def __init__(self, markerline_stemlines_baseline: tuple[Line2D, LineCollection, Line2D], **kwargs) -> None:
...

@ -0,0 +1,142 @@
"""
This type stub file was generated by pyright.
"""
import matplotlib.cm as cm
import numpy as np
from matplotlib.artist import Artist
from matplotlib.axes import Axes
from matplotlib.collections import Collection, PathCollection
from matplotlib.colors import Colormap, Normalize
from matplotlib.font_manager import FontProperties
from matplotlib.path import Path
from matplotlib.patches import Patch
from matplotlib.text import Text
from matplotlib.transforms import Transform, TransformedPatchPath, TransformedPath
from matplotlib.ticker import Formatter, Locator
from numpy.typing import ArrayLike
from collections.abc import Callable, Iterable, Sequence
from typing import Literal
from .typing import ColorType
class ClabelText(Text):
...
class ContourLabeler:
labelFmt: str | Formatter | Callable[[float], str] | dict[float, str]
labelManual: bool | Iterable[tuple[float, float]]
rightside_up: bool
labelLevelList: list[float]
labelIndiceList: list[int]
labelMappable: cm.ScalarMappable
labelCValueList: list[ColorType]
labelXYs: list[tuple[float, float]]
def clabel(self, levels: ArrayLike | None = ..., *, fontsize: str | float | None = ..., inline: bool = ..., inline_spacing: float = ..., fmt: str | Formatter | Callable[[float], str] | dict[float, str] | None = ..., colors: ColorType | Sequence[ColorType] | None = ..., use_clabeltext: bool = ..., manual: bool | Iterable[tuple[float, float]] = ..., rightside_up: bool = ..., zorder: float | None = ...) -> list[Text]:
...
@property
def labelFontProps(self) -> FontProperties:
...
@property
def labelFontSizeList(self) -> list[float]:
...
@property
def labelTextsList(self) -> list[Text]:
...
def print_label(self, linecontour: ArrayLike, labelwidth: float) -> bool:
...
def too_close(self, x: float, y: float, lw: float) -> bool:
...
def set_label_props(self, label: Text, text: str, color: ColorType) -> None:
...
def get_text(self, lev: float, fmt: str | Formatter | Callable[[float], str] | dict[float, str]) -> str:
...
def locate_label(self, linecontour: ArrayLike, labelwidth: float) -> tuple[float, float, float]:
...
def calc_label_rot_and_inline(self, slc: ArrayLike, ind: int, lw: float, lc: ArrayLike | None = ..., spacing: int = ...) -> tuple[float, list[ArrayLike]]:
...
def add_label(self, x: float, y: float, rotation: float, lev: float, cvalue: ColorType) -> None:
...
def add_label_clabeltext(self, x: float, y: float, rotation: float, lev: float, cvalue: ColorType) -> None:
...
def add_label_near(self, x: float, y: float, inline: bool = ..., inline_spacing: int = ..., transform: Transform | Literal[False] | None = ...) -> None:
...
def pop_label(self, index: int = ...) -> None:
...
def labels(self, inline: bool, inline_spacing: int) -> None:
...
def remove(self) -> None:
...
class ContourSet(ContourLabeler, Collection):
axes: Axes
levels: Iterable[float]
filled: bool
linewidths: float | ArrayLike | None
hatches: Iterable[str | None]
origin: Literal["upper", "lower", "image"] | None
extent: tuple[float, float, float, float] | None
colors: ColorType | Sequence[ColorType]
extend: Literal["neither", "both", "min", "max"]
nchunk: int
locator: Locator | None
logscale: bool
negative_linestyles: None | Literal["solid", "dashed", "dashdot", "dotted"] | Iterable[Literal["solid", "dashed", "dashdot", "dotted"]]
clip_path: Patch | Path | TransformedPath | TransformedPatchPath | None
labelTexts: list[Text]
labelCValues: list[ColorType]
allkinds: list[np.ndarray]
tcolors: list[tuple[float, float, float, float]]
tlinewidths: list[tuple[float]]
@property
def alpha(self) -> float | None:
...
@property
def antialiased(self) -> bool:
...
@antialiased.setter
def antialiased(self, aa: bool | Sequence[bool]) -> None:
...
@property
def collections(self) -> list[PathCollection]:
...
@property
def linestyles(self) -> (None | Literal["solid", "dashed", "dashdot", "dotted"] | Iterable[Literal["solid", "dashed", "dashdot", "dotted"]]):
...
def __init__(self, ax: Axes, *args, levels: Iterable[float] | None = ..., filled: bool = ..., linewidths: float | ArrayLike | None = ..., linestyles: Literal["solid", "dashed", "dashdot", "dotted"] | Iterable[Literal["solid", "dashed", "dashdot", "dotted"]] | None = ..., hatches: Iterable[str | None] = ..., alpha: float | None = ..., origin: Literal["upper", "lower", "image"] | None = ..., extent: tuple[float, float, float, float] | None = ..., cmap: str | Colormap | None = ..., colors: ColorType | Sequence[ColorType] | None = ..., norm: str | Normalize | None = ..., vmin: float | None = ..., vmax: float | None = ..., extend: Literal["neither", "both", "min", "max"] = ..., antialiased: bool | None = ..., nchunk: int = ..., locator: Locator | None = ..., transform: Transform | None = ..., negative_linestyles: Literal["solid", "dashed", "dashdot", "dotted"] | Iterable[Literal["solid", "dashed", "dashdot", "dotted"]] | None = ..., clip_path: Patch | Path | TransformedPath | TransformedPatchPath | None = ..., **kwargs) -> None:
...
def legend_elements(self, variable_name: str = ..., str_format: Callable[[float], str] = ...) -> tuple[list[Artist], list[str]]:
...
def find_nearest_contour(self, x: float, y: float, indices: Iterable[int] | None = ..., pixel: bool = ...) -> tuple[Collection, int, int, float, float, float]:
...
class QuadContourSet(ContourSet):
...

File diff suppressed because it is too large Load Diff

@ -0,0 +1,139 @@
"""
This type stub file was generated by pyright.
"""
import io
import os
from pathlib import Path
from enum import Enum
from collections.abc import Generator
from typing import NamedTuple
class _dvistate(Enum):
pre: int
outer: int
inpage: int
post_post: int
finale: int
...
class Page(NamedTuple):
text: list[Text]
boxes: list[Box]
height: int
width: int
descent: int
...
class Box(NamedTuple):
x: int
y: int
height: int
width: int
...
class Text(NamedTuple):
x: int
y: int
font: DviFont
glyph: int
width: int
@property
def font_path(self) -> Path:
...
@property
def font_size(self) -> float:
...
@property
def font_effects(self) -> dict[str, float]:
...
@property
def glyph_name_or_index(self) -> int | str:
...
class Dvi:
file: io.BufferedReader
dpi: float | None
fonts: dict[int, DviFont]
state: _dvistate
def __init__(self, filename: str | os.PathLike, dpi: float | None) -> None:
...
def __enter__(self) -> Dvi:
...
def __exit__(self, etype, evalue, etrace) -> None:
...
def __iter__(self) -> Generator[Page, None, None]:
...
def close(self) -> None:
...
class DviFont:
texname: bytes
size: float
widths: list[int]
def __init__(self, scale: float, tfm: Tfm, texname: bytes, vf: Vf | None) -> None:
...
def __eq__(self, other: object) -> bool:
...
def __ne__(self, other: object) -> bool:
...
class Vf(Dvi):
def __init__(self, filename: str | os.PathLike) -> None:
...
def __getitem__(self, code: int) -> Page:
...
class Tfm:
checksum: int
design_size: int
width: dict[int, int]
height: dict[int, int]
depth: dict[int, int]
def __init__(self, filename: str | os.PathLike) -> None:
...
class PsFont(NamedTuple):
texname: bytes
psname: bytes
effects: dict[str, float]
encoding: None | bytes
filename: str
...
class PsfontsMap:
def __new__(cls, filename: str | os.PathLike) -> PsfontsMap:
...
def __getitem__(self, texname: bytes) -> PsFont:
...
def find_tex_file(filename: str | os.PathLike) -> str:
...

@ -0,0 +1,394 @@
"""
This type stub file was generated by pyright.
"""
import os
import numpy as np
from collections.abc import Callable, Hashable, Iterable
from typing import Any, IO, Literal, TypeVar, overload
from numpy.typing import ArrayLike
from matplotlib.artist import Artist
from matplotlib.axes import Axes, SubplotBase
from matplotlib.backend_bases import FigureCanvasBase, MouseButton, MouseEvent, RendererBase
from matplotlib.colors import Colormap, Normalize
from matplotlib.colorbar import Colorbar
from matplotlib.cm import ScalarMappable
from matplotlib.gridspec import GridSpec, SubplotSpec
from matplotlib.image import FigureImage, _ImageBase
from matplotlib.layout_engine import LayoutEngine
from matplotlib.legend import Legend
from matplotlib.lines import Line2D
from matplotlib.patches import Patch, Rectangle
from matplotlib.text import Text
from matplotlib.transforms import Affine2D, Bbox, BboxBase, Transform
from .typing import ColorType, HashableList
_T = TypeVar("_T")
class SubplotParams:
def __init__(self, left: float | None = ..., bottom: float | None = ..., right: float | None = ..., top: float | None = ..., wspace: float | None = ..., hspace: float | None = ...) -> None:
...
left: float
right: float
bottom: float
top: float
wspace: float
hspace: float
def update(self, left: float | None = ..., bottom: float | None = ..., right: float | None = ..., top: float | None = ..., wspace: float | None = ..., hspace: float | None = ...) -> None:
...
class FigureBase(Artist):
artists: list[Artist]
lines: list[Line2D]
patches: list[Patch]
texts: list[Text]
images: list[_ImageBase]
legends: list[Legend]
subfigs: list[SubFigure]
stale: bool
suppressComposite: bool | None
def __init__(self, **kwargs) -> None:
...
def autofmt_xdate(self, bottom: float = ..., rotation: int = ..., ha: Literal["left", "center", "right"] = ..., which: Literal["major", "minor", "both"] = ...) -> None:
...
def get_children(self) -> list[Artist]:
...
def contains(self, mouseevent: MouseEvent) -> tuple[bool, dict[Any, Any]]:
...
def suptitle(self, t: str, **kwargs) -> Text:
...
def get_suptitle(self) -> str:
...
def supxlabel(self, t: str, **kwargs) -> Text:
...
def get_supxlabel(self) -> str:
...
def supylabel(self, t: str, **kwargs) -> Text:
...
def get_supylabel(self) -> str:
...
def get_edgecolor(self) -> ColorType:
...
def get_facecolor(self) -> ColorType:
...
def get_frameon(self) -> bool:
...
def set_linewidth(self, linewidth: float) -> None:
...
def get_linewidth(self) -> float:
...
def set_edgecolor(self, color: ColorType) -> None:
...
def set_facecolor(self, color: ColorType) -> None:
...
def set_frameon(self, b: bool) -> None:
...
@property
def frameon(self) -> bool:
...
@frameon.setter
def frameon(self, b: bool) -> None:
...
def add_artist(self, artist: Artist, clip: bool = ...) -> Artist:
...
@overload
def add_axes(self, ax: Axes) -> Axes:
...
@overload
def add_axes(self, rect: tuple[float, float, float, float], projection: None | str = ..., polar: bool = ..., **kwargs) -> Axes:
...
@overload
def add_subplot(self, nrows: int, ncols: int, index: int | tuple[int, int], **kwargs) -> Axes:
...
@overload
def add_subplot(self, pos: int, **kwargs) -> Axes:
...
@overload
def add_subplot(self, ax: Axes, **kwargs) -> Axes:
...
@overload
def add_subplot(self, ax: SubplotSpec, **kwargs) -> Axes:
...
@overload
def add_subplot(self, **kwargs) -> Axes:
...
@overload
def subplots(self, nrows: int = ..., ncols: int = ..., *, sharex: bool | Literal["none", "all", "row", "col"] = ..., sharey: bool | Literal["none", "all", "row", "col"] = ..., squeeze: Literal[False], width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., subplot_kw: dict[str, Any] | None = ..., gridspec_kw: dict[str, Any] | None = ...) -> np.ndarray:
...
@overload
def subplots(self, nrows: int = ..., ncols: int = ..., *, sharex: bool | Literal["none", "all", "row", "col"] = ..., sharey: bool | Literal["none", "all", "row", "col"] = ..., squeeze: bool = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., subplot_kw: dict[str, Any] | None = ..., gridspec_kw: dict[str, Any] | None = ...) -> np.ndarray | SubplotBase | Axes:
...
def delaxes(self, ax: Axes) -> None:
...
def clear(self, keep_observers: bool = ...) -> None:
...
def clf(self, keep_observers: bool = ...) -> None:
...
@overload
def legend(self) -> Legend:
...
@overload
def legend(self, handles: Iterable[Artist], labels: Iterable[str], **kwargs) -> Legend:
...
@overload
def legend(self, *, handles: Iterable[Artist], **kwargs) -> Legend:
...
@overload
def legend(self, labels: Iterable[str], **kwargs) -> Legend:
...
@overload
def legend(self, **kwargs) -> Legend:
...
def text(self, x: float, y: float, s: str, fontdict: dict[str, Any] | None = ..., **kwargs) -> Text:
...
def colorbar(self, mappable: ScalarMappable, cax: Axes | None = ..., ax: Axes | Iterable[Axes] | None = ..., use_gridspec: bool = ..., **kwargs) -> Colorbar:
...
def subplots_adjust(self, left: float | None = ..., bottom: float | None = ..., right: float | None = ..., top: float | None = ..., wspace: float | None = ..., hspace: float | None = ...) -> None:
...
def align_xlabels(self, axs: Iterable[Axes] | None = ...) -> None:
...
def align_ylabels(self, axs: Iterable[Axes] | None = ...) -> None:
...
def align_labels(self, axs: Iterable[Axes] | None = ...) -> None:
...
def add_gridspec(self, nrows: int = ..., ncols: int = ..., **kwargs) -> GridSpec:
...
@overload
def subfigures(self, nrows: int = ..., ncols: int = ..., squeeze: Literal[False] = ..., wspace: float | None = ..., hspace: float | None = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., **kwargs) -> np.ndarray:
...
@overload
def subfigures(self, nrows: int = ..., ncols: int = ..., squeeze: Literal[True] = ..., wspace: float | None = ..., hspace: float | None = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., **kwargs) -> np.ndarray | SubFigure:
...
def add_subfigure(self, subplotspec: SubplotSpec, **kwargs) -> SubFigure:
...
def sca(self, a: Axes) -> Axes:
...
def gca(self) -> Axes:
...
def get_default_bbox_extra_artists(self) -> list[Artist]:
...
def get_tightbbox(self, renderer: RendererBase | None = ..., *, bbox_extra_artists: Iterable[Artist] | None = ...) -> Bbox:
...
@overload
def subplot_mosaic(self, mosaic: str, *, sharex: bool = ..., sharey: bool = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., empty_sentinel: str = ..., subplot_kw: dict[str, Any] | None = ..., per_subplot_kw: dict[str | tuple[str, ...], dict[str, Any]] | None = ..., gridspec_kw: dict[str, Any] | None = ...) -> dict[str, Axes]:
...
@overload
def subplot_mosaic(self, mosaic: list[HashableList[_T]], *, sharex: bool = ..., sharey: bool = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., empty_sentinel: _T = ..., subplot_kw: dict[str, Any] | None = ..., per_subplot_kw: dict[_T | tuple[_T, ...], dict[str, Any]] | None = ..., gridspec_kw: dict[str, Any] | None = ...) -> dict[_T, Axes]:
...
@overload
def subplot_mosaic(self, mosaic: list[HashableList[Hashable]], *, sharex: bool = ..., sharey: bool = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., empty_sentinel: Any = ..., subplot_kw: dict[str, Any] | None = ..., per_subplot_kw: dict[Hashable | tuple[Hashable, ...], dict[str, Any]] | None = ..., gridspec_kw: dict[str, Any] | None = ...) -> dict[Hashable, Axes]:
...
class SubFigure(FigureBase):
figure: Figure
subplotpars: SubplotParams
dpi_scale_trans: Affine2D
canvas: FigureCanvasBase
transFigure: Transform
bbox_relative: Bbox
figbbox: BboxBase
bbox: BboxBase
transSubfigure: Transform
patch: Rectangle
def __init__(self, parent: Figure | SubFigure, subplotspec: SubplotSpec, *, facecolor: ColorType | None = ..., edgecolor: ColorType | None = ..., linewidth: float = ..., frameon: bool | None = ..., **kwargs) -> None:
...
@property
def dpi(self) -> float:
...
@dpi.setter
def dpi(self, value: float) -> None:
...
def get_dpi(self) -> float:
...
def set_dpi(self, val) -> None:
...
def get_constrained_layout(self) -> bool:
...
def get_constrained_layout_pads(self, relative: bool = ...) -> tuple[float, float, float, float]:
...
def get_layout_engine(self) -> LayoutEngine:
...
@property
def axes(self) -> list[Axes]:
...
def get_axes(self) -> list[Axes]:
...
class Figure(FigureBase):
figure: Figure
bbox_inches: Bbox
dpi_scale_trans: Affine2D
bbox: BboxBase
figbbox: BboxBase
transFigure: Transform
transSubfigure: Transform
patch: Rectangle
subplotpars: SubplotParams
def __init__(self, figsize: tuple[float, float] | None = ..., dpi: float | None = ..., *, facecolor: ColorType | None = ..., edgecolor: ColorType | None = ..., linewidth: float = ..., frameon: bool | None = ..., subplotpars: SubplotParams | None = ..., tight_layout: bool | dict[str, Any] | None = ..., constrained_layout: bool | dict[str, Any] | None = ..., layout: Literal["constrained", "compressed", "tight"] | LayoutEngine | None = ..., **kwargs) -> None:
...
def pick(self, mouseevent: MouseEvent) -> None:
...
def set_layout_engine(self, layout: Literal["constrained", "compressed", "tight", "none"] | LayoutEngine | None = ..., **kwargs) -> None:
...
def get_layout_engine(self) -> LayoutEngine | None:
...
def show(self, warn: bool = ...) -> None:
...
@property
def axes(self) -> list[Axes]:
...
def get_axes(self) -> list[Axes]:
...
@property
def dpi(self) -> float:
...
@dpi.setter
def dpi(self, dpi: float) -> None:
...
def get_tight_layout(self) -> bool:
...
def get_constrained_layout_pads(self, relative: bool = ...) -> tuple[float, float, float, float]:
...
def get_constrained_layout(self) -> bool:
...
canvas: FigureCanvasBase
def set_canvas(self, canvas: FigureCanvasBase) -> None:
...
def figimage(self, X: ArrayLike, xo: int = ..., yo: int = ..., alpha: float | None = ..., norm: str | Normalize | None = ..., cmap: str | Colormap | None = ..., vmin: float | None = ..., vmax: float | None = ..., origin: Literal["upper", "lower"] | None = ..., resize: bool = ..., **kwargs) -> FigureImage:
...
def set_size_inches(self, w: float | tuple[float, float], h: float | None = ..., forward: bool = ...) -> None:
...
def get_size_inches(self) -> np.ndarray:
...
def get_figwidth(self) -> float:
...
def get_figheight(self) -> float:
...
def get_dpi(self) -> float:
...
def set_dpi(self, val: float) -> None:
...
def set_figwidth(self, val: float, forward: bool = ...) -> None:
...
def set_figheight(self, val: float, forward: bool = ...) -> None:
...
def clear(self, keep_observers: bool = ...) -> None:
...
def draw_without_rendering(self) -> None:
...
def draw_artist(self, a: Artist) -> None:
...
def add_axobserver(self, func: Callable[[Figure], Any]) -> None:
...
def savefig(self, fname: str | os.PathLike | IO, *, transparent: bool | None = ..., **kwargs) -> None:
...
def ginput(self, n: int = ..., timeout: float = ..., show_clicks: bool = ..., mouse_add: MouseButton = ..., mouse_pop: MouseButton = ..., mouse_stop: MouseButton = ...) -> list[tuple[int, int]]:
...
def waitforbuttonpress(self, timeout: float = ...) -> None | bool:
...
def tight_layout(self, *, pad: float = ..., h_pad: float | None = ..., w_pad: float | None = ..., rect: tuple[float, float, float, float] | None = ...) -> None:
...
def figaspect(arg: float | ArrayLike) -> tuple[float, float]:
...

@ -0,0 +1,197 @@
"""
This type stub file was generated by pyright.
"""
import os
from dataclasses import dataclass
from matplotlib._afm import AFM
from matplotlib import ft2font
from pathlib import Path
from collections.abc import Iterable
from typing import Any, Literal
font_scalings: dict[str | None, float]
stretch_dict: dict[str, int]
weight_dict: dict[str, int]
font_family_aliases: set[str]
MSFolders: str
MSFontDirectories: list[str]
MSUserFontDirectories: list[str]
X11FontDirectories: list[str]
OSXFontDirectories: list[str]
def get_fontext_synonyms(fontext: str) -> list[str]:
...
def list_fonts(directory: str, extensions: Iterable[str]) -> list[str]:
...
def win32FontDirectory() -> str:
...
def findSystemFonts(fontpaths: Iterable[str | os.PathLike | Path] | None = ..., fontext: str = ...) -> list[str]:
...
@dataclass
class FontEntry:
fname: str = ...
name: str = ...
style: str = ...
variant: str = ...
weight: str | int = ...
stretch: str = ...
size: str = ...
def ttfFontProperty(font: ft2font.FT2Font) -> FontEntry:
...
def afmFontProperty(fontpath: str, font: AFM) -> FontEntry:
...
class FontProperties:
def __init__(self, family: str | Iterable[str] | None = ..., style: Literal["normal", "italic", "oblique"] | None = ..., variant: Literal["normal", "small-caps"] | None = ..., weight: int | str | None = ..., stretch: int | str | None = ..., size: float | str | None = ..., fname: str | os.PathLike | Path | None = ..., math_fontfamily: str | None = ...) -> None:
...
def __hash__(self) -> int:
...
def __eq__(self, other: object) -> bool:
...
def get_family(self) -> list[str]:
...
def get_name(self) -> str:
...
def get_style(self) -> Literal["normal", "italic", "oblique"]:
...
def get_variant(self) -> Literal["normal", "small-caps"]:
...
def get_weight(self) -> int | str:
...
def get_stretch(self) -> int | str:
...
def get_size(self) -> float:
...
def get_file(self) -> str | bytes | None:
...
def get_fontconfig_pattern(self) -> dict[str, list[Any]]:
...
def set_family(self, family: str | Iterable[str] | None) -> None:
...
def set_style(self, style: Literal["normal", "italic", "oblique"] | None) -> None:
...
def set_variant(self, variant: Literal["normal", "small-caps"] | None) -> None:
...
def set_weight(self, weight: int | str | None) -> None:
...
def set_stretch(self, stretch: int | str | None) -> None:
...
def set_size(self, size: float | str | None) -> None:
...
def set_file(self, file: str | os.PathLike | Path | None) -> None:
...
def set_fontconfig_pattern(self, pattern: str) -> None:
...
def get_math_fontfamily(self) -> str:
...
def set_math_fontfamily(self, fontfamily: str | None) -> None:
...
def copy(self) -> FontProperties:
...
set_name = ...
get_slant = ...
set_slant = ...
get_size_in_points = ...
def json_dump(data: FontManager, filename: str | Path | os.PathLike) -> None:
...
def json_load(filename: str | Path | os.PathLike) -> FontManager:
...
class FontManager:
__version__: int
default_size: float | None
defaultFamily: dict[str, str]
afmlist: list[FontEntry]
ttflist: list[FontEntry]
def __init__(self, size: float | None = ..., weight: str = ...) -> None:
...
def addfont(self, path: str | Path | os.PathLike) -> None:
...
@property
def defaultFont(self) -> dict[str, str]:
...
def get_default_weight(self) -> str:
...
@staticmethod
def get_default_size() -> float:
...
def set_default_weight(self, weight: str) -> None:
...
def score_family(self, families: str | list[str] | tuple[str], family2: str) -> float:
...
def score_style(self, style1: str, style2: str) -> float:
...
def score_variant(self, variant1: str, variant2: str) -> float:
...
def score_stretch(self, stretch1: str | int, stretch2: str | int) -> float:
...
def score_weight(self, weight1: str | float, weight2: str | float) -> float:
...
def score_size(self, size1: str | float, size2: str | float) -> float:
...
def findfont(self, prop: str | FontProperties, fontext: Literal["ttf", "afm"] = ..., directory: str | None = ..., fallback_to_default: bool = ..., rebuild_if_missing: bool = ...) -> str:
...
def get_font_names(self) -> list[str]:
...
def is_opentype_cff_font(filename: str) -> bool:
...
def get_font(font_filepaths: Iterable[str | Path | bytes] | str | Path | bytes, hinting_factor: int | None = ...) -> ft2font.FT2Font:
...
fontManager: FontManager
def findfont(prop: str | FontProperties, fontext: Literal["ttf", "afm"] = ..., directory: str | None = ..., fallback_to_default: bool = ..., rebuild_if_missing: bool = ...) -> str:
...
def get_font_names() -> list[str]:
...

@ -0,0 +1,327 @@
"""
This type stub file was generated by pyright.
"""
import numpy as np
from typing import BinaryIO, Literal, TypedDict, overload
from numpy.typing import NDArray
__freetype_build_type__: str
__freetype_version__: str
BOLD: int
EXTERNAL_STREAM: int
FAST_GLYPHS: int
FIXED_SIZES: int
FIXED_WIDTH: int
GLYPH_NAMES: int
HORIZONTAL: int
ITALIC: int
KERNING: int
KERNING_DEFAULT: int
KERNING_UNFITTED: int
KERNING_UNSCALED: int
LOAD_CROP_BITMAP: int
LOAD_DEFAULT: int
LOAD_FORCE_AUTOHINT: int
LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH: int
LOAD_IGNORE_TRANSFORM: int
LOAD_LINEAR_DESIGN: int
LOAD_MONOCHROME: int
LOAD_NO_AUTOHINT: int
LOAD_NO_BITMAP: int
LOAD_NO_HINTING: int
LOAD_NO_RECURSE: int
LOAD_NO_SCALE: int
LOAD_PEDANTIC: int
LOAD_RENDER: int
LOAD_TARGET_LCD: int
LOAD_TARGET_LCD_V: int
LOAD_TARGET_LIGHT: int
LOAD_TARGET_MONO: int
LOAD_TARGET_NORMAL: int
LOAD_VERTICAL_LAYOUT: int
MULTIPLE_MASTERS: int
SCALABLE: int
SFNT: int
VERTICAL: int
class _SfntHeadDict(TypedDict):
version: tuple[int, int]
fontRevision: tuple[int, int]
checkSumAdjustment: int
magicNumber: int
flags: int
unitsPerEm: int
created: tuple[int, int]
modified: tuple[int, int]
xMin: int
yMin: int
xMax: int
yMax: int
macStyle: int
lowestRecPPEM: int
fontDirectionHint: int
indexToLocFormat: int
glyphDataFormat: int
...
class _SfntMaxpDict(TypedDict):
version: tuple[int, int]
numGlyphs: int
maxPoints: int
maxContours: int
maxComponentPoints: int
maxComponentContours: int
maxZones: int
maxTwilightPoints: int
maxStorage: int
maxFunctionDefs: int
maxInstructionDefs: int
maxStackElements: int
maxSizeOfInstructions: int
maxComponentElements: int
maxComponentDepth: int
...
class _SfntOs2Dict(TypedDict):
version: int
xAvgCharWidth: int
usWeightClass: int
usWidthClass: int
fsType: int
ySubscriptXSize: int
ySubscriptYSize: int
ySubscriptXOffset: int
ySubscriptYOffset: int
ySuperscriptXSize: int
ySuperscriptYSize: int
ySuperscriptXOffset: int
ySuperscriptYOffset: int
yStrikeoutSize: int
yStrikeoutPosition: int
sFamilyClass: int
panose: bytes
ulCharRange: tuple[int, int, int, int]
achVendID: bytes
fsSelection: int
fsFirstCharIndex: int
fsLastCharIndex: int
...
class _SfntHheaDict(TypedDict):
version: tuple[int, int]
ascent: int
descent: int
lineGap: int
advanceWidthMax: int
minLeftBearing: int
minRightBearing: int
xMaxExtent: int
caretSlopeRise: int
caretSlopeRun: int
caretOffset: int
metricDataFormat: int
numOfLongHorMetrics: int
...
class _SfntVheaDict(TypedDict):
version: tuple[int, int]
vertTypoAscender: int
vertTypoDescender: int
vertTypoLineGap: int
advanceHeightMax: int
minTopSideBearing: int
minBottomSizeBearing: int
yMaxExtent: int
caretSlopeRise: int
caretSlopeRun: int
caretOffset: int
metricDataFormat: int
numOfLongVerMetrics: int
...
class _SfntPostDict(TypedDict):
format: tuple[int, int]
italicAngle: tuple[int, int]
underlinePosition: int
underlineThickness: int
isFixedPitch: int
minMemType42: int
maxMemType42: int
minMemType1: int
maxMemType1: int
...
class _SfntPcltDict(TypedDict):
version: tuple[int, int]
fontNumber: int
pitch: int
xHeight: int
style: int
typeFamily: int
capHeight: int
symbolSet: int
typeFace: bytes
characterComplement: bytes
strokeWeight: int
widthType: int
serifStyle: int
...
class FT2Font:
ascender: int
bbox: tuple[int, int, int, int]
descender: int
face_flags: int
family_name: str
fname: str
height: int
max_advance_height: int
max_advance_width: int
num_charmaps: int
num_faces: int
num_fixed_sizes: int
num_glyphs: int
postscript_name: str
scalable: bool
style_flags: int
style_name: str
underline_position: int
underline_thickness: int
units_per_EM: int
def __init__(self, filename: str | BinaryIO, hinting_factor: int = ..., *, _fallback_list: list[FT2Font] | None = ..., _kerning_factor: int = ...) -> None:
...
def clear(self) -> None:
...
def draw_glyph_to_bitmap(self, image: FT2Image, x: float, y: float, glyph: Glyph, antialiased: bool = ...) -> None:
...
def draw_glyphs_to_bitmap(self, antialiased: bool = ...) -> None:
...
def get_bitmap_offset(self) -> tuple[int, int]:
...
def get_char_index(self, codepoint: int) -> int:
...
def get_charmap(self) -> dict[int, int]:
...
def get_descent(self) -> int:
...
def get_glyph_name(self, index: int) -> str:
...
def get_image(self) -> NDArray[np.uint8]:
...
def get_kerning(self, left: int, right: int, mode: int) -> int:
...
def get_name_index(self, name: str) -> int:
...
def get_num_glyphs(self) -> int:
...
def get_path(self) -> tuple[NDArray[np.float64], NDArray[np.int8]]:
...
def get_ps_font_info(self) -> tuple[str, str, str, str, str, int, int, int, int]:
...
def get_sfnt(self) -> dict[tuple[int, int, int, int], bytes]:
...
@overload
def get_sfnt_table(self, name: Literal["head"]) -> _SfntHeadDict | None:
...
@overload
def get_sfnt_table(self, name: Literal["maxp"]) -> _SfntMaxpDict | None:
...
@overload
def get_sfnt_table(self, name: Literal["OS/2"]) -> _SfntOs2Dict | None:
...
@overload
def get_sfnt_table(self, name: Literal["hhea"]) -> _SfntHheaDict | None:
...
@overload
def get_sfnt_table(self, name: Literal["vhea"]) -> _SfntVheaDict | None:
...
@overload
def get_sfnt_table(self, name: Literal["post"]) -> _SfntPostDict | None:
...
@overload
def get_sfnt_table(self, name: Literal["pclt"]) -> _SfntPcltDict | None:
...
def get_width_height(self) -> tuple[int, int]:
...
def get_xys(self, antialiased: bool = ...) -> NDArray[np.float64]:
...
def load_char(self, charcode: int, flags: int = ...) -> Glyph:
...
def load_glyph(self, glyphindex: int, flags: int = ...) -> Glyph:
...
def select_charmap(self, i: int) -> None:
...
def set_charmap(self, i: int) -> None:
...
def set_size(self, ptsize: float, dpi: float) -> None:
...
def set_text(self, string: str, angle: float = ..., flags: int = ...) -> NDArray[np.float64]:
...
class FT2Image:
def __init__(self, width: float, height: float) -> None:
...
def draw_rect(self, x0: float, y0: float, x1: float, y1: float) -> None:
...
def draw_rect_filled(self, x0: float, y0: float, x1: float, y1: float) -> None:
...
class Glyph:
width: int
height: int
horiBearingX: int
horiBearingY: int
horiAdvance: int
linearHoriAdvance: int
vertBearingX: int
vertBearingY: int
vertAdvance: int
@property
def bbox(self) -> tuple[int, int, int, int]:
...

@ -0,0 +1,149 @@
"""
This type stub file was generated by pyright.
"""
import numpy as np
from typing import Any, Literal, overload
from numpy.typing import ArrayLike
from matplotlib.axes import Axes, SubplotBase
from matplotlib.backend_bases import RendererBase
from matplotlib.figure import Figure, SubplotParams
from matplotlib.transforms import Bbox
class GridSpecBase:
def __init__(self, nrows: int, ncols: int, height_ratios: ArrayLike | None = ..., width_ratios: ArrayLike | None = ...) -> None:
...
@property
def nrows(self) -> int:
...
@property
def ncols(self) -> int:
...
def get_geometry(self) -> tuple[int, int]:
...
def get_subplot_params(self, figure: Figure | None = ...) -> SubplotParams:
...
def new_subplotspec(self, loc: tuple[int, int], rowspan: int = ..., colspan: int = ...) -> SubplotSpec:
...
def set_width_ratios(self, width_ratios: ArrayLike | None) -> None:
...
def get_width_ratios(self) -> ArrayLike:
...
def set_height_ratios(self, height_ratios: ArrayLike | None) -> None:
...
def get_height_ratios(self) -> ArrayLike:
...
def get_grid_positions(self, fig: Figure, raw: bool = ...) -> tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray]:
...
def __getitem__(self, key: tuple[int | slice, int | slice] | slice | int) -> SubplotSpec:
...
@overload
def subplots(self, *, sharex: bool | Literal["all", "row", "col", "none"] = ..., sharey: bool | Literal["all", "row", "col", "none"] = ..., squeeze: Literal[False], subplot_kw: dict[str, Any] | None = ...) -> np.ndarray:
...
@overload
def subplots(self, *, sharex: bool | Literal["all", "row", "col", "none"] = ..., sharey: bool | Literal["all", "row", "col", "none"] = ..., squeeze: Literal[True] = ..., subplot_kw: dict[str, Any] | None = ...) -> np.ndarray | SubplotBase | Axes:
...
class GridSpec(GridSpecBase):
left: float | None
bottom: float | None
right: float | None
top: float | None
wspace: float | None
hspace: float | None
figure: Figure | None
def __init__(self, nrows: int, ncols: int, figure: Figure | None = ..., left: float | None = ..., bottom: float | None = ..., right: float | None = ..., top: float | None = ..., wspace: float | None = ..., hspace: float | None = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ...) -> None:
...
def update(self, **kwargs: float | None) -> None:
...
def locally_modified_subplot_params(self) -> list[str]:
...
def tight_layout(self, figure: Figure, renderer: RendererBase | None = ..., pad: float = ..., h_pad: float | None = ..., w_pad: float | None = ..., rect: tuple[float, float, float, float] | None = ...) -> None:
...
class GridSpecFromSubplotSpec(GridSpecBase):
figure: Figure | None
def __init__(self, nrows: int, ncols: int, subplot_spec: SubplotSpec, wspace: float | None = ..., hspace: float | None = ..., height_ratios: ArrayLike | None = ..., width_ratios: ArrayLike | None = ...) -> None:
...
def get_topmost_subplotspec(self) -> SubplotSpec:
...
class SubplotSpec:
num1: int
def __init__(self, gridspec: GridSpecBase, num1: int, num2: int | None = ...) -> None:
...
@property
def num2(self) -> int:
...
@num2.setter
def num2(self, value: int) -> None:
...
def get_gridspec(self) -> GridSpec:
...
def get_geometry(self) -> tuple[int, int, int, int]:
...
@property
def rowspan(self) -> range:
...
@property
def colspan(self) -> range:
...
def is_first_row(self) -> bool:
...
def is_last_row(self) -> bool:
...
def is_first_col(self) -> bool:
...
def is_last_col(self) -> bool:
...
def get_position(self, figure: Figure) -> Bbox:
...
def get_topmost_subplotspec(self) -> SubplotSpec:
...
def __eq__(self, other: object) -> bool:
...
def __hash__(self) -> int:
...
def subgridspec(self, nrows: int, ncols: int, **kwargs) -> GridSpecFromSubplotSpec:
...

@ -0,0 +1,115 @@
"""
This type stub file was generated by pyright.
"""
import numpy as np
from matplotlib.path import Path
from numpy.typing import ArrayLike
class HatchPatternBase:
...
class HorizontalHatch(HatchPatternBase):
num_lines: int
num_vertices: int
def __init__(self, hatch: str, density: int) -> None:
...
def set_vertices_and_codes(self, vertices: ArrayLike, codes: ArrayLike) -> None:
...
class VerticalHatch(HatchPatternBase):
num_lines: int
num_vertices: int
def __init__(self, hatch: str, density: int) -> None:
...
def set_vertices_and_codes(self, vertices: ArrayLike, codes: ArrayLike) -> None:
...
class NorthEastHatch(HatchPatternBase):
num_lines: int
num_vertices: int
def __init__(self, hatch: str, density: int) -> None:
...
def set_vertices_and_codes(self, vertices: ArrayLike, codes: ArrayLike) -> None:
...
class SouthEastHatch(HatchPatternBase):
num_lines: int
num_vertices: int
def __init__(self, hatch: str, density: int) -> None:
...
def set_vertices_and_codes(self, vertices: ArrayLike, codes: ArrayLike) -> None:
...
class Shapes(HatchPatternBase):
filled: bool
num_shapes: int
num_vertices: int
def __init__(self, hatch: str, density: int) -> None:
...
def set_vertices_and_codes(self, vertices: ArrayLike, codes: ArrayLike) -> None:
...
class Circles(Shapes):
shape_vertices: np.ndarray
shape_codes: np.ndarray
def __init__(self, hatch: str, density: int) -> None:
...
class SmallCircles(Circles):
size: float
num_rows: int
def __init__(self, hatch: str, density: int) -> None:
...
class LargeCircles(Circles):
size: float
num_rows: int
def __init__(self, hatch: str, density: int) -> None:
...
class SmallFilledCircles(Circles):
size: float
filled: bool
num_rows: int
def __init__(self, hatch: str, density: int) -> None:
...
class Stars(Shapes):
size: float
filled: bool
num_rows: int
shape_vertices: np.ndarray
shape_codes: np.ndarray
def __init__(self, hatch: str, density: int) -> None:
...
def get_path(hatchpattern: str, density: int = ...) -> Path:
...

@ -0,0 +1,188 @@
"""
This type stub file was generated by pyright.
"""
import os
import pathlib
import numpy as np
import PIL.Image
import matplotlib.artist as martist
from collections.abc import Callable, Sequence
from typing import Any, BinaryIO, Literal
from numpy.typing import ArrayLike, NDArray
from matplotlib.axes import Axes
from matplotlib import cm
from matplotlib.backend_bases import MouseEvent, RendererBase
from matplotlib.colors import Colormap, Normalize
from matplotlib.figure import Figure
from matplotlib.transforms import Affine2D, Bbox, BboxBase, Transform
BESSEL: int
BICUBIC: int
BILINEAR: int
BLACKMAN: int
CATROM: int
GAUSSIAN: int
HAMMING: int
HANNING: int
HERMITE: int
KAISER: int
LANCZOS: int
MITCHELL: int
NEAREST: int
QUADRIC: int
SINC: int
SPLINE16: int
SPLINE36: int
def resample(input_array: NDArray[np.float32] | NDArray[np.float64] | NDArray[np.int8], output_array: NDArray[np.float32] | NDArray[np.float64] | NDArray[np.int8], transform: Transform, interpolation: int = ..., resample: bool = ..., alpha: float = ..., norm: bool = ..., radius: float = ...) -> None:
...
interpolations_names: set[str]
def composite_images(images: Sequence[_ImageBase], renderer: RendererBase, magnification: float = ...) -> tuple[np.ndarray, float, float]:
...
class _ImageBase(martist.Artist, cm.ScalarMappable):
zorder: float
origin: Literal["upper", "lower"]
axes: Axes
def __init__(self, ax: Axes, cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., interpolation: str | None = ..., origin: Literal["upper", "lower"] | None = ..., filternorm: bool = ..., filterrad: float = ..., resample: bool | None = ..., *, interpolation_stage: Literal["data", "rgba"] | None = ..., **kwargs) -> None:
...
def get_size(self) -> tuple[int, int]:
...
def set_alpha(self, alpha: float | ArrayLike | None) -> None:
...
def changed(self) -> None:
...
def make_image(self, renderer: RendererBase, magnification: float = ..., unsampled: bool = ...) -> tuple[np.ndarray, float, float, Affine2D]:
...
def draw(self, renderer: RendererBase, *args, **kwargs) -> None:
...
def write_png(self, fname: str | pathlib.Path | BinaryIO) -> None:
...
def set_data(self, A: ArrayLike | None) -> None:
...
def set_array(self, A: ArrayLike | None) -> None:
...
def get_shape(self) -> tuple[int, int, int]:
...
def get_interpolation(self) -> str:
...
def set_interpolation(self, s: str | None) -> None:
...
def set_interpolation_stage(self, s: Literal["data", "rgba"]) -> None:
...
def can_composite(self) -> bool:
...
def set_resample(self, v: bool | None) -> None:
...
def get_resample(self) -> bool:
...
def set_filternorm(self, filternorm: bool) -> None:
...
def get_filternorm(self) -> bool:
...
def set_filterrad(self, filterrad: float) -> None:
...
def get_filterrad(self) -> float:
...
class AxesImage(_ImageBase):
def __init__(self, ax: Axes, *, cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., interpolation: str | None = ..., origin: Literal["upper", "lower"] | None = ..., extent: tuple[float, float, float, float] | None = ..., filternorm: bool = ..., filterrad: float = ..., resample: bool = ..., interpolation_stage: Literal["data", "rgba"] | None = ..., **kwargs) -> None:
...
def get_window_extent(self, renderer: RendererBase | None = ...) -> Bbox:
...
def make_image(self, renderer: RendererBase, magnification: float = ..., unsampled: bool = ...) -> tuple[np.ndarray, float, float, Affine2D]:
...
def set_extent(self, extent: tuple[float, float, float, float], **kwargs) -> None:
...
def get_extent(self) -> tuple[float, float, float, float]:
...
def get_cursor_data(self, event: MouseEvent) -> None | float:
...
class NonUniformImage(AxesImage):
mouseover: bool
def __init__(self, ax: Axes, *, interpolation: Literal["nearest", "bilinear"] = ..., **kwargs) -> None:
...
def set_data(self, x: ArrayLike, y: ArrayLike, A: ArrayLike) -> None:
...
def set_interpolation(self, s: Literal["nearest", "bilinear"]) -> None:
...
class PcolorImage(AxesImage):
def __init__(self, ax: Axes, x: ArrayLike | None = ..., y: ArrayLike | None = ..., A: ArrayLike | None = ..., *, cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., **kwargs) -> None:
...
def set_data(self, x: ArrayLike, y: ArrayLike, A: ArrayLike) -> None:
...
class FigureImage(_ImageBase):
zorder: float
figure: Figure
ox: float
oy: float
magnification: float
def __init__(self, fig: Figure, *, cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., offsetx: int = ..., offsety: int = ..., origin: Literal["upper", "lower"] | None = ..., **kwargs) -> None:
...
def get_extent(self) -> tuple[float, float, float, float]:
...
class BboxImage(_ImageBase):
bbox: BboxBase
def __init__(self, bbox: BboxBase | Callable[[RendererBase | None], Bbox], *, cmap: str | Colormap | None = ..., norm: str | Normalize | None = ..., interpolation: str | None = ..., origin: Literal["upper", "lower"] | None = ..., filternorm: bool = ..., filterrad: float = ..., resample: bool = ..., **kwargs) -> None:
...
def get_window_extent(self, renderer: RendererBase | None = ...) -> Bbox:
...
def imread(fname: str | pathlib.Path | BinaryIO, format: str | None = ...) -> np.ndarray:
...
def imsave(fname: str | os.PathLike | BinaryIO, arr: ArrayLike, vmin: float | None = ..., vmax: float | None = ..., cmap: str | Colormap | None = ..., format: str | None = ..., origin: Literal["upper", "lower"] | None = ..., dpi: float = ..., *, metadata: dict[str, str] | None = ..., pil_kwargs: dict[str, Any] | None = ...) -> None:
...
def pil_to_array(pilImage: PIL.Image.Image) -> np.ndarray:
...
def thumbnail(infile: str | BinaryIO, thumbfile: str | BinaryIO, scale: float = ..., interpolation: str = ..., preview: bool = ...) -> Figure:
...

@ -0,0 +1,63 @@
"""
This type stub file was generated by pyright.
"""
from matplotlib.figure import Figure
from typing import Any
class LayoutEngine:
def __init__(self, **kwargs: Any) -> None:
...
def set(self) -> None:
...
@property
def colorbar_gridspec(self) -> bool:
...
@property
def adjust_compatible(self) -> bool:
...
def get(self) -> dict[str, Any]:
...
def execute(self, fig: Figure) -> None:
...
class PlaceHolderLayoutEngine(LayoutEngine):
def __init__(self, adjust_compatible: bool, colorbar_gridspec: bool, **kwargs: Any) -> None:
...
def execute(self, fig: Figure) -> None:
...
class TightLayoutEngine(LayoutEngine):
def __init__(self, *, pad: float = ..., h_pad: float | None = ..., w_pad: float | None = ..., rect: tuple[float, float, float, float] = ..., **kwargs: Any) -> None:
...
def execute(self, fig: Figure) -> None:
...
def set(self, *, pad: float | None = ..., w_pad: float | None = ..., h_pad: float | None = ..., rect: tuple[float, float, float, float] | None = ...) -> None:
...
class ConstrainedLayoutEngine(LayoutEngine):
def __init__(self, *, h_pad: float | None = ..., w_pad: float | None = ..., hspace: float | None = ..., wspace: float | None = ..., rect: tuple[float, float, float, float] = ..., compress: bool = ..., **kwargs: Any) -> None:
...
def execute(self, fig: Figure) -> Any:
...
def set(self, *, h_pad: float | None = ..., w_pad: float | None = ..., hspace: float | None = ..., wspace: float | None = ..., rect: tuple[float, float, float, float] | None = ...) -> None:
...

@ -0,0 +1,139 @@
"""
This type stub file was generated by pyright.
"""
import pathlib
from matplotlib.axes import Axes
from matplotlib.artist import Artist
from matplotlib.backend_bases import MouseEvent
from matplotlib.figure import Figure
from matplotlib.font_manager import FontProperties
from matplotlib.legend_handler import HandlerBase
from matplotlib.lines import Line2D
from matplotlib.offsetbox import DraggableOffsetBox
from matplotlib.patches import FancyBboxPatch, Patch, Rectangle
from matplotlib.text import Text
from matplotlib.transforms import BboxBase, Transform
from collections.abc import Iterable
from typing import Any, Literal, overload
from .typing import ColorType
class DraggableLegend(DraggableOffsetBox):
legend: Legend
def __init__(self, legend: Legend, use_blit: bool = ..., update: Literal["loc", "bbox"] = ...) -> None:
...
def finalize_offset(self) -> None:
...
class Legend(Artist):
codes: dict[str, int]
zorder: float
prop: FontProperties
texts: list[Text]
legend_handles: list[Artist | None]
numpoints: int
markerscale: float
scatterpoints: int
borderpad: float
labelspacing: float
handlelength: float
handleheight: float
handletextpad: float
borderaxespad: float
columnspacing: float
shadow: bool
isaxes: bool
axes: Axes
parent: Axes | Figure
legendPatch: FancyBboxPatch
def __init__(self, parent: Axes | Figure, handles: Iterable[Artist | tuple[Artist, ...]], labels: Iterable[str], *, loc: str | tuple[float, float] | int | None = ..., numpoints: int | None = ..., markerscale: float | None = ..., markerfirst: bool = ..., reverse: bool = ..., scatterpoints: int | None = ..., scatteryoffsets: Iterable[float] | None = ..., prop: FontProperties | dict[str, Any] | None = ..., fontsize: float | str | None = ..., labelcolor: ColorType | Iterable[ColorType] | Literal["linecolor", "markerfacecolor", "mfc", "markeredgecolor", "mec"] | None = ..., borderpad: float | None = ..., labelspacing: float | None = ..., handlelength: float | None = ..., handleheight: float | None = ..., handletextpad: float | None = ..., borderaxespad: float | None = ..., columnspacing: float | None = ..., ncols: int = ..., mode: Literal["expand"] | None = ..., fancybox: bool | None = ..., shadow: bool | dict[str, Any] | None = ..., title: str | None = ..., title_fontsize: float | None = ..., framealpha: float | None = ..., edgecolor: Literal["inherit"] | ColorType | None = ..., facecolor: Literal["inherit"] | ColorType | None = ..., bbox_to_anchor: BboxBase | tuple[float, float] | tuple[float, float, float, float] | None = ..., bbox_transform: Transform | None = ..., frameon: bool | None = ..., handler_map: dict[Artist | type, HandlerBase] | None = ..., title_fontproperties: FontProperties | dict[str, Any] | None = ..., alignment: Literal["center", "left", "right"] = ..., ncol: int = ..., draggable: bool = ...) -> None:
...
def contains(self, mouseevent: MouseEvent) -> tuple[bool, dict[Any, Any]]:
...
def set_ncols(self, ncols: int) -> None:
...
@classmethod
def get_default_handler_map(cls) -> dict[type, HandlerBase]:
...
@classmethod
def set_default_handler_map(cls, handler_map: dict[type, HandlerBase]) -> None:
...
@classmethod
def update_default_handler_map(cls, handler_map: dict[type, HandlerBase]) -> None:
...
def get_legend_handler_map(self) -> dict[type, HandlerBase]:
...
@staticmethod
def get_legend_handler(legend_handler_map: dict[type, HandlerBase], orig_handle: Any) -> HandlerBase | None:
...
def get_children(self) -> list[Artist]:
...
def get_frame(self) -> Rectangle:
...
def get_lines(self) -> list[Line2D]:
...
def get_patches(self) -> list[Patch]:
...
def get_texts(self) -> list[Text]:
...
def set_alignment(self, alignment: Literal["center", "left", "right"]) -> None:
...
def get_alignment(self) -> Literal["center", "left", "right"]:
...
def set_loc(self, loc: str | tuple[float, float] | int | None = ...) -> None:
...
def set_title(self, title: str, prop: FontProperties | str | pathlib.Path | None = ...) -> None:
...
def get_title(self) -> Text:
...
def get_frame_on(self) -> bool:
...
def set_frame_on(self, b: bool) -> None:
...
draw_frame = ...
def get_bbox_to_anchor(self) -> BboxBase:
...
def set_bbox_to_anchor(self, bbox: BboxBase | tuple[float, float] | tuple[float, float, float, float] | None, transform: Transform | None = ...) -> None:
...
@overload
def set_draggable(self, state: Literal[True], use_blit: bool = ..., update: Literal["loc", "bbox"] = ...) -> DraggableLegend:
...
@overload
def set_draggable(self, state: Literal[False], use_blit: bool = ..., update: Literal["loc", "bbox"] = ...) -> None:
...
def get_draggable(self) -> bool:
...
@property
def legendHandles(self) -> list[Artist | None]:
...

@ -0,0 +1,163 @@
"""
This type stub file was generated by pyright.
"""
from collections.abc import Callable, Sequence
from matplotlib.artist import Artist
from matplotlib.legend import Legend
from matplotlib.offsetbox import OffsetBox
from matplotlib.transforms import Transform
from typing import TypeVar
from numpy.typing import ArrayLike
def update_from_first_child(tgt: Artist, src: Artist) -> None:
...
class HandlerBase:
def __init__(self, xpad: float = ..., ypad: float = ..., update_func: Callable[[Artist, Artist], None] | None = ...) -> None:
...
def update_prop(self, legend_handle: Artist, orig_handle: Artist, legend: Legend) -> None:
...
def adjust_drawing_area(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float) -> tuple[float, float, float, float]:
...
def legend_artist(self, legend: Legend, orig_handle: Artist, fontsize: float, handlebox: OffsetBox) -> Artist:
...
def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]:
...
class HandlerNpoints(HandlerBase):
def __init__(self, marker_pad: float = ..., numpoints: int | None = ..., **kwargs) -> None:
...
def get_numpoints(self, legend: Legend) -> int | None:
...
def get_xdata(self, legend: Legend, xdescent: float, ydescent: float, width: float, height: float, fontsize: float) -> tuple[ArrayLike, ArrayLike]:
...
class HandlerNpointsYoffsets(HandlerNpoints):
def __init__(self, numpoints: int | None = ..., yoffsets: Sequence[float] | None = ..., **kwargs) -> None:
...
def get_ydata(self, legend: Legend, xdescent: float, ydescent: float, width: float, height: float, fontsize: float) -> ArrayLike:
...
class HandlerLine2DCompound(HandlerNpoints):
def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]:
...
class HandlerLine2D(HandlerNpoints):
def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]:
...
class HandlerPatch(HandlerBase):
def __init__(self, patch_func: Callable | None = ..., **kwargs) -> None:
...
def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]:
...
class HandlerStepPatch(HandlerBase):
def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]:
...
class HandlerLineCollection(HandlerLine2D):
def get_numpoints(self, legend: Legend) -> int:
...
def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]:
...
_T = TypeVar("_T", bound=Artist)
class HandlerRegularPolyCollection(HandlerNpointsYoffsets):
def __init__(self, yoffsets: Sequence[float] | None = ..., sizes: Sequence[float] | None = ..., **kwargs) -> None:
...
def get_numpoints(self, legend: Legend) -> int:
...
def get_sizes(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float) -> Sequence[float]:
...
def update_prop(self, legend_handle, orig_handle: Artist, legend: Legend) -> None:
...
def create_collection(self, orig_handle: _T, sizes: Sequence[float] | None, offsets: Sequence[float] | None, offset_transform: Transform) -> _T:
...
def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]:
...
class HandlerPathCollection(HandlerRegularPolyCollection):
def create_collection(self, orig_handle: _T, sizes: Sequence[float] | None, offsets: Sequence[float] | None, offset_transform: Transform) -> _T:
...
class HandlerCircleCollection(HandlerRegularPolyCollection):
def create_collection(self, orig_handle: _T, sizes: Sequence[float] | None, offsets: Sequence[float] | None, offset_transform: Transform) -> _T:
...
class HandlerErrorbar(HandlerLine2D):
def __init__(self, xerr_size: float = ..., yerr_size: float | None = ..., marker_pad: float = ..., numpoints: int | None = ..., **kwargs) -> None:
...
def get_err_size(self, legend: Legend, xdescent: float, ydescent: float, width: float, height: float, fontsize: float) -> tuple[float, float]:
...
def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]:
...
class HandlerStem(HandlerNpointsYoffsets):
def __init__(self, marker_pad: float = ..., numpoints: int | None = ..., bottom: float | None = ..., yoffsets: Sequence[float] | None = ..., **kwargs) -> None:
...
def get_ydata(self, legend: Legend, xdescent: float, ydescent: float, width: float, height: float, fontsize: float) -> ArrayLike:
...
def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]:
...
class HandlerTuple(HandlerBase):
def __init__(self, ndivide: int | None = ..., pad: float | None = ..., **kwargs) -> None:
...
def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]:
...
class HandlerPolyCollection(HandlerBase):
def create_artists(self, legend: Legend, orig_handle: Artist, xdescent: float, ydescent: float, width: float, height: float, fontsize: float, trans: Transform) -> Sequence[Artist]:
...

@ -0,0 +1,248 @@
"""
This type stub file was generated by pyright.
"""
from .artist import Artist
from .axes import Axes
from .backend_bases import FigureCanvasBase, MouseEvent
from .path import Path
from .transforms import Bbox
from collections.abc import Callable, Sequence
from typing import Any, Literal, overload
from .typing import CapStyleType, ColorType, DrawStyleType, FillStyleType, JoinStyleType, LineStyleType, MarkEveryType, MarkerType
from numpy.typing import ArrayLike
def segment_hits(cx: ArrayLike, cy: ArrayLike, x: ArrayLike, y: ArrayLike, radius: ArrayLike) -> ArrayLike:
...
class Line2D(Artist):
lineStyles: dict[str, str]
drawStyles: dict[str, str]
drawStyleKeys: list[str]
markers: dict[str | int, str]
filled_markers: tuple[str, ...]
fillStyles: tuple[str, ...]
zorder: float
ind_offset: float
def __init__(self, xdata: ArrayLike, ydata: ArrayLike, *, linewidth: float | None = ..., linestyle: LineStyleType | None = ..., color: ColorType | None = ..., gapcolor: ColorType | None = ..., marker: MarkerType | None = ..., markersize: float | None = ..., markeredgewidth: float | None = ..., markeredgecolor: ColorType | None = ..., markerfacecolor: ColorType | None = ..., markerfacecoloralt: ColorType = ..., fillstyle: FillStyleType | None = ..., antialiased: bool | None = ..., dash_capstyle: CapStyleType | None = ..., solid_capstyle: CapStyleType | None = ..., dash_joinstyle: JoinStyleType | None = ..., solid_joinstyle: JoinStyleType | None = ..., pickradius: float = ..., drawstyle: DrawStyleType | None = ..., markevery: MarkEveryType | None = ..., **kwargs) -> None:
...
def contains(self, mouseevent: MouseEvent) -> tuple[bool, dict]:
...
def get_pickradius(self) -> float:
...
def set_pickradius(self, pickradius: float) -> None:
...
pickradius: float
def get_fillstyle(self) -> FillStyleType:
...
stale: bool
def set_fillstyle(self, fs: FillStyleType) -> None:
...
def set_markevery(self, every: MarkEveryType) -> None:
...
def get_markevery(self) -> MarkEveryType:
...
def set_picker(self, p: None | bool | float | Callable[[Artist, MouseEvent], tuple[bool, dict]]) -> None:
...
def get_bbox(self) -> Bbox:
...
@overload
def set_data(self, args: ArrayLike) -> None:
...
@overload
def set_data(self, x: ArrayLike, y: ArrayLike) -> None:
...
def recache_always(self) -> None:
...
def recache(self, always: bool = ...) -> None:
...
def get_antialiased(self) -> bool:
...
def get_color(self) -> ColorType:
...
def get_drawstyle(self) -> DrawStyleType:
...
def get_gapcolor(self) -> ColorType:
...
def get_linestyle(self) -> LineStyleType:
...
def get_linewidth(self) -> float:
...
def get_marker(self) -> MarkerType:
...
def get_markeredgecolor(self) -> ColorType:
...
def get_markeredgewidth(self) -> float:
...
def get_markerfacecolor(self) -> ColorType:
...
def get_markerfacecoloralt(self) -> ColorType:
...
def get_markersize(self) -> float:
...
def get_data(self, orig: bool = ...) -> tuple[ArrayLike, ArrayLike]:
...
def get_xdata(self, orig: bool = ...) -> ArrayLike:
...
def get_ydata(self, orig: bool = ...) -> ArrayLike:
...
def get_path(self) -> Path:
...
def get_xydata(self) -> ArrayLike:
...
def set_antialiased(self, b: bool) -> None:
...
def set_color(self, color: ColorType) -> None:
...
def set_drawstyle(self, drawstyle: DrawStyleType | None) -> None:
...
def set_gapcolor(self, gapcolor: ColorType | None) -> None:
...
def set_linewidth(self, w: float) -> None:
...
def set_linestyle(self, ls: LineStyleType) -> None:
...
def set_marker(self, marker: MarkerType) -> None:
...
def set_markeredgecolor(self, ec: ColorType | None) -> None:
...
def set_markerfacecolor(self, fc: ColorType | None) -> None:
...
def set_markerfacecoloralt(self, fc: ColorType | None) -> None:
...
def set_markeredgewidth(self, ew: float | None) -> None:
...
def set_markersize(self, sz: float) -> None:
...
def set_xdata(self, x: ArrayLike) -> None:
...
def set_ydata(self, y: ArrayLike) -> None:
...
def set_dashes(self, seq: Sequence[float] | tuple[None, None]) -> None:
...
def update_from(self, other: Artist) -> None:
...
def set_dash_joinstyle(self, s: JoinStyleType) -> None:
...
def set_solid_joinstyle(self, s: JoinStyleType) -> None:
...
def get_dash_joinstyle(self) -> Literal["miter", "round", "bevel"]:
...
def get_solid_joinstyle(self) -> Literal["miter", "round", "bevel"]:
...
def set_dash_capstyle(self, s: CapStyleType) -> None:
...
def set_solid_capstyle(self, s: CapStyleType) -> None:
...
def get_dash_capstyle(self) -> Literal["butt", "projecting", "round"]:
...
def get_solid_capstyle(self) -> Literal["butt", "projecting", "round"]:
...
def is_dashed(self) -> bool:
...
class AxLine(Line2D):
def __init__(self, xy1: tuple[float, float], xy2: tuple[float, float] | None, slope: float | None, **kwargs) -> None:
...
def get_xy1(self) -> tuple[float, float] | None:
...
def get_xy2(self) -> tuple[float, float] | None:
...
def get_slope(self) -> float:
...
def set_xy1(self, x: float, y: float) -> None:
...
def set_xy2(self, x: float, y: float) -> None:
...
def set_slope(self, slope: float) -> None:
...
class VertexSelector:
axes: Axes
line: Line2D
cid: int
ind: set[int]
def __init__(self, line: Line2D) -> None:
...
@property
def canvas(self) -> FigureCanvasBase:
...
def process_selected(self, ind: Sequence[int], xs: ArrayLike, ys: ArrayLike) -> None:
...
def onpick(self, event: Any) -> None:
...
lineStyles: dict[str, str]
lineMarkers: dict[str | int, str]
drawStyles: dict[str, str]
fillStyles: tuple[FillStyleType, ...]

@ -0,0 +1,76 @@
"""
This type stub file was generated by pyright.
"""
from typing import Literal
from .path import Path
from .transforms import Affine2D, Transform
from numpy.typing import ArrayLike
from .typing import CapStyleType, FillStyleType, JoinStyleType
TICKLEFT: int
TICKRIGHT: int
TICKUP: int
TICKDOWN: int
CARETLEFT: int
CARETRIGHT: int
CARETUP: int
CARETDOWN: int
CARETLEFTBASE: int
CARETRIGHTBASE: int
CARETUPBASE: int
CARETDOWNBASE: int
class MarkerStyle:
markers: dict[str | int, str]
filled_markers: tuple[str, ...]
fillstyles: tuple[FillStyleType, ...]
def __init__(self, marker: str | ArrayLike | Path | MarkerStyle | None, fillstyle: FillStyleType | None = ..., transform: Transform | None = ..., capstyle: CapStyleType | None = ..., joinstyle: JoinStyleType | None = ...) -> None:
...
def __bool__(self) -> bool:
...
def is_filled(self) -> bool:
...
def get_fillstyle(self) -> FillStyleType:
...
def get_joinstyle(self) -> Literal["miter", "round", "bevel"]:
...
def get_capstyle(self) -> Literal["butt", "projecting", "round"]:
...
def get_marker(self) -> str | ArrayLike | Path | None:
...
def get_path(self) -> Path:
...
def get_transform(self) -> Transform:
...
def get_alt_path(self) -> Path | None:
...
def get_alt_transform(self) -> Transform:
...
def get_snap_threshold(self) -> float | None:
...
def get_user_transform(self) -> Transform | None:
...
def transformed(self, transform: Affine2D) -> MarkerStyle:
...
def rotated(self, *, deg: float | None = ..., rad: float | None = ...) -> MarkerStyle:
...
def scaled(self, sx: float, sy: float | None = ...) -> MarkerStyle:
...

@ -0,0 +1,28 @@
"""
This type stub file was generated by pyright.
"""
import os
from typing import Generic, IO, Literal, TypeVar, overload
from matplotlib.font_manager import FontProperties
from matplotlib.typing import ColorType
from ._mathtext import RasterParse as RasterParse, VectorParse as VectorParse
_ParseType = TypeVar("_ParseType", RasterParse, VectorParse)
class MathTextParser(Generic[_ParseType]):
@overload
def __init__(self: MathTextParser[VectorParse], output: Literal["path"]) -> None:
...
@overload
def __init__(self: MathTextParser[RasterParse], output: Literal["agg", "raster", "macosx"]) -> None:
...
def parse(self, s: str, dpi: float = ..., prop: FontProperties | None = ..., *, antialiased: bool | None = ...) -> _ParseType:
...
def math_to_image(s: str, filename_or_obj: str | os.PathLike | IO, prop: FontProperties | None = ..., dpi: float | None = ..., format: str | None = ..., *, color: ColorType | None = ...) -> float:
...

@ -0,0 +1,73 @@
"""
This type stub file was generated by pyright.
"""
import numpy as np
from collections.abc import Callable
from typing import Literal
from numpy.typing import ArrayLike
def window_hanning(x: ArrayLike) -> ArrayLike:
...
def window_none(x: ArrayLike) -> ArrayLike:
...
def detrend(x: ArrayLike, key: Literal["default", "constant", "mean", "linear", "none"] | Callable[[ArrayLike, int | None], ArrayLike] | None = ..., axis: int | None = ...) -> ArrayLike:
...
def detrend_mean(x: ArrayLike, axis: int | None = ...) -> ArrayLike:
...
def detrend_none(x: ArrayLike, axis: int | None = ...) -> ArrayLike:
...
def detrend_linear(y: ArrayLike) -> ArrayLike:
...
def psd(x: ArrayLike, NFFT: int | None = ..., Fs: float | None = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike, int | None], ArrayLike] | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., noverlap: int | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale_by_freq: bool | None = ...) -> tuple[ArrayLike, ArrayLike]:
...
def csd(x: ArrayLike, y: ArrayLike | None, NFFT: int | None = ..., Fs: float | None = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike, int | None], ArrayLike] | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., noverlap: int | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale_by_freq: bool | None = ...) -> tuple[ArrayLike, ArrayLike]:
...
complex_spectrum = ...
magnitude_spectrum = ...
angle_spectrum = ...
phase_spectrum = ...
def specgram(x: ArrayLike, NFFT: int | None = ..., Fs: float | None = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike, int | None], ArrayLike] | None = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike | None = ..., noverlap: int | None = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] | None = ..., scale_by_freq: bool | None = ..., mode: Literal["psd", "complex", "magnitude", "angle", "phase"] | None = ...) -> tuple[ArrayLike, ArrayLike, ArrayLike]:
...
def cohere(x: ArrayLike, y: ArrayLike, NFFT: int = ..., Fs: float = ..., detrend: Literal["none", "mean", "linear"] | Callable[[ArrayLike, int | None], ArrayLike] = ..., window: Callable[[ArrayLike], ArrayLike] | ArrayLike = ..., noverlap: int = ..., pad_to: int | None = ..., sides: Literal["default", "onesided", "twosided"] = ..., scale_by_freq: bool | None = ...) -> tuple[ArrayLike, ArrayLike]:
...
class GaussianKDE:
dataset: ArrayLike
dim: int
num_dp: int
factor: float
data_covariance: ArrayLike
data_inv_cov: ArrayLike
covariance: ArrayLike
inv_cov: ArrayLike
norm_factor: float
def __init__(self, dataset: ArrayLike, bw_method: Literal["scott", "silverman"] | float | Callable[[GaussianKDE], float] | None = ...) -> None:
...
def scotts_factor(self) -> float:
...
def silverman_factor(self) -> float:
...
def covariance_factor(self) -> float:
...
def evaluate(self, points: ArrayLike) -> np.ndarray:
...
def __call__(self, points: ArrayLike) -> np.ndarray:
...

@ -0,0 +1,354 @@
"""
This type stub file was generated by pyright.
"""
import matplotlib.artist as martist
import matplotlib.text as mtext
from matplotlib.backend_bases import Event, FigureCanvasBase, RendererBase
from matplotlib.colors import Colormap, Normalize
from matplotlib.figure import Figure
from matplotlib.font_manager import FontProperties
from matplotlib.image import BboxImage
from matplotlib.patches import FancyArrowPatch, FancyBboxPatch
from matplotlib.transforms import Bbox, BboxBase, Transform
from numpy.typing import ArrayLike
from collections.abc import Callable
from typing import Any, Literal, overload
DEBUG: bool
def bbox_artist(*args, **kwargs) -> None:
...
class OffsetBox(martist.Artist):
width: float | None
height: float | None
def __init__(self, *args, **kwargs) -> None:
...
def set_figure(self, fig: Figure) -> None:
...
def set_offset(self, xy: tuple[float, float] | Callable[[float, float, float, float, RendererBase], tuple[float, float]]) -> None:
...
@overload
def get_offset(self, bbox: Bbox, renderer: RendererBase) -> tuple[float, float]:
...
@overload
def get_offset(self, width: float, height: float, xdescent: float, ydescent: float, renderer: RendererBase) -> tuple[float, float]:
...
def set_width(self, width: float) -> None:
...
def set_height(self, height: float) -> None:
...
def get_visible_children(self) -> list[martist.Artist]:
...
def get_children(self) -> list[martist.Artist]:
...
def get_bbox(self, renderer: RendererBase) -> Bbox:
...
def get_extent_offsets(self, renderer: RendererBase) -> tuple[float, float, float, float, list[tuple[float, float]]]:
...
def get_extent(self, renderer: RendererBase) -> tuple[float, float, float, float]:
...
def get_window_extent(self, renderer: RendererBase | None = ...) -> Bbox:
...
class PackerBase(OffsetBox):
height: float | None
width: float | None
sep: float | None
pad: float | None
mode: Literal["fixed", "expand", "equal"]
align: Literal["top", "bottom", "left", "right", "center", "baseline"]
def __init__(self, pad: float | None = ..., sep: float | None = ..., width: float | None = ..., height: float | None = ..., align: Literal["top", "bottom", "left", "right", "center", "baseline"] = ..., mode: Literal["fixed", "expand", "equal"] = ..., children: list[martist.Artist] | None = ...) -> None:
...
class VPacker(PackerBase):
...
class HPacker(PackerBase):
...
class PaddedBox(OffsetBox):
pad: float | None
patch: FancyBboxPatch
def __init__(self, child: martist.Artist, pad: float | None = ..., *, draw_frame: bool = ..., patch_attrs: dict[str, Any] | None = ...) -> None:
...
def update_frame(self, bbox: Bbox, fontsize: float | None = ...) -> None:
...
def draw_frame(self, renderer: RendererBase) -> None:
...
class DrawingArea(OffsetBox):
width: float
height: float
xdescent: float
ydescent: float
offset_transform: Transform
dpi_transform: Transform
def __init__(self, width: float, height: float, xdescent: float = ..., ydescent: float = ..., clip: bool = ...) -> None:
...
@property
def clip_children(self) -> bool:
...
@clip_children.setter
def clip_children(self, val: bool) -> None:
...
def get_transform(self) -> Transform:
...
def set_offset(self, xy: tuple[float, float]) -> None:
...
def get_offset(self) -> tuple[float, float]:
...
def add_artist(self, a: martist.Artist) -> None:
...
class TextArea(OffsetBox):
offset_transform: Transform
def __init__(self, s: str, *, textprops: dict[str, Any] | None = ..., multilinebaseline: bool = ...) -> None:
...
def set_text(self, s: str) -> None:
...
def get_text(self) -> str:
...
def set_multilinebaseline(self, t: bool) -> None:
...
def get_multilinebaseline(self) -> bool:
...
def set_offset(self, xy: tuple[float, float]) -> None:
...
def get_offset(self) -> tuple[float, float]:
...
class AuxTransformBox(OffsetBox):
aux_transform: Transform
offset_transform: Transform
ref_offset_transform: Transform
def __init__(self, aux_transform: Transform) -> None:
...
def add_artist(self, a: martist.Artist) -> None:
...
def get_transform(self) -> Transform:
...
def set_offset(self, xy: tuple[float, float]) -> None:
...
def get_offset(self) -> tuple[float, float]:
...
class AnchoredOffsetbox(OffsetBox):
zorder: float
codes: dict[str, int]
loc: int
borderpad: float
pad: float
prop: FontProperties
patch: FancyBboxPatch
def __init__(self, loc: str, *, pad: float = ..., borderpad: float = ..., child: OffsetBox | None = ..., prop: FontProperties | None = ..., frameon: bool = ..., bbox_to_anchor: BboxBase | tuple[float, float] | tuple[float, float, float, float] | None = ..., bbox_transform: Transform | None = ..., **kwargs) -> None:
...
def set_child(self, child: OffsetBox | None) -> None:
...
def get_child(self) -> OffsetBox | None:
...
def get_children(self) -> list[martist.Artist]:
...
def get_bbox_to_anchor(self) -> Bbox:
...
def set_bbox_to_anchor(self, bbox: BboxBase, transform: Transform | None = ...) -> None:
...
def update_frame(self, bbox: Bbox, fontsize: float | None = ...) -> None:
...
class AnchoredText(AnchoredOffsetbox):
txt: TextArea
def __init__(self, s: str, loc: str, *, pad: float = ..., borderpad: float = ..., prop: dict[str, Any] | None = ..., **kwargs) -> None:
...
class OffsetImage(OffsetBox):
image: BboxImage
def __init__(self, arr: ArrayLike, *, zoom: float = ..., cmap: Colormap | str | None = ..., norm: Normalize | str | None = ..., interpolation: str | None = ..., origin: Literal["upper", "lower"] | None = ..., filternorm: bool = ..., filterrad: float = ..., resample: bool = ..., dpi_cor: bool = ..., **kwargs) -> None:
...
stale: bool
def set_data(self, arr: ArrayLike | None) -> None:
...
def get_data(self) -> ArrayLike | None:
...
def set_zoom(self, zoom: float) -> None:
...
def get_zoom(self) -> float:
...
def get_children(self) -> list[martist.Artist]:
...
def get_offset(self) -> tuple[float, float]:
...
class AnnotationBbox(martist.Artist, mtext._AnnotationBase):
zorder: float
offsetbox: OffsetBox
arrowprops: dict[str, Any] | None
xybox: tuple[float, float]
boxcoords: str | tuple[str, str] | martist.Artist | Transform | Callable[[RendererBase], Bbox | Transform]
arrow_patch: FancyArrowPatch | None
patch: FancyBboxPatch
prop: FontProperties
def __init__(self, offsetbox: OffsetBox, xy: tuple[float, float], xybox: tuple[float, float] | None = ..., xycoords: str | tuple[str, str] | martist.Artist | Transform | Callable[[RendererBase], Bbox | Transform] = ..., boxcoords: str | tuple[str, str] | martist.Artist | Transform | Callable[[RendererBase], Bbox | Transform] | None = ..., *, frameon: bool = ..., pad: float = ..., annotation_clip: bool | None = ..., box_alignment: tuple[float, float] = ..., bboxprops: dict[str, Any] | None = ..., arrowprops: dict[str, Any] | None = ..., fontsize: float | str | None = ..., **kwargs) -> None:
...
@property
def xyann(self) -> tuple[float, float]:
...
@xyann.setter
def xyann(self, xyann: tuple[float, float]) -> None:
...
@property
def anncoords(self) -> str | tuple[str, str] | martist.Artist | Transform | Callable[[RendererBase], Bbox | Transform]:
...
@anncoords.setter
def anncoords(self, coords: str | tuple[str, str] | martist.Artist | Transform | Callable[[RendererBase], Bbox | Transform]) -> None:
...
def get_children(self) -> list[martist.Artist]:
...
def set_figure(self, fig: Figure) -> None:
...
def set_fontsize(self, s: str | float | None = ...) -> None:
...
def get_fontsize(self) -> float:
...
def get_tightbbox(self, renderer: RendererBase | None = ...) -> Bbox:
...
def update_positions(self, renderer: RendererBase) -> None:
...
class DraggableBase:
ref_artist: martist.Artist
got_artist: bool
canvas: FigureCanvasBase
cids: list[int]
mouse_x: int
mouse_y: int
background: Any
def __init__(self, ref_artist: martist.Artist, use_blit: bool = ...) -> None:
...
def on_motion(self, evt: Event) -> None:
...
def on_pick(self, evt: Event) -> None:
...
def on_release(self, event: Event) -> None:
...
def disconnect(self) -> None:
...
def save_offset(self) -> None:
...
def update_offset(self, dx: float, dy: float) -> None:
...
def finalize_offset(self) -> None:
...
class DraggableOffsetBox(DraggableBase):
offsetbox: OffsetBox
def __init__(self, ref_artist: martist.Artist, offsetbox: OffsetBox, use_blit: bool = ...) -> None:
...
def save_offset(self) -> None:
...
def update_offset(self, dx: float, dy: float) -> None:
...
def get_loc_in_canvas(self) -> tuple[float, float]:
...
class DraggableAnnotation(DraggableBase):
annotation: mtext.Annotation
def __init__(self, annotation: mtext.Annotation, use_blit: bool = ...) -> None:
...
def save_offset(self) -> None:
...
def update_offset(self, dx: float, dy: float) -> None:
...

@ -0,0 +1,829 @@
"""
This type stub file was generated by pyright.
"""
import numpy as np
from . import artist
from .axes import Axes
from .backend_bases import MouseEvent, RendererBase
from .path import Path
from .transforms import Bbox, Transform
from typing import Any, Literal, overload
from numpy.typing import ArrayLike
from .typing import CapStyleType, ColorType, JoinStyleType, LineStyleType
class Patch(artist.Artist):
zorder: float
def __init__(self, *, edgecolor: ColorType | None = ..., facecolor: ColorType | None = ..., color: ColorType | None = ..., linewidth: float | None = ..., linestyle: LineStyleType | None = ..., antialiased: bool | None = ..., hatch: str | None = ..., fill: bool = ..., capstyle: CapStyleType | None = ..., joinstyle: JoinStyleType | None = ..., **kwargs) -> None:
...
def get_verts(self) -> ArrayLike:
...
def contains(self, mouseevent: MouseEvent, radius: float | None = ...) -> tuple[bool, dict[Any, Any]]:
...
def contains_point(self, point: tuple[float, float], radius: float | None = ...) -> bool:
...
def contains_points(self, points: ArrayLike, radius: float | None = ...) -> np.ndarray:
...
def get_extents(self) -> Bbox:
...
def get_transform(self) -> Transform:
...
def get_data_transform(self) -> Transform:
...
def get_patch_transform(self) -> Transform:
...
def get_antialiased(self) -> bool:
...
def get_edgecolor(self) -> ColorType:
...
def get_facecolor(self) -> ColorType:
...
def get_linewidth(self) -> float:
...
def get_linestyle(self) -> LineStyleType:
...
def set_antialiased(self, aa: bool | None) -> None:
...
def set_edgecolor(self, color: ColorType | None) -> None:
...
def set_facecolor(self, color: ColorType | None) -> None:
...
def set_color(self, c: ColorType | None) -> None:
...
def set_alpha(self, alpha: float | None) -> None:
...
def set_linewidth(self, w: float | None) -> None:
...
def set_linestyle(self, ls: LineStyleType | None) -> None:
...
def set_fill(self, b: bool) -> None:
...
def get_fill(self) -> bool:
...
fill = ...
def set_capstyle(self, s: CapStyleType) -> None:
...
def get_capstyle(self) -> Literal["butt", "projecting", "round"]:
...
def set_joinstyle(self, s: JoinStyleType) -> None:
...
def get_joinstyle(self) -> Literal["miter", "round", "bevel"]:
...
def set_hatch(self, hatch: str) -> None:
...
def get_hatch(self) -> str:
...
def get_path(self) -> Path:
...
class Shadow(Patch):
patch: Patch
def __init__(self, patch: Patch, ox: float, oy: float, *, shade: float = ..., **kwargs) -> None:
...
class Rectangle(Patch):
angle: float
def __init__(self, xy: tuple[float, float], width: float, height: float, *, angle: float = ..., rotation_point: Literal["xy", "center"] | tuple[float, float] = ..., **kwargs) -> None:
...
@property
def rotation_point(self) -> Literal["xy", "center"] | tuple[float, float]:
...
@rotation_point.setter
def rotation_point(self, value: Literal["xy", "center"] | tuple[float, float]) -> None:
...
def get_x(self) -> float:
...
def get_y(self) -> float:
...
def get_xy(self) -> tuple[float, float]:
...
def get_corners(self) -> np.ndarray:
...
def get_center(self) -> np.ndarray:
...
def get_width(self) -> float:
...
def get_height(self) -> float:
...
def get_angle(self) -> float:
...
def set_x(self, x: float) -> None:
...
def set_y(self, y: float) -> None:
...
def set_angle(self, angle: float) -> None:
...
def set_xy(self, xy: tuple[float, float]) -> None:
...
def set_width(self, w: float) -> None:
...
def set_height(self, h: float) -> None:
...
@overload
def set_bounds(self, args: tuple[float, float, float, float], /) -> None:
...
@overload
def set_bounds(self, left: float, bottom: float, width: float, height: float, /) -> None:
...
def get_bbox(self) -> Bbox:
...
xy = ...
class RegularPolygon(Patch):
xy: tuple[float, float]
numvertices: int
orientation: float
radius: float
def __init__(self, xy: tuple[float, float], numVertices: int, *, radius: float = ..., orientation: float = ..., **kwargs) -> None:
...
class PathPatch(Patch):
def __init__(self, path: Path, **kwargs) -> None:
...
def set_path(self, path: Path) -> None:
...
class StepPatch(PathPatch):
orientation: Literal["vertical", "horizontal"]
def __init__(self, values: ArrayLike, edges: ArrayLike, *, orientation: Literal["vertical", "horizontal"] = ..., baseline: float = ..., **kwargs) -> None:
...
def get_data(self) -> tuple[np.ndarray, np.ndarray, float]:
...
def set_data(self, values: ArrayLike | None = ..., edges: ArrayLike | None = ..., baseline: float | None = ...) -> None:
...
class Polygon(Patch):
def __init__(self, xy: ArrayLike, *, closed: bool = ..., **kwargs) -> None:
...
def get_closed(self) -> bool:
...
def set_closed(self, closed: bool) -> None:
...
def get_xy(self) -> np.ndarray:
...
def set_xy(self, xy: ArrayLike) -> None:
...
xy = ...
class Wedge(Patch):
center: tuple[float, float]
r: float
theta1: float
theta2: float
width: float | None
def __init__(self, center: tuple[float, float], r: float, theta1: float, theta2: float, *, width: float | None = ..., **kwargs) -> None:
...
def set_center(self, center: tuple[float, float]) -> None:
...
def set_radius(self, radius: float) -> None:
...
def set_theta1(self, theta1: float) -> None:
...
def set_theta2(self, theta2: float) -> None:
...
def set_width(self, width: float | None) -> None:
...
class Arrow(Patch):
def __init__(self, x: float, y: float, dx: float, dy: float, *, width: float = ..., **kwargs) -> None:
...
class FancyArrow(Polygon):
def __init__(self, x: float, y: float, dx: float, dy: float, *, width: float = ..., length_includes_head: bool = ..., head_width: float | None = ..., head_length: float | None = ..., shape: Literal["full", "left", "right"] = ..., overhang: float = ..., head_starts_at_zero: bool = ..., **kwargs) -> None:
...
def set_data(self, *, x: float | None = ..., y: float | None = ..., dx: float | None = ..., dy: float | None = ..., width: float | None = ..., head_width: float | None = ..., head_length: float | None = ...) -> None:
...
class CirclePolygon(RegularPolygon):
def __init__(self, xy: tuple[float, float], radius: float = ..., *, resolution: int = ..., **kwargs) -> None:
...
class Ellipse(Patch):
def __init__(self, xy: tuple[float, float], width: float, height: float, *, angle: float = ..., **kwargs) -> None:
...
def set_center(self, xy: tuple[float, float]) -> None:
...
def get_center(self) -> float:
...
center = ...
def set_width(self, width: float) -> None:
...
def get_width(self) -> float:
...
width = ...
def set_height(self, height: float) -> None:
...
def get_height(self) -> float:
...
height = ...
def set_angle(self, angle: float) -> None:
...
def get_angle(self) -> float:
...
angle = ...
def get_corners(self) -> np.ndarray:
...
def get_vertices(self) -> list[tuple[float, float]]:
...
def get_co_vertices(self) -> list[tuple[float, float]]:
...
class Annulus(Patch):
a: float
b: float
def __init__(self, xy: tuple[float, float], r: float | tuple[float, float], width: float, angle: float = ..., **kwargs) -> None:
...
def set_center(self, xy: tuple[float, float]) -> None:
...
def get_center(self) -> tuple[float, float]:
...
center = ...
def set_width(self, width: float) -> None:
...
def get_width(self) -> float:
...
width = ...
def set_angle(self, angle: float) -> None:
...
def get_angle(self) -> float:
...
angle = ...
def set_semimajor(self, a: float) -> None:
...
def set_semiminor(self, b: float) -> None:
...
def set_radii(self, r: float | tuple[float, float]) -> None:
...
def get_radii(self) -> tuple[float, float]:
...
radii = ...
class Circle(Ellipse):
def __init__(self, xy: tuple[float, float], radius: float = ..., **kwargs) -> None:
...
def set_radius(self, radius: float) -> None:
...
def get_radius(self) -> float:
...
radius = ...
class Arc(Ellipse):
theta1: float
theta2: float
def __init__(self, xy: tuple[float, float], width: float, height: float, *, angle: float = ..., theta1: float = ..., theta2: float = ..., **kwargs) -> None:
...
def bbox_artist(artist: artist.Artist, renderer: RendererBase, props: dict[str, Any] | None = ..., fill: bool = ...) -> None:
...
def draw_bbox(bbox: Bbox, renderer: RendererBase, color: ColorType = ..., trans: Transform | None = ...) -> None:
...
class _Style:
def __new__(cls, stylename, **kwargs):
...
@classmethod
def get_styles(cls) -> dict[str, type]:
...
@classmethod
def pprint_styles(cls) -> str:
...
@classmethod
def register(cls, name: str, style: type) -> None:
...
class BoxStyle(_Style):
class Square(BoxStyle):
pad: float
def __init__(self, pad: float = ...) -> None:
...
def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path:
...
class Circle(BoxStyle):
pad: float
def __init__(self, pad: float = ...) -> None:
...
def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path:
...
class Ellipse(BoxStyle):
pad: float
def __init__(self, pad: float = ...) -> None:
...
def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path:
...
class LArrow(BoxStyle):
pad: float
def __init__(self, pad: float = ...) -> None:
...
def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path:
...
class RArrow(LArrow):
def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path:
...
class DArrow(BoxStyle):
pad: float
def __init__(self, pad: float = ...) -> None:
...
def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path:
...
class Round(BoxStyle):
pad: float
rounding_size: float | None
def __init__(self, pad: float = ..., rounding_size: float | None = ...) -> None:
...
def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path:
...
class Round4(BoxStyle):
pad: float
rounding_size: float | None
def __init__(self, pad: float = ..., rounding_size: float | None = ...) -> None:
...
def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path:
...
class Sawtooth(BoxStyle):
pad: float
tooth_size: float | None
def __init__(self, pad: float = ..., tooth_size: float | None = ...) -> None:
...
def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path:
...
class Roundtooth(Sawtooth):
def __call__(self, x0: float, y0: float, width: float, height: float, mutation_size: float) -> Path:
...
class ConnectionStyle(_Style):
class _Base(ConnectionStyle):
class SimpleEvent:
def __init__(self, xy: tuple[float, float]) -> None:
...
def __call__(self, posA: tuple[float, float], posB: tuple[float, float], shrinkA: float = ..., shrinkB: float = ..., patchA: Patch | None = ..., patchB: Patch | None = ...) -> Path:
...
class Arc3(_Base):
rad: float
def __init__(self, rad: float = ...) -> None:
...
def connect(self, posA: tuple[float, float], posB: tuple[float, float]) -> Path:
...
class Angle3(_Base):
angleA: float
angleB: float
def __init__(self, angleA: float = ..., angleB: float = ...) -> None:
...
def connect(self, posA: tuple[float, float], posB: tuple[float, float]) -> Path:
...
class Angle(_Base):
angleA: float
angleB: float
rad: float
def __init__(self, angleA: float = ..., angleB: float = ..., rad: float = ...) -> None:
...
def connect(self, posA: tuple[float, float], posB: tuple[float, float]) -> Path:
...
class Arc(_Base):
angleA: float
angleB: float
armA: float | None
armB: float | None
rad: float
def __init__(self, angleA: float = ..., angleB: float = ..., armA: float | None = ..., armB: float | None = ..., rad: float = ...) -> None:
...
def connect(self, posA: tuple[float, float], posB: tuple[float, float]) -> Path:
...
class Bar(_Base):
armA: float
armB: float
fraction: float
angle: float | None
def __init__(self, armA: float = ..., armB: float = ..., fraction: float = ..., angle: float | None = ...) -> None:
...
def connect(self, posA: tuple[float, float], posB: tuple[float, float]) -> Path:
...
class ArrowStyle(_Style):
class _Base(ArrowStyle):
@staticmethod
def ensure_quadratic_bezier(path: Path) -> list[float]:
...
def transmute(self, path: Path, mutation_size: float, linewidth: float) -> tuple[Path, bool]:
...
def __call__(self, path: Path, mutation_size: float, linewidth: float, aspect_ratio: float = ...) -> tuple[Path, bool]:
...
class _Curve(_Base):
arrow: str
fillbegin: bool
fillend: bool
def __init__(self, head_length: float = ..., head_width: float = ..., widthA: float = ..., widthB: float = ..., lengthA: float = ..., lengthB: float = ..., angleA: float | None = ..., angleB: float | None = ..., scaleA: float | None = ..., scaleB: float | None = ...) -> None:
...
class Curve(_Curve):
def __init__(self) -> None:
...
class CurveA(_Curve):
arrow: str
...
class CurveB(_Curve):
arrow: str
...
class CurveAB(_Curve):
arrow: str
...
class CurveFilledA(_Curve):
arrow: str
...
class CurveFilledB(_Curve):
arrow: str
...
class CurveFilledAB(_Curve):
arrow: str
...
class BracketA(_Curve):
arrow: str
def __init__(self, widthA: float = ..., lengthA: float = ..., angleA: float = ...) -> None:
...
class BracketB(_Curve):
arrow: str
def __init__(self, widthB: float = ..., lengthB: float = ..., angleB: float = ...) -> None:
...
class BracketAB(_Curve):
arrow: str
def __init__(self, widthA: float = ..., lengthA: float = ..., angleA: float = ..., widthB: float = ..., lengthB: float = ..., angleB: float = ...) -> None:
...
class BarAB(_Curve):
arrow: str
def __init__(self, widthA: float = ..., angleA: float = ..., widthB: float = ..., angleB: float = ...) -> None:
...
class BracketCurve(_Curve):
arrow: str
def __init__(self, widthA: float = ..., lengthA: float = ..., angleA: float | None = ...) -> None:
...
class CurveBracket(_Curve):
arrow: str
def __init__(self, widthB: float = ..., lengthB: float = ..., angleB: float | None = ...) -> None:
...
class Simple(_Base):
def __init__(self, head_length: float = ..., head_width: float = ..., tail_width: float = ...) -> None:
...
class Fancy(_Base):
def __init__(self, head_length: float = ..., head_width: float = ..., tail_width: float = ...) -> None:
...
class Wedge(_Base):
tail_width: float
shrink_factor: float
def __init__(self, tail_width: float = ..., shrink_factor: float = ...) -> None:
...
class FancyBboxPatch(Patch):
def __init__(self, xy: tuple[float, float], width: float, height: float, boxstyle: str | BoxStyle = ..., *, mutation_scale: float = ..., mutation_aspect: float = ..., **kwargs) -> None:
...
def set_boxstyle(self, boxstyle: str | BoxStyle | None = ..., **kwargs) -> None:
...
def get_boxstyle(self) -> BoxStyle:
...
def set_mutation_scale(self, scale: float) -> None:
...
def get_mutation_scale(self) -> float:
...
def set_mutation_aspect(self, aspect: float) -> None:
...
def get_mutation_aspect(self) -> float:
...
def get_x(self) -> float:
...
def get_y(self) -> float:
...
def get_width(self) -> float:
...
def get_height(self) -> float:
...
def set_x(self, x: float) -> None:
...
def set_y(self, y: float) -> None:
...
def set_width(self, w: float) -> None:
...
def set_height(self, h: float) -> None:
...
@overload
def set_bounds(self, args: tuple[float, float, float, float], /) -> None:
...
@overload
def set_bounds(self, left: float, bottom: float, width: float, height: float, /) -> None:
...
def get_bbox(self) -> Bbox:
...
class FancyArrowPatch(Patch):
patchA: Patch
patchB: Patch
shrinkA: float
shrinkB: float
def __init__(self, posA: tuple[float, float] | None = ..., posB: tuple[float, float] | None = ..., *, path: Path | None = ..., arrowstyle: str | ArrowStyle = ..., connectionstyle: str | ConnectionStyle = ..., patchA: Patch | None = ..., patchB: Patch | None = ..., shrinkA: float = ..., shrinkB: float = ..., mutation_scale: float = ..., mutation_aspect: float | None = ..., **kwargs) -> None:
...
def set_positions(self, posA: tuple[float, float], posB: tuple[float, float]) -> None:
...
def set_patchA(self, patchA: Patch) -> None:
...
def set_patchB(self, patchB: Patch) -> None:
...
def set_connectionstyle(self, connectionstyle: str | ConnectionStyle | None = ..., **kwargs) -> None:
...
def get_connectionstyle(self) -> ConnectionStyle:
...
def set_arrowstyle(self, arrowstyle: str | ArrowStyle | None = ..., **kwargs) -> None:
...
def get_arrowstyle(self) -> ArrowStyle:
...
def set_mutation_scale(self, scale: float) -> None:
...
def get_mutation_scale(self) -> float:
...
def set_mutation_aspect(self, aspect: float | None) -> None:
...
def get_mutation_aspect(self) -> float:
...
class ConnectionPatch(FancyArrowPatch):
xy1: tuple[float, float]
xy2: tuple[float, float]
coords1: str | Transform
coords2: str | Transform | None
axesA: Axes | None
axesB: Axes | None
def __init__(self, xyA: tuple[float, float], xyB: tuple[float, float], coordsA: str | Transform, coordsB: str | Transform | None = ..., *, axesA: Axes | None = ..., axesB: Axes | None = ..., arrowstyle: str | ArrowStyle = ..., connectionstyle: str | ConnectionStyle = ..., patchA: Patch | None = ..., patchB: Patch | None = ..., shrinkA: float = ..., shrinkB: float = ..., mutation_scale: float = ..., mutation_aspect: float | None = ..., clip_on: bool = ..., **kwargs) -> None:
...
def set_annotation_clip(self, b: bool | None) -> None:
...
def get_annotation_clip(self) -> bool | None:
...

@ -0,0 +1,167 @@
"""
This type stub file was generated by pyright.
"""
import numpy as np
from .bezier import BezierSegment
from .transforms import Affine2D, Bbox, Transform
from collections.abc import Generator, Iterable, Sequence
from numpy.typing import ArrayLike
from typing import Any, overload
class Path:
code_type: type[np.uint8]
STOP: np.uint8
MOVETO: np.uint8
LINETO: np.uint8
CURVE3: np.uint8
CURVE4: np.uint8
CLOSEPOLY: np.uint8
NUM_VERTICES_FOR_CODE: dict[np.uint8, int]
def __init__(self, vertices: ArrayLike, codes: ArrayLike | None = ..., _interpolation_steps: int = ..., closed: bool = ..., readonly: bool = ...) -> None:
...
@property
def vertices(self) -> ArrayLike:
...
@vertices.setter
def vertices(self, vertices: ArrayLike) -> None:
...
@property
def codes(self) -> ArrayLike:
...
@codes.setter
def codes(self, codes: ArrayLike) -> None:
...
@property
def simplify_threshold(self) -> float:
...
@simplify_threshold.setter
def simplify_threshold(self, threshold: float) -> None:
...
@property
def should_simplify(self) -> bool:
...
@should_simplify.setter
def should_simplify(self, should_simplify: bool) -> None:
...
@property
def readonly(self) -> bool:
...
def copy(self) -> Path:
...
def __deepcopy__(self, memo: dict[int, Any] | None = ...) -> Path:
...
deepcopy = ...
@classmethod
def make_compound_path_from_polys(cls, XY: ArrayLike) -> Path:
...
@classmethod
def make_compound_path(cls, *args: Path) -> Path:
...
def __len__(self) -> int:
...
def iter_segments(self, transform: Transform | None = ..., remove_nans: bool = ..., clip: tuple[float, float, float, float] | None = ..., snap: bool | None = ..., stroke_width: float = ..., simplify: bool | None = ..., curves: bool = ..., sketch: tuple[float, float, float] | None = ...) -> Generator[tuple[np.ndarray, np.uint8], None, None]:
...
def iter_bezier(self, **kwargs) -> Generator[BezierSegment, None, None]:
...
def cleaned(self, transform: Transform | None = ..., remove_nans: bool = ..., clip: tuple[float, float, float, float] | None = ..., *, simplify: bool | None = ..., curves: bool = ..., stroke_width: float = ..., snap: bool | None = ..., sketch: tuple[float, float, float] | None = ...) -> Path:
...
def transformed(self, transform: Transform) -> Path:
...
def contains_point(self, point: tuple[float, float], transform: Transform | None = ..., radius: float = ...) -> bool:
...
def contains_points(self, points: ArrayLike, transform: Transform | None = ..., radius: float = ...) -> np.ndarray:
...
def contains_path(self, path: Path, transform: Transform | None = ...) -> bool:
...
def get_extents(self, transform: Transform | None = ..., **kwargs) -> Bbox:
...
def intersects_path(self, other: Path, filled: bool = ...) -> bool:
...
def intersects_bbox(self, bbox: Bbox, filled: bool = ...) -> bool:
...
def interpolated(self, steps: int) -> Path:
...
def to_polygons(self, transform: Transform | None = ..., width: float = ..., height: float = ..., closed_only: bool = ...) -> list[ArrayLike]:
...
@classmethod
def unit_rectangle(cls) -> Path:
...
@classmethod
def unit_regular_polygon(cls, numVertices: int) -> Path:
...
@classmethod
def unit_regular_star(cls, numVertices: int, innerCircle: float = ...) -> Path:
...
@classmethod
def unit_regular_asterisk(cls, numVertices: int) -> Path:
...
@classmethod
def unit_circle(cls) -> Path:
...
@classmethod
def circle(cls, center: tuple[float, float] = ..., radius: float = ..., readonly: bool = ...) -> Path:
...
@classmethod
def unit_circle_righthalf(cls) -> Path:
...
@classmethod
def arc(cls, theta1: float, theta2: float, n: int | None = ..., is_wedge: bool = ...) -> Path:
...
@classmethod
def wedge(cls, theta1: float, theta2: float, n: int | None = ...) -> Path:
...
@overload
@staticmethod
def hatch(hatchpattern: str, density: float = ...) -> Path:
...
@overload
@staticmethod
def hatch(hatchpattern: None, density: float = ...) -> None:
...
def clip_to_bbox(self, bbox: Bbox, inside: bool = ...) -> Path:
...
def get_path_collection_extents(master_transform: Transform, paths: Sequence[Path], transforms: Iterable[Affine2D], offsets: ArrayLike, offset_transform: Affine2D) -> Bbox:
...

@ -0,0 +1,104 @@
"""
This type stub file was generated by pyright.
"""
from collections.abc import Iterable, Sequence
from typing import Any
from matplotlib.backend_bases import GraphicsContextBase, RendererBase
from matplotlib.path import Path
from matplotlib.patches import Patch
from matplotlib.transforms import Transform
from matplotlib.typing import ColorType
class AbstractPathEffect:
def __init__(self, offset: tuple[float, float] = ...) -> None:
...
def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType | None = ...) -> None:
...
class PathEffectRenderer(RendererBase):
def __init__(self, path_effects: Iterable[AbstractPathEffect], renderer: RendererBase) -> None:
...
def copy_with_path_effect(self, path_effects: Iterable[AbstractPathEffect]) -> PathEffectRenderer:
...
def draw_path(self, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType | None = ...) -> None:
...
def draw_markers(self, gc: GraphicsContextBase, marker_path: Path, marker_trans: Transform, path: Path, *args, **kwargs) -> None:
...
def draw_path_collection(self, gc: GraphicsContextBase, master_transform: Transform, paths: Sequence[Path], *args, **kwargs) -> None:
...
def __getattribute__(self, name: str) -> Any:
...
class Normal(AbstractPathEffect):
...
class Stroke(AbstractPathEffect):
def __init__(self, offset: tuple[float, float] = ..., **kwargs) -> None:
...
def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType) -> None:
...
class withStroke(Stroke):
...
class SimplePatchShadow(AbstractPathEffect):
def __init__(self, offset: tuple[float, float] = ..., shadow_rgbFace: ColorType | None = ..., alpha: float | None = ..., rho: float = ..., **kwargs) -> None:
...
def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType) -> None:
...
class withSimplePatchShadow(SimplePatchShadow):
...
class SimpleLineShadow(AbstractPathEffect):
def __init__(self, offset: tuple[float, float] = ..., shadow_color: ColorType = ..., alpha: float = ..., rho: float = ..., **kwargs) -> None:
...
def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType) -> None:
...
class PathPatchEffect(AbstractPathEffect):
patch: Patch
def __init__(self, offset: tuple[float, float] = ..., **kwargs) -> None:
...
def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType) -> None:
...
class TickedStroke(AbstractPathEffect):
def __init__(self, offset: tuple[float, float] = ..., spacing: float = ..., angle: float = ..., length: float = ..., **kwargs) -> None:
...
def draw_path(self, renderer: RendererBase, gc: GraphicsContextBase, tpath: Path, affine: Transform, rgbFace: ColorType) -> None:
...
class withTickedStroke(TickedStroke):
...

@ -0,0 +1,33 @@
"""
This type stub file was generated by pyright.
"""
from .geo import AitoffAxes, HammerAxes, LambertAxes, MollweideAxes
from .polar import PolarAxes
from ..axes import Axes
class ProjectionRegistry:
def __init__(self) -> None:
...
def register(self, *projections: type[Axes]) -> None:
...
def get_projection_class(self, name: str) -> type[Axes]:
...
def get_projection_names(self) -> list[str]:
...
projection_registry: ProjectionRegistry
def register_projection(cls: type[Axes]) -> None:
...
def get_projection_class(projection: str | None = ...) -> type[Axes]:
...
def get_projection_names() -> list[str]:
...

@ -0,0 +1,157 @@
"""
This type stub file was generated by pyright.
"""
from matplotlib.axes import Axes
from matplotlib.ticker import Formatter
from matplotlib.transforms import Transform
from typing import Any, Literal
class GeoAxes(Axes):
class ThetaFormatter(Formatter):
def __init__(self, round_to: float = ...) -> None:
...
def __call__(self, x: float, pos: Any | None = ...):
...
RESOLUTION: float
def get_xaxis_transform(self, which: Literal["tick1", "tick2", "grid"] = ...) -> Transform:
...
def get_xaxis_text1_transform(self, pad: float) -> tuple[Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]:
...
def get_xaxis_text2_transform(self, pad: float) -> tuple[Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]:
...
def get_yaxis_transform(self, which: Literal["tick1", "tick2", "grid"] = ...) -> Transform:
...
def get_yaxis_text1_transform(self, pad: float) -> tuple[Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]:
...
def get_yaxis_text2_transform(self, pad: float) -> tuple[Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]:
...
def set_xlim(self, *args, **kwargs) -> tuple[float, float]:
...
def set_ylim(self, *args, **kwargs) -> tuple[float, float]:
...
def format_coord(self, lon: float, lat: float) -> str:
...
def set_longitude_grid(self, degrees: float) -> None:
...
def set_latitude_grid(self, degrees: float) -> None:
...
def set_longitude_grid_ends(self, degrees: float) -> None:
...
def get_data_ratio(self) -> float:
...
def can_zoom(self) -> bool:
...
def can_pan(self) -> bool:
...
def start_pan(self, x, y, button) -> None:
...
def end_pan(self) -> None:
...
def drag_pan(self, button, key, x, y) -> None:
...
class _GeoTransform(Transform):
input_dims: int
output_dims: int
def __init__(self, resolution: int) -> None:
...
class AitoffAxes(GeoAxes):
name: str
class AitoffTransform(_GeoTransform):
def inverted(self) -> AitoffAxes.InvertedAitoffTransform:
...
class InvertedAitoffTransform(_GeoTransform):
def inverted(self) -> AitoffAxes.AitoffTransform:
...
class HammerAxes(GeoAxes):
name: str
class HammerTransform(_GeoTransform):
def inverted(self) -> HammerAxes.InvertedHammerTransform:
...
class InvertedHammerTransform(_GeoTransform):
def inverted(self) -> HammerAxes.HammerTransform:
...
class MollweideAxes(GeoAxes):
name: str
class MollweideTransform(_GeoTransform):
def inverted(self) -> MollweideAxes.InvertedMollweideTransform:
...
class InvertedMollweideTransform(_GeoTransform):
def inverted(self) -> MollweideAxes.MollweideTransform:
...
class LambertAxes(GeoAxes):
name: str
class LambertTransform(_GeoTransform):
def __init__(self, center_longitude: float, center_latitude: float, resolution: int) -> None:
...
def inverted(self) -> LambertAxes.InvertedLambertTransform:
...
class InvertedLambertTransform(_GeoTransform):
def __init__(self, center_longitude: float, center_latitude: float, resolution: int) -> None:
...
def inverted(self) -> LambertAxes.LambertTransform:
...
def __init__(self, *args, center_longitude: float = ..., center_latitude: float = ..., **kwargs) -> None:
...

@ -0,0 +1,242 @@
"""
This type stub file was generated by pyright.
"""
import matplotlib.axis as maxis
import matplotlib.ticker as mticker
import matplotlib.transforms as mtransforms
import numpy as np
from matplotlib.axes import Axes
from matplotlib.lines import Line2D
from matplotlib.text import Text
from numpy.typing import ArrayLike
from collections.abc import Sequence
from typing import Any, ClassVar, Literal, overload
class PolarTransform(mtransforms.Transform):
input_dims: int
output_dims: int
def __init__(self, axis: PolarAxes | None = ..., use_rmin: bool = ..., _apply_theta_transforms: bool = ..., *, scale_transform: mtransforms.Transform | None = ...) -> None:
...
def inverted(self) -> InvertedPolarTransform:
...
class PolarAffine(mtransforms.Affine2DBase):
def __init__(self, scale_transform: mtransforms.Transform, limits: mtransforms.BboxBase) -> None:
...
class InvertedPolarTransform(mtransforms.Transform):
input_dims: int
output_dims: int
def __init__(self, axis: PolarAxes | None = ..., use_rmin: bool = ..., _apply_theta_transforms: bool = ...) -> None:
...
def inverted(self) -> PolarTransform:
...
class ThetaFormatter(mticker.Formatter):
...
class _AxisWrapper:
def __init__(self, axis: maxis.Axis) -> None:
...
def get_view_interval(self) -> np.ndarray:
...
def set_view_interval(self, vmin: float, vmax: float) -> None:
...
def get_minpos(self) -> float:
...
def get_data_interval(self) -> np.ndarray:
...
def set_data_interval(self, vmin: float, vmax: float) -> None:
...
def get_tick_space(self) -> int:
...
class ThetaLocator(mticker.Locator):
base: mticker.Locator
axis: _AxisWrapper | None
def __init__(self, base: mticker.Locator) -> None:
...
class ThetaTick(maxis.XTick):
def __init__(self, axes: PolarAxes, *args, **kwargs) -> None:
...
class ThetaAxis(maxis.XAxis):
axis_name: str
...
class RadialLocator(mticker.Locator):
base: mticker.Locator
def __init__(self, base, axes: PolarAxes | None = ...) -> None:
...
class RadialTick(maxis.YTick):
...
class RadialAxis(maxis.YAxis):
axis_name: str
...
class _WedgeBbox(mtransforms.Bbox):
def __init__(self, center: tuple[float, float], viewLim: mtransforms.Bbox, originLim: mtransforms.Bbox, **kwargs) -> None:
...
class PolarAxes(Axes):
PolarTransform: ClassVar[type] = ...
PolarAffine: ClassVar[type] = ...
InvertedPolarTransform: ClassVar[type] = ...
ThetaFormatter: ClassVar[type] = ...
RadialLocator: ClassVar[type] = ...
ThetaLocator: ClassVar[type] = ...
name: str
use_sticky_edges: bool
def __init__(self, *args, theta_offset: float = ..., theta_direction: float = ..., rlabel_position: float = ..., **kwargs) -> None:
...
def get_xaxis_transform(self, which: Literal["tick1", "tick2", "grid"] = ...) -> mtransforms.Transform:
...
def get_xaxis_text1_transform(self, pad: float) -> tuple[mtransforms.Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]:
...
def get_xaxis_text2_transform(self, pad: float) -> tuple[mtransforms.Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]:
...
def get_yaxis_transform(self, which: Literal["tick1", "tick2", "grid"] = ...) -> mtransforms.Transform:
...
def get_yaxis_text1_transform(self, pad: float) -> tuple[mtransforms.Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]:
...
def get_yaxis_text2_transform(self, pad: float) -> tuple[mtransforms.Transform, Literal["center", "top", "bottom", "baseline", "center_baseline"], Literal["center", "left", "right"],]:
...
def set_thetamax(self, thetamax: float) -> None:
...
def get_thetamax(self) -> float:
...
def set_thetamin(self, thetamin: float) -> None:
...
def get_thetamin(self) -> float:
...
@overload
def set_thetalim(self, minval: float, maxval: float, /) -> tuple[float, float]:
...
@overload
def set_thetalim(self, *, thetamin: float, thetamax: float) -> tuple[float, float]:
...
def set_theta_offset(self, offset: float) -> None:
...
def get_theta_offset(self) -> float:
...
def set_theta_zero_location(self, loc: Literal["N", "NW", "W", "SW", "S", "SE", "E", "NE"], offset: float = ...) -> None:
...
def set_theta_direction(self, direction: Literal[-1, 1, "clockwise", "counterclockwise", "anticlockwise"]) -> None:
...
def get_theta_direction(self) -> Literal[-1, 1]:
...
def set_rmax(self, rmax: float) -> None:
...
def get_rmax(self) -> float:
...
def set_rmin(self, rmin: float) -> None:
...
def get_rmin(self) -> float:
...
def set_rorigin(self, rorigin: float | None) -> None:
...
def get_rorigin(self) -> float:
...
def get_rsign(self) -> float:
...
def set_rlim(self, bottom: float | tuple[float, float] | None = ..., top: float | None = ..., *, emit: bool = ..., auto: bool = ..., **kwargs) -> tuple[float, float]:
...
def get_rlabel_position(self) -> float:
...
def set_rlabel_position(self, value: float) -> None:
...
def set_rscale(self, *args, **kwargs) -> None:
...
def set_rticks(self, *args, **kwargs) -> None:
...
def set_thetagrids(self, angles: ArrayLike, labels: Sequence[str | Text] | None = ..., fmt: str | None = ..., **kwargs) -> tuple[list[Line2D], list[Text]]:
...
def set_rgrids(self, radii: ArrayLike, labels: Sequence[str | Text] | None = ..., angle: float | None = ..., fmt: str | None = ..., **kwargs) -> tuple[list[Line2D], list[Text]]:
...
def format_coord(self, theta: float, r: float) -> str:
...
def get_data_ratio(self) -> float:
...
def can_zoom(self) -> bool:
...
def can_pan(self) -> bool:
...
def start_pan(self, x: float, y: float, button: int) -> None:
...
def end_pan(self) -> None:
...
def drag_pan(self, button: Any, key: Any, x: float, y: float) -> None:
...

@ -0,0 +1,37 @@
"""
This type stub file was generated by pyright.
"""
from matplotlib.pyplot import *
from numpy import *
from numpy.fft import *
from numpy.random import *
from numpy.linalg import *
"""
`pylab` is a historic interface and its use is strongly discouraged. The equivalent
replacement is `matplotlib.pyplot`. See :ref:`api_interfaces` for a full overview
of Matplotlib interfaces.
`pylab` was designed to support a MATLAB-like way of working with all plotting related
functions directly available in the global namespace. This was achieved through a
wildcard import (``from pylab import *``).
.. warning::
The use of `pylab` is discouraged for the following reasons:
``from pylab import *`` imports all the functions from `matplotlib.pyplot`, `numpy`,
`numpy.fft`, `numpy.linalg`, and `numpy.random`, and some additional functions into
the global namespace.
Such a pattern is considered bad practice in modern python, as it clutters the global
namespace. Even more severely, in the case of `pylab`, this will overwrite some
builtin functions (e.g. the builtin `sum` will be replaced by `numpy.sum`), which
can lead to unexpected behavior.
"""
bytes = ...
abs = ...
max = ...
min = ...
round = ...

File diff suppressed because it is too large Load Diff

@ -0,0 +1,117 @@
"""
This type stub file was generated by pyright.
"""
import matplotlib.artist as martist
import matplotlib.collections as mcollections
import numpy as np
from matplotlib.axes import Axes
from matplotlib.figure import Figure
from matplotlib.text import Text
from matplotlib.transforms import Bbox, Transform
from numpy.typing import ArrayLike
from collections.abc import Sequence
from typing import Any, Literal, overload
from matplotlib.typing import ColorType
class QuiverKey(martist.Artist):
halign: dict[Literal["N", "S", "E", "W"], Literal["left", "center", "right"]]
valign: dict[Literal["N", "S", "E", "W"], Literal["top", "center", "bottom"]]
pivot: dict[Literal["N", "S", "E", "W"], Literal["middle", "tip", "tail"]]
Q: Quiver
X: float
Y: float
U: float
angle: float
coord: Literal["axes", "figure", "data", "inches"]
color: ColorType | None
label: str
labelpos: Literal["N", "S", "E", "W"]
labelcolor: ColorType | None
fontproperties: dict[str, Any]
kw: dict[str, Any]
text: Text
zorder: float
def __init__(self, Q: Quiver, X: float, Y: float, U: float, label: str, *, angle: float = ..., coordinates: Literal["axes", "figure", "data", "inches"] = ..., color: ColorType | None = ..., labelsep: float = ..., labelpos: Literal["N", "S", "E", "W"] = ..., labelcolor: ColorType | None = ..., fontproperties: dict[str, Any] | None = ..., **kwargs) -> None:
...
@property
def labelsep(self) -> float:
...
def set_figure(self, fig: Figure) -> None:
...
class Quiver(mcollections.PolyCollection):
X: ArrayLike
Y: ArrayLike
XY: ArrayLike
U: ArrayLike
V: ArrayLike
Umask: ArrayLike
N: int
scale: float | None
headwidth: float
headlength: float
headaxislength: float
minshaft: float
minlength: float
units: Literal["width", "height", "dots", "inches", "x", "y", "xy"]
scale_units: Literal["width", "height", "dots", "inches", "x", "y", "xy"] | None
angles: Literal["uv", "xy"] | ArrayLike
width: float | None
pivot: Literal["tail", "middle", "tip"]
transform: Transform
polykw: dict[str, Any]
@overload
def __init__(self, ax: Axes, U: ArrayLike, V: ArrayLike, C: ArrayLike = ..., *, scale: float | None = ..., headwidth: float = ..., headlength: float = ..., headaxislength: float = ..., minshaft: float = ..., minlength: float = ..., units: Literal["width", "height", "dots", "inches", "x", "y", "xy"] = ..., scale_units: Literal["width", "height", "dots", "inches", "x", "y", "xy"] | None = ..., angles: Literal["uv", "xy"] | ArrayLike = ..., width: float | None = ..., color: ColorType | Sequence[ColorType] = ..., pivot: Literal["tail", "mid", "middle", "tip"] = ..., **kwargs) -> None:
...
@overload
def __init__(self, ax: Axes, X: ArrayLike, Y: ArrayLike, U: ArrayLike, V: ArrayLike, C: ArrayLike = ..., *, scale: float | None = ..., headwidth: float = ..., headlength: float = ..., headaxislength: float = ..., minshaft: float = ..., minlength: float = ..., units: Literal["width", "height", "dots", "inches", "x", "y", "xy"] = ..., scale_units: Literal["width", "height", "dots", "inches", "x", "y", "xy"] | None = ..., angles: Literal["uv", "xy"] | ArrayLike = ..., width: float | None = ..., color: ColorType | Sequence[ColorType] = ..., pivot: Literal["tail", "mid", "middle", "tip"] = ..., **kwargs) -> None:
...
def get_datalim(self, transData: Transform) -> Bbox:
...
def set_UVC(self, U: ArrayLike, V: ArrayLike, C: ArrayLike | None = ...) -> None:
...
@property
def quiver_doc(self) -> str:
...
class Barbs(mcollections.PolyCollection):
sizes: dict[str, float]
fill_empty: bool
barb_increments: dict[str, float]
rounding: bool
flip: np.ndarray
x: ArrayLike
y: ArrayLike
u: ArrayLike
v: ArrayLike
@overload
def __init__(self, ax: Axes, U: ArrayLike, V: ArrayLike, C: ArrayLike = ..., *, pivot: str = ..., length: int = ..., barbcolor: ColorType | Sequence[ColorType] | None = ..., flagcolor: ColorType | Sequence[ColorType] | None = ..., sizes: dict[str, float] | None = ..., fill_empty: bool = ..., barb_increments: dict[str, float] | None = ..., rounding: bool = ..., flip_barb: bool | ArrayLike = ..., **kwargs) -> None:
...
@overload
def __init__(self, ax: Axes, X: ArrayLike, Y: ArrayLike, U: ArrayLike, V: ArrayLike, C: ArrayLike = ..., *, pivot: str = ..., length: int = ..., barbcolor: ColorType | Sequence[ColorType] | None = ..., flagcolor: ColorType | Sequence[ColorType] | None = ..., sizes: dict[str, float] | None = ..., fill_empty: bool = ..., barb_increments: dict[str, float] | None = ..., rounding: bool = ..., flip_barb: bool | ArrayLike = ..., **kwargs) -> None:
...
def set_UVC(self, U: ArrayLike, V: ArrayLike, C: ArrayLike | None = ...) -> None:
...
def set_offsets(self, xy: ArrayLike) -> None:
...
@property
def barbs_doc(self) -> str:
...

@ -0,0 +1,149 @@
"""
This type stub file was generated by pyright.
"""
from cycler import Cycler
from collections.abc import Iterable
from typing import Any, Literal, TypeVar
from matplotlib.typing import ColorType, MarkEveryType
interactive_bk: list[str]
non_interactive_bk: list[str]
all_backends: list[str]
_T = TypeVar("_T")
class ValidateInStrings:
key: str
ignorecase: bool
valid: dict[str, str]
def __init__(self, key: str, valid: Iterable[str], ignorecase: bool = ..., *, _deprecated_since: str | None = ...) -> None:
...
def __call__(self, s: Any) -> str:
...
def validate_any(s: Any) -> Any:
...
def validate_anylist(s: Any) -> list[Any]:
...
def validate_bool(b: Any) -> bool:
...
def validate_axisbelow(s: Any) -> bool | Literal["line"]:
...
def validate_dpi(s: Any) -> Literal["figure"] | float:
...
def validate_string(s: Any) -> str:
...
def validate_string_or_None(s: Any) -> str | None:
...
def validate_stringlist(s: Any) -> list[str]:
...
def validate_int(s: Any) -> int:
...
def validate_int_or_None(s: Any) -> int | None:
...
def validate_float(s: Any) -> float:
...
def validate_float_or_None(s: Any) -> float | None:
...
def validate_floatlist(s: Any) -> list[float]:
...
def validate_fonttype(s: Any) -> int:
...
_auto_backend_sentinel: object
def validate_backend(s: Any) -> str:
...
def validate_color_or_inherit(s: Any) -> Literal["inherit"] | ColorType:
...
def validate_color_or_auto(s: Any) -> ColorType | Literal["auto"]:
...
def validate_color_for_prop_cycle(s: Any) -> ColorType:
...
def validate_color(s: Any) -> ColorType:
...
def validate_colorlist(s: Any) -> list[ColorType]:
...
def validate_aspect(s: Any) -> Literal["auto", "equal"] | float:
...
def validate_fontsize_None(s: Any) -> Literal["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "smaller", "larger",] | float | None:
...
def validate_fontsize(s: Any) -> Literal["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "smaller", "larger",] | float:
...
def validate_fontsizelist(s: Any) -> list[Literal["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "smaller", "larger",] | float]:
...
def validate_fontweight(s: Any) -> Literal["ultralight", "light", "normal", "regular", "book", "medium", "roman", "semibold", "demibold", "demi", "bold", "heavy", "extra bold", "black",] | int:
...
def validate_fontstretch(s: Any) -> Literal["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded",] | int:
...
def validate_font_properties(s: Any) -> dict[str, Any]:
...
def validate_whiskers(s: Any) -> list[float] | float:
...
def validate_ps_distiller(s: Any) -> None | Literal["ghostscript", "xpdf"]:
...
def validate_fillstyle(s: Any) -> Literal["full", "left", "right", "bottom", "top", "none"]:
...
def validate_fillstylelist(s: Any) -> list[Literal["full", "left", "right", "bottom", "top", "none"]]:
...
def validate_markevery(s: Any) -> MarkEveryType:
...
def validate_markeverylist(s: Any) -> list[MarkEveryType]:
...
def validate_bbox(s: Any) -> Literal["tight", "standard"] | None:
...
def validate_sketch(s: Any) -> None | tuple[float, float, float]:
...
def validate_hatch(s: Any) -> str:
...
def validate_hatchlist(s: Any) -> list[str]:
...
def validate_dashlist(s: Any) -> list[list[float]]:
...
def cycler(*args, **kwargs) -> Cycler:
...
def validate_cycler(s: Any) -> Cycler:
...
def validate_hist_bins(s: Any) -> Literal["auto", "sturges", "fd", "doane", "scott", "rice", "sqrt"] | int | list[float]:
...

@ -0,0 +1,41 @@
"""
This type stub file was generated by pyright.
"""
import numpy as np
from matplotlib.axes import Axes
from collections.abc import Callable, Iterable
from typing import Any
__license__: str
__credits__: list[str]
__author__: str
__version__: str
RIGHT: int
UP: int
DOWN: int
class Sankey:
diagrams: list[Any]
ax: Axes
unit: Any
format: str | Callable[[float], str]
scale: float
gap: float
radius: float
shoulder: float
offset: float
margin: float
pitch: float
tolerance: float
extent: np.ndarray
def __init__(self, ax: Axes | None = ..., scale: float = ..., unit: Any = ..., format: str | Callable[[float], str] = ..., gap: float = ..., radius: float = ..., shoulder: float = ..., offset: float = ..., head_angle: float = ..., margin: float = ..., tolerance: float = ..., **kwargs) -> None:
...
def add(self, patchlabel: str = ..., flows: Iterable[float] | None = ..., orientations: Iterable[int] | None = ..., labels: str | Iterable[str | None] = ..., trunklength: float = ..., pathlengths: float | Iterable[float] = ..., prior: int | None = ..., connect: tuple[int, int] = ..., rotation: float = ..., **kwargs) -> Sankey:
...
def finish(self) -> list[Any]:
...

@ -0,0 +1,232 @@
"""
This type stub file was generated by pyright.
"""
from matplotlib.axis import Axis
from matplotlib.transforms import Transform
from collections.abc import Callable, Iterable
from typing import Literal
from numpy.typing import ArrayLike
class ScaleBase:
def __init__(self, axis: Axis | None) -> None:
...
def get_transform(self) -> Transform:
...
def set_default_locators_and_formatters(self, axis: Axis) -> None:
...
def limit_range_for_scale(self, vmin: float, vmax: float, minpos: float) -> tuple[float, float]:
...
class LinearScale(ScaleBase):
name: str
...
class FuncTransform(Transform):
input_dims: int
output_dims: int
def __init__(self, forward: Callable[[ArrayLike], ArrayLike], inverse: Callable[[ArrayLike], ArrayLike]) -> None:
...
def inverted(self) -> FuncTransform:
...
class FuncScale(ScaleBase):
name: str
def __init__(self, axis: Axis | None, functions: tuple[Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]]) -> None:
...
class LogTransform(Transform):
input_dims: int
output_dims: int
base: float
def __init__(self, base: float, nonpositive: Literal["clip", "mask"] = ...) -> None:
...
def inverted(self) -> InvertedLogTransform:
...
class InvertedLogTransform(Transform):
input_dims: int
output_dims: int
base: float
def __init__(self, base: float) -> None:
...
def inverted(self) -> LogTransform:
...
class LogScale(ScaleBase):
name: str
subs: Iterable[int] | None
def __init__(self, axis: Axis | None, *, base: float = ..., subs: Iterable[int] | None = ..., nonpositive: Literal["clip", "mask"] = ...) -> None:
...
@property
def base(self) -> float:
...
def get_transform(self) -> Transform:
...
class FuncScaleLog(LogScale):
def __init__(self, axis: Axis | None, functions: tuple[Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]], base: float = ...) -> None:
...
@property
def base(self) -> float:
...
def get_transform(self) -> Transform:
...
class SymmetricalLogTransform(Transform):
input_dims: int
output_dims: int
base: float
linthresh: float
linscale: float
def __init__(self, base: float, linthresh: float, linscale: float) -> None:
...
def inverted(self) -> InvertedSymmetricalLogTransform:
...
class InvertedSymmetricalLogTransform(Transform):
input_dims: int
output_dims: int
base: float
linthresh: float
invlinthresh: float
linscale: float
def __init__(self, base: float, linthresh: float, linscale: float) -> None:
...
def inverted(self) -> SymmetricalLogTransform:
...
class SymmetricalLogScale(ScaleBase):
name: str
subs: Iterable[int] | None
def __init__(self, axis: Axis | None, *, base: float = ..., linthresh: float = ..., subs: Iterable[int] | None = ..., linscale: float = ...) -> None:
...
@property
def base(self) -> float:
...
@property
def linthresh(self) -> float:
...
@property
def linscale(self) -> float:
...
def get_transform(self) -> SymmetricalLogTransform:
...
class AsinhTransform(Transform):
input_dims: int
output_dims: int
linear_width: float
def __init__(self, linear_width: float) -> None:
...
def inverted(self) -> InvertedAsinhTransform:
...
class InvertedAsinhTransform(Transform):
input_dims: int
output_dims: int
linear_width: float
def __init__(self, linear_width: float) -> None:
...
def inverted(self) -> AsinhTransform:
...
class AsinhScale(ScaleBase):
name: str
auto_tick_multipliers: dict[int, tuple[int, ...]]
def __init__(self, axis: Axis | None, *, linear_width: float = ..., base: float = ..., subs: Iterable[int] | Literal["auto"] | None = ..., **kwargs) -> None:
...
@property
def linear_width(self) -> float:
...
def get_transform(self) -> AsinhTransform:
...
class LogitTransform(Transform):
input_dims: int
output_dims: int
def __init__(self, nonpositive: Literal["mask", "clip"] = ...) -> None:
...
def inverted(self) -> LogisticTransform:
...
class LogisticTransform(Transform):
input_dims: int
output_dims: int
def __init__(self, nonpositive: Literal["mask", "clip"] = ...) -> None:
...
def inverted(self) -> LogitTransform:
...
class LogitScale(ScaleBase):
name: str
def __init__(self, axis: Axis | None, nonpositive: Literal["mask", "clip"] = ..., *, one_half: str = ..., use_overline: bool = ...) -> None:
...
def get_transform(self) -> LogitTransform:
...
def get_scale_names() -> list[str]:
...
def scale_factory(scale: str, axis: Axis, **kwargs) -> ScaleBase:
...
def register_scale(scale_class: type[ScaleBase]) -> None:
...

@ -0,0 +1,4 @@
"""
This type stub file was generated by pyright.
"""

@ -0,0 +1,119 @@
"""
This type stub file was generated by pyright.
"""
import matplotlib.patches as mpatches
from collections.abc import Callable, Iterator, MutableMapping
from typing import Literal, TypeVar, overload
from matplotlib.axes import Axes
from matplotlib.axis import Axis
from matplotlib.path import Path
from matplotlib.transforms import Transform
from matplotlib.typing import ColorType
class Spine(mpatches.Patch):
axes: Axes
spine_type: str
axis: Axis | None
def __init__(self, axes: Axes, spine_type: str, path: Path, **kwargs) -> None:
...
def set_patch_arc(self, center: tuple[float, float], radius: float, theta1: float, theta2: float) -> None:
...
def set_patch_circle(self, center: tuple[float, float], radius: float) -> None:
...
def set_patch_line(self) -> None:
...
def get_patch_transform(self) -> Transform:
...
def get_path(self) -> Path:
...
def register_axis(self, axis: Axis) -> None:
...
def clear(self) -> None:
...
def set_position(self, position: Literal["center", "zero"] | tuple[Literal["outward", "axes", "data"], float]) -> None:
...
def get_position(self) -> Literal["center", "zero"] | tuple[Literal["outward", "axes", "data"], float]:
...
def get_spine_transform(self) -> Transform:
...
def set_bounds(self, low: float | None = ..., high: float | None = ...) -> None:
...
def get_bounds(self) -> tuple[float, float]:
...
_T = TypeVar("_T", bound=Spine)
@classmethod
def linear_spine(cls: type[_T], axes: Axes, spine_type: Literal["left", "right", "bottom", "top"], **kwargs) -> _T:
...
@classmethod
def arc_spine(cls: type[_T], axes: Axes, spine_type: Literal["left", "right", "bottom", "top"], center: tuple[float, float], radius: float, theta1: float, theta2: float, **kwargs) -> _T:
...
@classmethod
def circular_spine(cls: type[_T], axes: Axes, center: tuple[float, float], radius: float, **kwargs) -> _T:
...
def set_color(self, c: ColorType | None) -> None:
...
class SpinesProxy:
def __init__(self, spine_dict: dict[str, Spine]) -> None:
...
def __getattr__(self, name: str) -> Callable[..., None]:
...
def __dir__(self) -> list[str]:
...
class Spines(MutableMapping[str, Spine]):
def __init__(self, **kwargs: Spine) -> None:
...
@classmethod
def from_dict(cls, d: dict[str, Spine]) -> Spines:
...
def __getattr__(self, name: str) -> Spine:
...
@overload
def __getitem__(self, key: str) -> Spine:
...
@overload
def __getitem__(self, key: list[str]) -> SpinesProxy:
...
def __setitem__(self, key: str, value: Spine) -> None:
...
def __delitem__(self, key: str) -> None:
...
def __iter__(self) -> Iterator[str]:
...
def __len__(self) -> int:
...

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save