Message Boards Message Boards

Vertex numbers from GraphPlot replaced with characters from a list?

Posted 3 years ago

There is a very simple example in the attached notebook. I would like to replace 1,2,3,4 with w,x,y,z. This is for a large matrix where manual entry of characters would be difficult.

Attachments:
POSTED BY: Douglas Youvan
5 Replies
Posted 3 years ago

Douglas,

I don't see anything in the V11 documentation for GraphPlot that suggests it would work with a non-square matrix as input. Can you please evaluate the following in test2.nb and re-attach.

SystemInformation["Small"]

?GraphPlot
POSTED BY: Rohit Namjoshi

Dan, See also my answer below. The 2 lines of code in test1.nb are running "as is". I'll start looking into an upgrade.

POSTED BY: Douglas Youvan

11.0.1.0 Rohit, thanks again. The S and C (or CC) matrices are producing nice graphs, so maybe this is peculiar to version 11. See the bottom two plots on structureofthegeneticcode.com. Numbers 1 - 64 need to be replaced with A,C, D ... X,Y.

Code is now attached.

Attachments:
POSTED BY: Douglas Youvan
Posted 3 years ago

What version of Mathematica are you using? Code in the notebook does not work on 12.1.1. VertexLabeling is not a valid option and GraphPlot expects an AdjacencyMatrix.

POSTED BY: Rohit Namjoshi

What exactly did you do to get that input and output? The input is not a Graph object, so GraphPlot should not accept it. When I try to run that code it gives an error message.

POSTED BY: Daniel Lichtblau
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