-
Notifications
You must be signed in to change notification settings - Fork 239
Open
Labels
Description
Discussed in #898
Originally posted by aborruso December 7, 2024
Hi,
I would like to add a thin white border to text labels
(
ggplot(geo_df)
+ geom_map(aes(fill="costo_per_km2"), color="black", size=0.1)
+ scale_fill_cmap(cmap_name="YlOrRd")
+ geom_text(
aes("center_lon", "center_lat", label="DEN_REGIONE"), size=8,color="black"
)
+ labs(fill="Costo €/km²")
+ theme(
panel_background=element_rect(fill="white"),
panel_grid=element_blank(),
axis_text=element_blank(),
axis_ticks=element_blank(),
axis_title=element_blank(),
)
)
If I simply clone the text layers, and change the dimensions, then they turn out centered differently
+ geom_text(
aes("center_lon", "center_lat", label="DEN_REGIONE"), size=8,color="white"
)
+ geom_text(
aes("center_lon", "center_lat", label="DEN_REGIONE"), size=6,color="black"
)
Thank you
Create an example in the documentation