I prefer inline plots with matplotlib to plots in a separate window because it makes it easier to see what I'm doing when I'm fine tuning the Python code.
Python IDE for scientists (spyder) can do inline plotting. To try out this feature open the terminal and type:
sudo apt install python2.7 python-matplotlib spyder ipython # Python 2.x in Ubuntu 18.04 and earlier
sudo apt install python3 python3-matplotlib spyder3 ipython3 # Python 3.x
After the ipython prompt in the IPython console copy/paste the below code and press the Enter key to run it.
import matplotlib.pyplot as plt
x, y = [-1, 12], [1, 4]
plt.plot(x, y, marker = 'o')
Atom text editor with the Hydrogen package for Atom installed can also do inline plotting. I find the Atom interface more complicated to configure than Spyder in which inline plotting with matplotlib works out of the box. I got started with inline plotting in Atom because I wanted to use Atom to make inline plots with other programming languages too.