Blocking mode
Here is a Python script that displays a 1D plot.
The function plt.show() blocks the program execution
until the graphics window 9.2 is closed.
#!/usr/bin/env python
import matplotlib.pyplot as plt
import numpy as np
plt.plot(np.random.rand(100))
plt.ylabel('Random Numbers')
plt.xlabel('x-Axis')
plt.show()
Figure 9.2:
Random Numbers
|