ggplot2 polar plot axis label location

独自空忆成欢 提交于 2019-12-04 02:27:20

You have not provided code to reproduce the problem so this will be just a guess.

I've used whitespace, \n in particular, to move text "away" in the past. Perhaps a custom formatter might work here. Here is how you can write a custom tick mark label formatter.

If this fails, you can always hide the axis labels and paint them yourself using geom_text by adding another layer.

Hope this helps. @hadley's book on ggplot2 is very good, by the way.

MSJ

I came across this question while I was trying to fix a similar issue myself. One workaround is pretty much covered in the answer to this post: Remove extra space and ring at the edge of a polar plot

You would have to adjust the limits of the x scale to match your axis labels. You would also have to create a new scale bar corresponding to the radial length of your arrows (the 0-300 scale bar on the left side of your plot), since

axis.text = element_blank

takes the scale bar away as well.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!