Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5935a2e

Browse files
committed
Fix extend[frac|size] warning bug
1 parent d283935 commit 5935a2e

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

‎proplot/axes/base.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,21 +1078,6 @@ def _add_colorbar(
10781078
f'Ignoring unused keyword arg(s): {pop}'
10791079
)
10801080

1081-
# Parse 'extendsize' and 'extendfrac' keywords
1082-
# TODO: Make this auto-adjust to the subplot size
1083-
vert = kwargs['orientation'] == 'vertical'
1084-
if extendsize is not None and extendfrac is not None:
1085-
warnings._warn_proplot(
1086-
f'You cannot specify both an absolute extendsize={extendsize!r} '
1087-
f"and a relative extendfrac={extendfrac!r}. Ignoring 'extendfrac'."
1088-
)
1089-
extendfrac = None
1090-
if extendfrac is None:
1091-
width, height = cax._get_size_inches()
1092-
scale = height if vert else width
1093-
extendsize = units(extendsize, 'em', 'in')
1094-
extendfrac = extendsize / max(scale - 2 * extendsize, units(1, 'em', 'in'))
1095-
10961081
# Parse the tick locators and formatters
10971082
# NOTE: In presence of BoundaryNorm or similar handle ticks with special
10981083
# DiscreteLocator or else get issues (see mpl #22233).

0 commit comments

Comments
 (0)