working with nan values in matplotlib,plt.show()