[Matplotlib-users] hiding segment of contour
Slavin, Jonathan
jslavin at cfa.harvard.edu
Fri Feb 16 11:30:13 EST 2024
Hi,
I'm wanting to plot a contour over an image. The call to contour with only
one level set results in two distinct segments, one a closed inner segment
and one an open outer segment. I used to be able to do something like:
c = ax.contour(image, level=[value], origin='lower')
c.collections[0].set_edgecolors(['w','None'])
and the closed inner segment didn't display. Now it doesn't work anymore.
I'm not finding any way to access separate segments. Any suggestions?
Thanks,
Jon
--
Jonathan D. Slavin (he/him)
Astrophysicist - High Energy Astrophysics Division
Center for Astrophysics | Harvard & Smithsonian
Office: (617) 496-7981 | Cell: (781) 363-0035
60 Garden Street | MS 04 | Cambridge, MA 02138
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/matplotlib-users/attachments/20240216/bc86cd89/attachment.html>
More information about the Matplotlib-users
mailing list