Working with NaN values in matplotlib,plt.show()