|
24 | 24 | importnumpyasnp
|
25 | 25 | fromPILimportImage
|
26 | 26 |
|
27 |
| -frommatplotlibimport_api,colorsasmcolors,rcParams,_mathtext |
| 27 | +frommatplotlibimport ( |
| 28 | +_api,colorsasmcolors,rcParams,_mathtext,_mathtext_data) |
28 | 29 | frommatplotlib.ft2fontimportFT2Image,LOAD_NO_HINTING
|
29 | 30 | frommatplotlib.font_managerimportFontProperties
|
30 |
| -# Backcompat imports, all are deprecated as of 3.4. |
31 |
| -frommatplotlib._mathtextimport (# noqa: F401 |
32 |
| -SHRINK_FACTOR,GROW_FACTOR,NUM_SIZE_LEVELS) |
33 |
| -frommatplotlib._mathtext_dataimport (# noqa: F401 |
34 |
| -latex_to_bakoma,latex_to_cmex,latex_to_standard,stix_virtual_fonts, |
35 |
| -tex2uni) |
36 | 31 |
|
37 | 32 | _log=logging.getLogger(__name__)
|
38 | 33 |
|
39 | 34 |
|
| 35 | +@_api.caching_module_getattr |
| 36 | +class__getattr__: |
| 37 | +locals().update({ |
| 38 | +name:_api.deprecated("3.4")( |
| 39 | +property(lambdaself,_mod=mod,_name=name:getattr(_mod,_name))) |
| 40 | +formod,namesin [ |
| 41 | + (_mathtext, ["SHRINK_FACTOR","GROW_FACTOR","NUM_SIZE_LEVELS"]), |
| 42 | + (_mathtext_data, [ |
| 43 | +"latex_to_bakoma","latex_to_cmex","latex_to_standard", |
| 44 | +"stix_virtual_fonts","tex2uni"])] |
| 45 | +fornameinnames}) |
| 46 | + |
| 47 | + |
40 | 48 | get_unicode_index=_mathtext.get_unicode_index
|
41 | 49 | get_unicode_index.__module__=__name__
|
42 | 50 |
|
|