def test_vector_data_lid_iteration(): lc = LineCollection([(0, 1 + 1j)]) vd = VectorData() vd.add(lc, 1) for lc in vd.layers_from_ids([1, 2, 3, 4]): lc.append([3, 3 + 3j]) assert vd.count() == 1 assert len(vd.layers[1]) == 2
def test_line_collection_append(line): lc = LineCollection() lc.append(line) assert len(lc) == 1 assert np.all(lc[0] == np.array([4 + 3j, 5, 10 + 10j, 5j]))