I has run the following code by VSCode:
import numpy as np
import matplotlib.pyplot as plt
a = np.array([2, 4, 5])
plt.plot(a)
print('Hello')
Its output didn't show matplotlib figure but still print 'Hello'. This is output log:
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
(demo.py:16992): Gdk-CRITICAL **: 10:33:28.827: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
Hello
I run this code by VSCode, Ubuntu 20.04. But when I run by Spyder3, It shows the figure normally.