Re: grid plot
- To: mathgroup at smc.vnet.net
- Subject: [mg5817] Re: [mg5777] grid plot
- From: Robert Pratt <rpratt at math.unc.edu>
- Date: Wed, 22 Jan 1997 00:44:18 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Perhaps the following commands, using GridGraph in the standard package
DiscreteMath`Combinatorica`, will give you what you want:
In[1]:= Needs["DiscreteMath`Combinatorica`"]
In[2]:= G=GridGraph[13,3];
In[3]:= Do[G=DeleteVertex[G,7],{7}]
In[4]:= Do[G=DeleteVertex[G,14],{6}]
In[5]:= labels={u,v,w,x,y,z,n,o,p,q,r,s,t,a,b,c,d,e,f,g,h,i,j,k,l,m};
In[6]:= ShowLabeledGraph[G,labels]
Rob Pratt
Department of Mathematics
The University of North Carolina at Chapel Hill
CB# 3250, 331 Phillips Hall
Chapel Hill, NC 27599-3250
rpratt at math.unc.edu
On Sat, 18 Jan 1997, Hai Q. Nguyen wrote:
>
> Hello,
>
> I wonder if it's possible to connect the following pattern
> of points(defined by their x,y,z coordinates) with
> straight lines :
>
> a b c d e....m
>
> n o p q r....t
>
> u v w x y....z
>
> Point "o" for example will have 4 straight lines connecting
> it to neighboring points n,b,p, and v. Boundary points
> like point "a" will have 2 lines connecting to "b" and "n".
>
> Does anybody know how to di this inside Mathematica?
> Thanks in advance .
>
> Hai Nguyen
>
>