python - Disable the output of matplotlib pyplot -


i have array a of shape (1000, 2000). use matplotlib.pyplot plot array, means 1000 curves, using

import matplotlib.pyplot plt plt(a) 

the figure fine there thousand lines of:

<matplotlib.lines.line2d @ 0xxxxxxxxx> 

can disable output?

this output plt function returning (i presume here meant write plt.plot(a)). suppress output assign return object name:

_ = plt.plot(a) 

_ used indicate temporary object not going used later on. note output seeing appear in interpreter, , not when run script outside interpreter.


Comments