The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Applying data from a database link to a GraphPlot
Replies: 4   Last Post: Jun 16, 2013 5:13 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bob Hanlon

Posts: 906
Registered: 10/29/11
Re: Applying data from a database link to a GraphPlot
Posted: Jun 14, 2013 4:47 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

data = {{"PENELOPE", "GUINESS"}, {"NICK", "WAHLBERG"}, {"ED",

GraphPlot[Rule @@@ data, VertexLabeling -> All]

Bob Hanlon

On Thu, Jun 13, 2013 at 2:38 AM, Paul Pikowsky <> wrote:

> This is my first project and I am trying to import data from a MySQL query
> into a GraphPlot expression.
> A return from MySQL (Sakila is the example here)
> SQLExecute[conn, "SELECT first_name, last_name FROM actor LIMIT 10"]
> "GABLE"}}
> (This is not the intended data, just a sample of the output.)
> But GraphPlot uses inputs of the form,
> GraphPlot[{"d" -> "c", "e" -> "b", "e" -> "c", "e" -> "d", "f" -> "a",
> "f" -> "b", "f" -> "d", "f" -> "e", "g" -> "a", "g" -> "b",
> "g" -> "c", "g" -> "e"}, VertexLabeling -> True]
> Is there some way in place of converting the output of a data query to the
> input of a graphplot? I see that an adjacency matrix is an optional input,
> but I'd also want to use labels generated from the database.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.