Thanks to visit codestin.com
Credit goes to github.com

Skip to content

question: having an absolute location custom layout.  #375

@OmarAshkar

Description

@OmarAshkar

Hello,

I am trying to have a specific absolute location layout. Is it possible?

For example I have this code that will create at tree with top-down

graph <- as_tbl_graph(
data.frame( from = c("1", "1", "1", "50", "5"),  
            to = c("200", "100", "50", "5", "2")) 
)
graph

layout <- create_layout(graph, layout = "tree" )
ggraph(graph, layout) + 
  geom_edge_bend() + 
  geom_node_point() + 
  geom_node_label(aes(label = as.data.frame(graph)$name))

What I am looking for is

  1. right to left orientation instead of top-down.
  2. All "to" nodes must be aligned on top of each other
  3. As you noticed, the branching sometimes happens from the same node, so may be different edges can be specified like arc if this happened.

I really appreciate some guidance on this.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions