# HG changeset patch
# User Robert L. Miller
# Date 1251311834 25200
# Node ID ce7462042ef74e5bb71da02052e7f4d6c884fc1f
# Parent beaee80c307efdd7d4e87caf5d6918650c8a2508
Editing for 5911
diff r beaee80c307e r ce7462042ef7 sage/graphs/graph.py
 a/sage/graphs/graph.py Mon Aug 17 17:07:32 2009 +0200
+++ b/sage/graphs/graph.py Wed Aug 26 11:37:14 2009 0700
@@ 8791,31 +8791,29 @@
Undirected graph.
A Graph is a set of vertices connected by edges
 (cf. http://en.wikipedia.org/wiki/Graph_(mathematics) )

 One can very easily create a graph in sage by typing ::
+ (cf. http://en.wikipedia.org/wiki/Graph_(mathematics) ).
+
+ One can very easily create a graph in sage by typing::
sage: g=Graph()
 By typing the name of the Graph, one can get some basic informations
+ By typing the name of the Graph, one can get some basic information
about it::
sage: g
Graph on 0 vertices
 This graph is not very interesting as it is by default the empty graph.. But
+ This graph is not very interesting as it is by default the empty graph. But
Sage contains a large collection of predefined graph classes that can be listed
 this way :

 * type in Sage : graphs.
+ this way:
+
+ * Type in Sage : graphs.
( do not press "Enter", and do not forget the final "." )
 * hit "tabulation" two times in a row

 You will see the list of methods defined in the class "graphs", all of which
 generate graphs you can play with !

 If you want to see what they look like, begin this way ::

+ * Hit "tab".
+
+ You will see a list of methods which will construct named graphs. For
+ example::
+
sage: g=graphs.PetersenGraph()
sage: g.plot()
@@ 8824,8 +8822,8 @@
sage: g=graphs.ChvatalGraph()
sage: g.plot()
 If you are curious about what these graphs are, for example if you wonder what ``RandomGNP``
 actually is, you but have to type::
+ In order to obtain more information about these graph constructors, access
+ the documentation as follows::
sage: graphs.RandomGNP?
@@ 8833,20 +8831,18 @@
almost 200 functions on graphs in the Sage library !
If your graph is named ``g``, you can list these functions as previously this way
 * type in Sage : ``g.``
+ * Type in Sage : ``g.``
( do not press "Enter", and do not forget the final "." )
 * hit "tabulation" two times in a row
+ * Hit "tab".
As usual, you can get some information about what these functions do by typing
 ( if you want to know about the ``diameter()`` method )::
+ (e.g. if you want to know about the ``diameter()`` method)::
sage: g.diameter?
 If you have defined a graph ``g`` having several connected components ( = which is not
 connected... Type ``g.is_connected()`` to know if your graph is connected ), you can
 print each one of its connected components with only two lines :

 ( if you do not have such a graph G, here is one for free : ``g=graphs.RandomGNP(30,.05)`` )::
+ If you have defined a graph ``g`` having several connected components ( i.e.
+ ``g.is_connected()`` returns False ), you can print each one of its
+ connected components with only two lines::
sage: for component in g.connected_components():
... g.subgraph(component).plot()