Here we start use Xming as Gui on WSL.
Configuration on WSL
Add this line to your .bashrc or .zshrc.
export DISPLAY=:0
Install Xming on Windows
Visit Xming X Server for Windows, download Xming and install it.
Open XLaunch and configure it. That Display number must be same with DISPLAY number configuration on WSL, which is 0 now.
After this, open Xming and input your command in WSL, the GUI will show.
Problems
Tkinter error
When Python3 script using matplotlib shows error like no module named "tkinter", you may need run sudo apt-get install python3-tk to solve it.
####
Refer:
[1]Winodws Linux Subsystem(WSL)的安装及GUI图形界面启用
[2]matplotlib error - no module named tkinter
Related: