1. Based on the virtualenv to draw the plots.
# first step:
sudo apt install python3.8
#then use python3.8 to pip install virutalenv
python3.8 -m pip install virtualenv
#second: use python3.8 to establish a virtualenv
python3.8 virtualenv ~/myenv
#third step
source myenv/bin/activate
#fourth step:
#you are in the virtualenv (name: myenv) with python3.8 environemtns
#then you can install all packages you need via pip
pip install numpy
pip install matplotlib
sudo apt-get install texlive-latex-extra texlive-fonts-recommended dvipng cm-super
# here, i want to emphasize the top commands, if you want to use latex to render matplotlib font to latex font. suggest you use this command line to install latex.