我有一个numpy数组,我试图使用matplotlib用散点图绘制它。
var sum_pairs=function(ints, s, und){
var h = {}
for(var i=ints.length - 1; i >= 0; --i){
h[ints[i]] = i
}
for(var i=0; i < ints.length; ++i){
var ci = ints[i]
var e = h[s - ci]
if(e < i){
return [s - ci, ci]
}
}
return und
}
这给了我类似的东西:
现在我想用与numpy数组中行的索引相对应的数字替换红点。我怎么能这样做?
谢谢!