Code covered by the BSD License  

Highlights from
Matgraph

from Matgraph by Ed Scheinerman
Toolbox for working with simple, undirected graphs

Description of getxy
Home > matgraph > @graph > getxy.m

getxy

PURPOSE ^

getxy(g) --- give g's embedding (or [] if g doesn't have one)

SYNOPSIS ^

function z = getxy(g)

DESCRIPTION ^

 getxy(g) --- give g's embedding (or [] if g doesn't have one)

CROSS-REFERENCE INFORMATION ^

This function calls:
  • hasxy hasxy(g) --- determine if an embedding has been created for g
This function is called by:
  • bfstree bfstree(t,g,v) --- create a breadth-first spanning tree of g
  • cartesian cartesian(g,h1,h2) --- overwrite g with the product of h1 and h2
  • cdraw cdraw(g,coloring) -- draw g with a given vertex coloring
  • dfstree dfstree(t,g,v) --- create a depth-first spanning tree of g
  • disjoint_union disjoint_union(g,h,k) --- overwrite g with the disjoint union of the
  • distxy distxy(g) -- give g a distance based embedding
  • draw draw(g) --- draw g in a figure window
  • draw_labels draw_labels(g) --- add labels to a drawing of g
  • graffle graffle(g, filename, width, rad) --- write graph in OmniGraffle format
  • induce induce --- create induced subgraphs
  • join join(g,h1,h2) --- overwrite g with the join of h1 and h2
  • line_graph line_graph(g,h) --- set g to be the line graph of h
  • ndraw ndraw(g) --- draw g in a figure window with numbered vertices
  • renumber renumber the vertices of a graph
  • save save(g,filename) --- save a graph to disk
  • scale scale(g,s) --- rescale the embedding of g by s
  • sgf sgf --- simple graph format: a 2-column matrix representation
  • springxy springxy(g) --- find a spring embedding of g

SOURCE CODE ^

0001 function z = getxy(g)
0002 % getxy(g) --- give g's embedding (or [] if g doesn't have one)
0003 
0004 
0005 global GRAPH_MAGIC
0006 
0007 if (hasxy(g))
0008     z = GRAPH_MAGIC.graphs{g.idx}.xy;
0009 else
0010     z = [];
0011 end

Generated on Thu 13-Mar-2008 14:23:52 by m2html © 2003

Contact us at files@mathworks.com