Skip to content

connect points by straight lines #130

@abast

Description

@abast

The example in the docs connects lines by curved lines:

data = '''0	0.13	0.27	A	2
1	0.87	0.93	A	1
2	0.10	0.25	B	2
3	0.03	0.90	A	3
4	0.19	0.78	B	1'''
data = [d.split('	') for d in data.split('\n')]
df = pd.DataFrame(data).set_index(0)
df.columns = ['x','y','group','order']
df['x'] = df.x.astype(float)
df['y'] = df.y.astype(float)
df['order'] = df.order.astype(float)

scatter = Scatter(data = df, x = 'x', y = 'y', width = 320, height = 320)
scatter.connect(by='group')

scatter.show()
image

Would it be possible to connect points with straight lines instead? How exactly are the lines computed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions