Skip to content

Commit ade079b

Browse files
committed
fix get_layout extents
1 parent c9ec3c4 commit ade079b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

eomaps/helpers.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,7 @@ def get_layout(
15171517
try:
15181518
# try to get extent if axis is associated with a Maps object
15191519
m = next((m for m in self.ms if m.ax is ax))
1520-
layout[f"{name}_extent"] = str(m.get_extent())
1520+
layout[f"{name}_extent"] = m.get_extent()
15211521
except StopIteration:
15221522
pass
15231523

@@ -1588,7 +1588,7 @@ def apply_layout(self, layout):
15881588
)
15891589

15901590
# set the figsize
1591-
figsize = layout.pop("figsize", None)
1591+
figsize = layout.get("figsize", None)
15921592
if figsize is not None:
15931593
self.f.set_size_inches(*figsize)
15941594

@@ -1601,6 +1601,9 @@ def apply_layout(self, layout):
16011601
cbs = [(colorbars[cbaxes.index(a)] if a in cbaxes else None) for a in axes]
16021602

16031603
for key in valid_keys.intersection(set(layout)):
1604+
if key == "figsize":
1605+
continue
1606+
16041607
val = layout[key]
16051608

16061609
i = int(key[: key.find("_")])

0 commit comments

Comments
 (0)