question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

text position and repel on map

See original GitHub issue

Hi,

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:

  1. The text is not always close to the corresponding point. I use x = "longitude:Q", y = "latitude:Q" both in mark_point and mark_text. As an example, see the distance between the green dot and the green text in the figure attached;
  2. 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

example

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

11reactions
domoritzcommented, Apr 22, 2020

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.

3reactions
domoritzcommented, Oct 15, 2019

Yes and yes. We are working on getting it into Vega and then Vega-Lite. I can’t promise a release date yet, though.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found