Closed lvaudor closed 1 year ago
You can solve this by turning off clipping in the coordinate system (coord_cartesian(clip = "off")
) and setting a wider margin on the plot (theme(plot.margin=margin(1, 1, 1, 1, "cm"))
)
I'm unsure about what you did to elicit the warning above so I can't comment on that, but expanding the range of the scales should also work
Yes!! Thanks a lot for your (very quick) help, it did the trick!
Hi,
I'm trying to use ggraph to display some moderately complex graphs for which it is crucial that I can display nodes' labels. I cannot figure out a way to have the labels not cut off on the sides. Here is an example:
I don't wish to use repel=TRUE because I would like central labels not to be moved from their initial positions. So I've just been looking for a solution of the kind ggplot2::xlim() or ggplot2::scale_x_continuous(), setting limits manually (I generate the layout, then get x coordinates, then expand their range by a factor) but I'm not getting anywhere with that, as I get the following error message:
Vectorized input to
element_text()
is not officially supported. ℹ Results may be unexpected or may change in future versions of ggplot2.What am I missing here?
Thanks in advance, Lise