Ellipse layout OPTION for plot.
@keaven is already working on this.
Since Jun 20, 2026.
Assessment
This issue has not been assessed yet.
Description
Feature Idea
Add layout = "ellipse" option to plot.initial_graph()
Background
graphicalMCP::plot.initial_graph() currently plots through igraph::plot.igraph() and supports custom igraph layouts, explicit coordinate matrices, and the package-specific layout = "grid" option. plot.updated_graph() already delegates to plot.initial_graph(), so a new layout option should carry over naturally to updated graphs.
gMCPLite::hGraph() has a useful elliptical arrangement for multiplicity graphs. I would like similar layout functionality in graphicalMCP, while keeping the existing igraph plotting backend rather than introducing a separate ggplot2 plotting path.
Proposal
Add an igraph-based elliptical layout option:
plot(g, layout = "ellipse")
This should compute a coordinate matrix internally and then continue plotting through the existing igraph::plot.igraph() call.
Recommended API
Suggested new arguments to plot.initial_graph():
plot(
g,
layout = "ellipse",
xradius = 2,
yradius = xradius,
radian_start = NULL,
clockwise = TRUE,
ellipse_vertex_width = NULL,
ellipse_vertex_height = NULL,
ellipse_arrow_curvature = NULL
)
Naming can be adjusted to match package style.
Desired behavior
layout = "ellipse" places hypotheses around an ellipse, similar to gMCPLite::hGraph().
xradius and yradius control the width and height of the layout ellipse.
radian_start controls where the first hypothesis is placed. If NULL, use a default similar to gMCPLite::hGraph().
clockwise = TRUE should match the hGraph() convention.
Add support for elliptical vertex sizing, analogous to hGraph()’s halfWid and halfHgt, while still using igraph.If possible, map these to igraph vertex width/height behavior.
If a custom igraph vertex shape is needed for true ellipses, keep it internal and documented.
Carry over the useful arrow spacing/arrangement idea from hGraph(), especially avoiding arrows starting or ending at node centers.
Add a curvature option for connecting arrows in the elliptical layout.Default should preserve the current plot behavior: paired two-way edges use the existing default curvature and other edges are straight.
Users should be able to override this for the ellipse layout without losing the current named edge_curves behavior.
Implementation notes
The preferred implementation is to extend plot.initial_graph() rather than create a separate function. This is a layout addition, and layout is already part of the plotting API.
A separate ggplot2 function should not be added for this issue. The goal is not to reproduce the full gMCPLite::hGraph() rendering engine, but to bring its useful elliptical layout controls into the existing igraph plotting workflow.
Acceptance criteria
plot(g, layout = "ellipse") works for initial_graph.
plot(graph_update(g, ...), layout = "ellipse") works for updated_graph.
Existing layout = "grid", coordinate matrix layouts, and igraph layouts remain unchanged.
Users can control layout ellipse dimensions.
Users can control hypothesis ellipse/vertex dimensions where feasible in igraph.
Arrow curvature defaults match current behavior, with an option to customize curvature for elliptical layouts.
Documentation and tests cover the new layout option.
### Relevant Input
_No response_
### Relevant Output
_No response_
### Reproducible Example/Pseudo Code
_No response_
- Dominant language
- R
- Stars
- 23
- Forks
- 1
- Avg merge
- 1h 42m
- Merged PRs (30d)
- 3
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openpharma/graphicalMCP
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
openpharma/graphicalMCP#114 ·
-
Add a function to customize deletion order for shortcut testingMay be free again @EeethB claimed this 1177 days ago, and no pull request is open. Openenhancement
openpharma/graphicalMCP#58 · 1 assignee ·
-
`plot.initial_graph` breaks when `pairs` curvature is implicit and a paired edge curve is adjustedOpen
Difficulty 3/5 1-2 days Newbie friendliness 48/100
openpharma/graphicalMCP#57 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
openpharma/graphicalMCP#56 ·
-
Power success printing should be a dataframeMay be free again @EeethB claimed this 1194 days ago, and no pull request is open. Openenhancement
openpharma/graphicalMCP#54 · 1 assignee ·
All issues in openpharma/graphicalMCP
Similar issues
-
bug key bindings source editor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
REQ - Positron IDE guidancePossibly taken @johannajokio claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
get_procs() @return docs don't match returned columns, and pid column is the row indexPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
posit-dev/connectapi#532 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Huber-group-EMBL/Rarr#302 ·
Maintainers usually reply within 1 day