From dev.thecellist at gmail.com Sun Feb 4 08:01:23 2024 From: dev.thecellist at gmail.com (Pierre) Date: Sun, 4 Feb 2024 14:01:23 +0100 Subject: [Matplotlib-users] Matplotlib window opening and suddenly closing Message-ID: Good morning, I am on Linux 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 GNU/Linux, with matplotlib version 3.8.2, I installed matplotlib from PyPi (pip), and I just performed a clean reinstall as suggested in your installation page. I have the following problem: when I run this code: import matplotlib.pyplot as plt plot() show() A matplotlib window opens and then closes immediately. Matplotlib is using TkAgg as backend, and when I open a tk window it works fine (doesn't close on opening). I don't know where the problem could come from as I've been using matplotlib for a while now and it worked perfectly until 2 days ago, and I was using it when the problem showed up. Thanks in advance for your help -------------- next part -------------- An HTML attachment was scrubbed... URL: From jslavin at cfa.harvard.edu Fri Feb 16 11:30:13 2024 From: jslavin at cfa.harvard.edu (Slavin, Jonathan) Date: Fri, 16 Feb 2024 11:30:13 -0500 Subject: [Matplotlib-users] hiding segment of contour Message-ID: 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: