Message Boards Message Boards

0
|
3016 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Change the direction of a CirculeEmbedding Graph

Posted 4 years ago

I want to create a graph with the stages shown in clockwise order.

I created the following list

stages = {"Explore the Challenge" \[DirectedEdge] "Identify Themes", 
   "Identify Themes" \[DirectedEdge] "Sketch Research Questions", 
   "Sketch Research Questions" \[DirectedEdge] "Create Initial Teams",
    "Create Initial Teams" \[DirectedEdge] "Sketch Proposals", 
   "Sketch Proposals" \[DirectedEdge] "Share Sketch Proposals",
    "Share Sketch Proposals" \[DirectedEdge] "Community Feedback",
   "Community Feedback" \[DirectedEdge] "Revise Proposals", 
   "Revise Proposals" \[DirectedEdge] "Share 'Final' Proposal", 
   "Share 'Final' Proposal" \[DirectedEdge] "Revise and Submit", 
   "Revise and Submit" \[DirectedEdge] "Explore the Challenge"};

And rendered it use:

Graph[stages, VertexShapeFunction -> "Circle", 
 VertexLabels -> Automatic, GraphLayout -> "CircularEmbedding"]

Unfortunately, the elements are shown in anti-clockwise direction.

If I change the list as follows:

unDirectedStages = stages /. DirectedEdge -> UndirectedEdge

And render using:

Dynamic[Graph[unDirectedStages, VertexShapeFunction -> "Circle", 
  VertexLabels -> Automatic, VertexSize -> Medium]]

The stages are shown in clockwise order, but without the arrows.

I would like to keep the directional information, but mirror the output. What am I missing?

Cheers, Andy

POSTED BY: Andrew Burnett
3 Replies
Posted 4 years ago

Wonderful! Thank you very much, as always.

POSTED BY: Andrew Burnett
Posted 4 years ago

Hi Andrew,

Here is one way to do it.

Graph[stages,
 VertexShapeFunction -> "Circle",
 VertexLabels -> Automatic,
 GraphLayout -> "CircularEmbedding",
 VertexCoordinates ->  RotateRight[Reverse@CirclePoints[{1, Pi/2}, 10], 1]]

enter image description here

POSTED BY: Rohit Namjoshi
Posted 4 years ago

I just noticed that your diagram is much better laid out that the default one that I generate (see below). I assume that you must have added some extra Style settings to get your layout. Can you share what settings you used?

enter image description here

POSTED BY: Andrew Burnett
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract