You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
geom_mark_ellipse renders incorrect ellipse orientation with 3-point groups #354
geom_mark_ellipse renders ellipses with a wrong orientation for certain 3-point group configurations. The ellipse appears to have the correct shape but is displaced/mirrored vertically, suggesting a sign error in the coordinate transformation rather than a failure of the Khachiyan algorithm itself.
A quick manual Khachiyan implementation (made with Claude) shows an ellipse that correctly encloses all points and is indeed a vertical mirror of the geom_mark_ellipse ellipse.
Session info
R: 4.4.1 (2024-06-14 ucrt)
Platform: x86_64-w64-mingw32/x64
ggforce_0.5.0
ggplot2_4.0.1
Please test for proper functionality. My tests were not exhaustive and I am not fully familiar with ellipse functions.
Could not upload the R extension file so I used a txt extension. You will find it here: mark_ellipse.txt
If you want to test you can
-> clone the https://github.com/thomasp85/ggforce repository in your computer
-> replace the mark_ellipse.R with the linked mark_ellipse.txt
-> change extension from txt to R
-> install the local repo in R with
Please test for proper functionality. My tests were not exhaustive and I am not fully familiar with ellipse functions.
Could not upload the R extension file so I used a txt extension. You will find it here: mark_ellipse.txt
If you want to test you can -> clone the https://github.com/thomasp85/ggforce repository in your computer -> replace the mark_ellipse.R with the linked mark_ellipse.txt -> change extension from txt to R -> install the local repo in R with
Activity
SotiriosVasileiadis commentedon Feb 12, 2026
not sure if it helps... cursor built a functional (at least for my so far run plots) version of the "mark_ellipse.R" script found in the https://github.com/thomasp85/ggforce/tree/main/R.
Please test for proper functionality. My tests were not exhaustive and I am not fully familiar with ellipse functions.
Could not upload the R extension file so I used a txt extension. You will find it here:
mark_ellipse.txt
If you want to test you can
-> clone the https://github.com/thomasp85/ggforce repository in your computer
-> replace the mark_ellipse.R with the linked mark_ellipse.txt
-> change extension from txt to R
-> install the local repo in R with
-> test with the following set kindly provided by https://github.com/julianzaugg at #214
leoduox commentedon Feb 25, 2026
I also encountered the same problem.

gruensch commentedon Feb 25, 2026
So far, this fix works (just ran it over a couple of cases where geom_mark_ellipse failed to set the correct angle before).
thank you!
maartenciers commentedon Jul 8, 2026
Any update on this?