Disable the output of matplotlib pyplot

This output is what the plt function is returning (I presume here you meant to write plt.plot(A)). To suppress this output assign the return object a name:

_ = plt.plot(A)

_ is often used to indicate a temporary object which is not going to be used later on. Note that this output you are seeing will only appear in the interpreter, and not when you run the script from outside the interpreter.


You can also suppress the output by use of ; at the end (assuming you are doing this in some sort of interactive environment)

 plot(A);  

plt.show()

This way there is no need to create unnecessary variables.

E.g.:

import matplotlib.pyplot as plt

plt.plot(A)
plt.show()

use a semi-colon after the plot command

eg: plt.imshow(image,cmap);

will display the graph and stop the verbose