Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2815

How to fix lag in matplotlib first plot in a WSL Ubuntu?

$
0
0

For a simple plot (e.g. plt.plot([1,2,3], [2,5,1]), matplotlib lags for around 10s after plt.show(), before it opens the plot window.

I'm on Ubuntu WSL on Windows 11. The lag only happens on the first time I plot something; second time is fast.

These are my versions:

matplotlib 3.7.0 py311h38be061_0 conda-forgematplotlib-base 3.7.0 py311h8597a09_0 conda-forgematplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge

The lag happens in both my base conda environment and in a custom one. But when I log in from a different Windows user and do the same, there is no lag regardless of which conda environment I use.

Maybe this is something in the Ubuntu WSL environment and how it communicates with the X Server?

Any idea about how to solve this problem or where/what to search?

OBS: I asked this question at SuperUser, but got no answer there. So, I'm trying here now.


Viewing all articles
Browse latest Browse all 2815

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>