text position and repel on map
See original GitHub issueHi,
Thanks for developing Altair! Finally a great tool for visualization using the grammar of graphics in python! I am really having a lot of fun with it!
I am visualizing a map using mark_geoshape
. I am adding points to the map using mark_point
, and corresponding labeling text using mark_text
. I have two issues:
- The text is not always close to the corresponding point. I use
x = "longitude:Q", y = "latitude:Q"
both inmark_point
andmark_text
. As an example, see the distance between the green dot and the green text in the figure attached; - Texts often overlap - see the pink and brown texts in the figure attached. Is there any function similar to ggrepel in ggplot?
Thank you very much again for such a great tool! Serena
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:18 (7 by maintainers)
Top Results From Across the Web
Examples - ggrepel - Kamil Slowikowski
Text labels repel away from each other, away from data points, and away from edges of the plotting area (panel).
Read more >geom_text_repel: Repulsive textual annotations. - Rdrr.io
The text labels repel away from each other and away from the data points. Usage. geom_label_repel( mapping = NULL, data = NULL, stat...
Read more >Scatterplot with labels and text repel in Matplotlib
A custom scatterplot with auto-positioned labels to explore the palmerpenguins dataset made with Python and Matplotlib . This blogpost guides you through a ......
Read more >Avoid overlapping text labels with rworldmap - Stack Overflow
Find a package that works with base graphics, like basicPlotteR. · Switch to plotting with ggplot2::ggplot and use ggrepel::geom_text_repel or ...
Read more >Repel overlapping text labels in ggplot2 - R-bloggers
Enter the ggrepel package, a new extension of ggplot2 that repels text labels away from one another. Just sub in geom_text_repel() in place...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It has been implemented and we are in the process of releasing the feature in Vega. The code is already in master at https://github.com/vega/vega/tree/master/packages/vega-label. Once we have support in Vega, we can support it in Vega-Lite as well. I can’t promise a release date yet but it’s coming. Thanks for your patience. It’s a big feature to add with a lot of moving parts.
Yes and yes. We are working on getting it into Vega and then Vega-Lite. I can’t promise a release date yet, though.