thomasp85 / ggforce

Accelerating ggplot2
https://ggforce.data-imaginist.com
Other
916 stars 105 forks source link

geom_mark_ellipse data co-ordinates #309

Open nfancy opened 10 months ago

nfancy commented 10 months ago

Hi,

Thanks for this amazing package and specially this geom_mark_ellipse function. However, I am struggling to add multiple labelling due to the parameters clashing. For example, I want to label the ellipse with some text but also wants to label the individual points using geom_text. Since both geom_text and geom_mark_ellipse use label parameter, I get an error.

Any pointer how can I do this?

Thanks in advance.

Nurun

nfancy commented 10 months ago

Hi, I've kind of managed to do what I wanted using the description parameter. See below:

image

Just needs a bit of tidy up. A few queries: -How can I increase the width of the annotation box, increasing the label.width does not work. -How can I hide the label connector lines where I don't want the labelling but I still want the hulls, so the filter in your example does not suit.

Thanks again.

Nurun

thomasp85 commented 7 months ago

Can you provide a reprex (a minimal example code that I can run) which shows how the label.width is not working as expected?

For the connector I have now made it so that if both label and description is set to NA (or not set at all) the label and connector will not be drawn