The GUI is going to have an option for the user to choose if he/she wants a 3D plot or a 2D plot. Here is the code and .ui file image:
.ui
from PyQt5