Skip to content

geom_text_contour did not show labels as expected #183

@wbvguo

Description

@wbvguo

Dear metR developer,

Thanks for maintaining this tool. I was trying to use geom_text_contour but found a small issue. Specifically, when I use

+ geom_text_contour(aes(z = sd, label = after_stat(level)),  color = "black", breaks = seq(0, 0.16, 0.01)) 

I got the following figure, where there are 2 labels on the top contour and they are overlapped
image

I want each contour level to have one single label, so I added the label.placer = label_placer_n(n=1) arguments, and get the following figure

+ geom_text_contour(aes(z = sd, label = after_stat(level)), label.placer =  label_placer_n(n=1), color = "black", breaks = seq(0, 0.16, 0.01))

image

Somehow it strangely still shows 2 labels on the top contour and changed the position of another label. May I ask if you have any insights about this issue or any suggestions to fix it?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions