# sq.pl.spatial\_segment( TypeError: 'collection'

**URL:** <https://discourse.scverse.org/t/sq-pl-spatial-segment-typeerror-collection/1460>\
**Category:** squidpy\
**Created:** [May 24, 2023, 1:54pm UTC](https://discourse.scverse.org/t/sq-pl-spatial-segment-typeerror-collection/1460 "2023-05-24T13:54:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RimanB](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/rimanb/32/135_2.png) [@RimanB](https://discourse.scverse.org/u/RimanB)\
**Post date:** [May 24, 2023, 1:54pm UTC](https://discourse.scverse.org/t/sq-pl-spatial-segment-typeerror-collection/1460/1 "2023-05-24T13:54:53Z")

</div>

TypeError: ‘collection’ must be an instance of matplotlib.collections.Collection, not a matplotlib.image.AxesImage

---

<div class="post-metadata">

**Author:** ![MiTPenguin](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/mitpenguin/32/673_2.png) [@MiTPenguin](https://discourse.scverse.org/u/MiTPenguin)\
**Post date:** [May 24, 2023, 6:01pm UTC](https://discourse.scverse.org/t/sq-pl-spatial-segment-typeerror-collection/1460/2 "2023-05-24T18:01:14Z")

</div>

see here: [Spatial Segment TypeError](https://discourse.scverse.org/t/spatial-segment-typeerror/1371)
