-
-
Notifications
You must be signed in to change notification settings - Fork 109
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 value labels of your data to hvplot by using parameter instead of hv.Labels() #375
Comments
I think this would be a really nice feature. Just as a note - I ran into this as well while working on a bar plot that is grouped: df = pd.DataFrame([
(' Spark', 'Row count', 17.6), # The space is to order Spark first
(' Spark', 'Feature engineering', 63),
(' Spark', 'Random forest', 166),
('RAPIDS', 'Row count', 20.8),
('RAPIDS', 'Feature engineering', 24.1),
('RAPIDS', 'Random forest', 1.75)
], columns=['tool', 'task', 'runtime_seconds'])
df.hvplot.bar(x='task', y='runtime_seconds', by='tool') I wasn't able to figure out the right |
If this is agreed to be a good idea, I'd be happy to open a PR :) |
Sounds good to me; I too have wanted this! |
Is there any solution to adding labels for each bar on your example, or maybe each bar with different colors? |
Agreed; that would be a good feature. Does .plot support this? If so we can copy its interface. |
We can input a parameter This trick/tip is from notebook |
If you want to add value labels to your data you have to overlay holoviews hv.Label() on your plot:
It would be nice if you could just use something like parameter
to do this automagically right away with hvplot:
See also: https://stackoverflow.com/questions/58900736/adding-value-labels-to-hvplot-bar
If possible the default offset should also be a bit smart:
The text was updated successfully, but these errors were encountered: