Если есть nan
, они не отображаются.
Пример:
x = [1,2,3,4,5]
y = [1,np.nan,np.nan, 3, 4]
plt.scatter(x, y)
plt.xlabel('x')
plt.ylabel('y')
plt.show()

Наоборот сy = [1,0,0,3,4]
: 
Конечно, вы можете заменить nan
на 0
или другие значения.«Как» зависит от типа ваших данных.Для списка:
import math
y = [0 if math.isnan(e) else e for e in y]