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

  • Home
  • SEARCH
  • 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 4171066
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T00:24:19+00:00 2026-05-21T00:24:19+00:00

I just spent a couple of hours trying to convert some old code that

  • 0

I just spent a couple of hours trying to convert some old code that uses Mathematica 7’s GraphPlot to use the new Mathematica 8 Graph functions. It seemed sensible since the new graph drawing is much nicer and it has things like AdjacencyMatrix and KirchhoffMatrix built in.

The problem is that I can not figure out how to get graphs with multiple edges to work in Mma 8.

The Feynman graph that I use as my canonical example is the two-loop vacuum graph

GraphPlot[{1 -> 2, 1 -> 2, 1 -> 2}, MultiedgeStyle -> .5, 
          DirectedEdges -> True, VertexCoordinateRules -> {{-1, 0}, {1, 0}}]

two-loop vacuum sunset graph

Trying to make the similar graph in Mma 8

Graph[{DirectedEdge[1, 2], DirectedEdge[1, 2], DirectedEdge[1, 2]}, 
      VertexCoordinates -> {{-1, 0}, {1, 0}}]

yields the error message

Graph::supp: Mixed graphs and multigraphs are not supported. >>

How can I construct (and work with) a similar graph using Mathematica 8’s Graph[] objects?

Edit: This problem still exists in Mathematica 9

  • 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-21T00:24:20+00:00Added an answer on May 21, 2026 at 12:24 am

    I went through a similar process of trying to use Graph for everything, and found that it it does not replace Combinatorica and GraphPlot. The best use for Graph is to use it as a container type to store vertices + edges + coordinates.

    For example, most of the functions from “Algorithmic Graph Theory” of Combinatorica tutorial are not available for new Graph objects. When I talked with a WRI developer on Graph project, my understanding was providing all of Combinatorica functions for Graph is not a priority because the design goal is to provide methods that solve tasks in algorithmic agnostic way. For instance, you may have method to find vertex cover and graph coloring for new Graph object, but for algorithmic specific tasks like Brelaz coloring and Greedy Vertex Cover, you may always have to defer to Combinatorica.

    In addition to multi-graphs, some graph layouts are not available for Graph objects. You can not fix some vertex coordinates and let automatic layout do the rest. Also, layout of LayeredGraphPlot is not available and is sometimes preferred over Graph‘s LayeredDrawing.

    The way to get the best of 3 worlds is to use Graph objects as main vehicle for graph storage and make wrappers for GraphPlot, Combinatorica and GraphUtilities functions that accept Graph objects

    Some use cases:

    • You need some algorithm from Combinatorica or GraphUtilities — make a wrapper someAlgorithm that takes Graph object, converts it to list of edges or Combinatorica graph (GraphUtilities'ToCombinatoricaGraph is helpful), runs the algorithm, converts it back to Graph object, taking care to set correct GraphStyle and VertexCoordinates from the original graph object. Because of conflicts, make sure Combinatorica and GraphUtilities are not on context path, I do it using $Pre

    • You need some custom graph plot like here, or the multi-edge graph — make a wrapper function someGraphPlot that accepts Graph object, converts it to correct representation, then uses GraphPlot or perhaps creates a temporary Graph object with custom vertex/edge shapes for the purpose of this one plot. Note that you can attach properties to edges using SetProperty so you can store your multigraphs in Graph that way.

    • You want to use one of GraphPlot layouts and store coordinates in Graph — use function like here to get vertex coordinates from GraphPlot layout, and store them in Graph object using VertexCoordinates

    Here’s a notebook demonstrating these use cases and a few others

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

Sidebar

Related Questions

I've spent a couple hours now trying to figure this out, but I just
I have just spent a couple of hours trying to represent the decision tree
I've spent a couple hours trying to find a good answer to this.. How
I spent a couple of hours yesterday trying to get LunarEclipse to work with
I've spent the last couple of hours slowly losing my mind while trying to
I'm newbie at ruby, I spent couple hours trying to find the way to
I've spent couple of hours now trying to work out where's the problem with
Just spent a couple of hours last night developing a pretty sweet video player
I've just spent a couple of hours debugging and looking through questions like POSTing
I just spent way too long trying to diagnose why, in the following snippet

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.