How to output python graphs from terminal?
Question: I am very new to Python. Just installed it yesterday on Ubuntu 15.04. Now I am
trying to output a parabola from the terminal. As far I understand I can not
output any drawing on terminal so how can I see the graph?

I did : `sudo apt-get install python-numpy python-scipy python-matplotlib`

my code is

    
    
    import matplotlib.pyplot as plt
    import numpy as np
    
    # create 1000 equally spaced points between -10 and 10
    x = np.linspace(-10, 10, 1000)
    
    # calculate the y value for each element of the x vector
    y = x**2 + 2*x + 2  
    
    fig, ax = plt.subplots()
    ax.plot(x, y)
    

it does not show error when i do `python parabola.py` but no output :(


Answer: You need to add plt.show() at the end of the code, to display the parabola.

<http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.show>

