Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6797651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:38:05+00:00 2026-05-26T18:38:05+00:00

Is it possible and practical for Mathematica to draw something like this (being created

  • 0

Is it possible and practical for Mathematica to draw something like this (being created by Graphviz):

enter image description here

This is the best that I can get (but the shape and style are not satisfying):

enter image description here

Code:

GraphPlot[{{A -> C, "go"}, {C -> B, "gone"}, {C -> D, 
   "went"}, {C -> C, "loop"}}, VertexLabeling -> True, 
 DirectedEdges -> True]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:38:06+00:00Added an answer on May 26, 2026 at 6:38 pm

    You can do something like this using VertexRenderingFunction.

    GraphPlot[{{A -> C, "go"}, {C -> B, "gone"}, {C -> D, "went"}, {C -> C, "loop"}}, 
     DirectedEdges -> True, 
     VertexRenderingFunction -> ({{White, Disk[#, 0.15]}, 
         AbsoluteThickness[2], Circle[#, 0.15], 
         If[MatchQ[#2, A | B], Circle[#, 0.12], {}], Text[#2, #]} &)]
    

    enter image description here


    Method Updated February 2015

    To preserve the ability to interactively rearrange the graph with the drawing tools (double click) one must keep the vertex graphics inside of GraphicsComplex, with indexes rather than coordinates. I believe one could do this from VertexRenderingFunction using an incrementing variable but it seems easier an possibly more robust to do it with post-processing. This works in versions 7 and 10 of Mathematica, presumably 8 and 9 as well:

    GraphPlot[
      {{A -> C, "go"}, {C -> B, "gone"}, {C -> D, "went"}, {C -> C, "loop"}},
      DirectedEdges -> True
    ] /.
     Tooltip[Point[n_Integer], label_] :>
       {{White, Disk[n, 0.15]},
        Black, AbsoluteThickness[2], Circle[n, 0.15], 
        If[MatchQ[label, A | B], Circle[n, 0.12], {}], Text[label, n]}
    

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Best practices in error reporting (Mathematica) Assume that I have a function
Possible Duplicate: C# member variable initialization; best practice? Is there any benefit to this:
This is a practical question, i wonder if its possible to put a mark
Is it possible/practical/beneficial to cache UIViewControllers at the startup of an app so that
Not sure if this is possible, but I wanted to check it out. I
Possible Duplicate: What is System.Void? I have no practical reason for knowing this answer,
I know its probably possible, but is it practical and doable to try and
I know its probably possible, but is it practical and doable to try and
I don't know if it's possible or practical yet, but if it is: How
Possible Duplicate: Javascript closure inside loops - simple practical example How can I make

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.