Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a vectorized Text Element #1837

Closed
jordansamuels opened this issue Aug 31, 2017 · 2 comments
Closed

Add a vectorized Text Element #1837

jordansamuels opened this issue Aug 31, 2017 · 2 comments
Assignees
Labels
type: feature A major new feature
Milestone

Comments

@jordansamuels
Copy link
Contributor

The following example works well for n=10, but e.g. n=100 the re-rendering on zoom stops working (on MacBook Pro at least).

%%opts RGB [width=800, height=800]
n=100
clusters = np.random.uniform(low=(0,0,0),high=(1,1,.005),size=(n,3))
scatter = hv.Scatter(np.concatenate([scale *  np.random.randn(1000, 2) + (x,y) for x,y,scale in clusters]))
boxes = hv.Path([hv.Box(x,y,scale*6).data[0] for x,y,scale in clusters])
texts = hv.NdOverlay({i: hv.Text(x, y, text=f'{np.round(scale*100, 1)}') for i, (x, y, scale) in enumerate(clusters)}, kdims=['i'])
datashade(scatter) * datashade(boxes) * texts

If we take out the * texts then high e.g. n=1000 zoom works fine.

@philippjfr philippjfr changed the title Performance upgrade for Text Add a vectorized Text Element Sep 15, 2017
@philippjfr
Copy link
Member

We discussed this yesterday and we'd like to either make the Text Element vectorized or add a new vectorized Text Element. I've already written an implementation, which you can view here:

https://anaconda.org/philippjfr/multitext/notebook

So we only have to decide what to call it or whether to replace the existing Text Element.

@philippjfr philippjfr added the type: feature A major new feature label Sep 15, 2017
@philippjfr philippjfr added this to the v1.9 milestone Sep 23, 2017
@philippjfr philippjfr self-assigned this Oct 7, 2017
@philippjfr philippjfr modified the milestones: v1.9, v1.10 Nov 3, 2017
@philippjfr philippjfr mentioned this issue Feb 18, 2018
6 tasks
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature A major new feature
Projects
None yet
Development

No branches or pull requests

2 participants