arrayToPath: revert to old meaning of connect=ndarray parameter (#1461)

The i-th position of that array used to define if points (i) and (i+1)
were connected, but in master it defines whether points (i-1) and (i) are connected.
This commit reverts to (i) and (i+1) interpretation.
This commit is contained in:
Marko Toplak 2020-11-27 16:57:26 +01:00 committed by GitHub
parent 433b061e81
commit 00fd63e859
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1529,7 +1529,7 @@ def arrayToQPath(x, y, connect='all'):
isfinite = np.isfinite(x) & np.isfinite(y)
arr[2:]['c'] = isfinite
elif isinstance(connect, np.ndarray):
arr[1:-1]['c'] = connect
arr[2:-1]['c'] = connect[:-1]
else:
raise Exception('connect argument must be "all", "pairs", "finite", or array')