Browse code

changes to vignette in light of layout removal

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/branches/RELEASE_2_10/madman/Rpacks/RBGL@66824 bc3139a8-67e5-0310-9ffc-ced21a209358

Vince Carey authored on 19/06/2012 12:44:32
Showing 1 changed files

... ...
@@ -788,31 +788,31 @@ plot(coex, "neato")
788 788
 z <- plot(coex, "neato")
789 789
 @
790 790
 
791
-The following functions are interfaces to those in BGL, they only calculate 
792
-the (x, y)-coordinates of the vertices in the graph.  The actual layout is 
793
-achieved with additional function, we provide an example on how to do so.
794
-
795
-Following functions are available:
796
-
797
-The \Rfunction{randomGraphLayout} function puts the vertices randomly 
798
-on a plane;
799
-
800
-The \Rfunction{circleLayout} function puts the vertices as vertices of 
801
-a regular polygon;
802
-
803
-The \Rfunction{kamadaKawaiSpringLayout} function is for connected, 
804
-undirected graphs, it treats the edges as springs and tries to minimize 
805
-the energy of the whole system;
806
-
807
-The \Rfunction{fruchtermanReingoldForceDirectedLayout} function is for 
808
-unweighted, undirected, possibly disconnected graphs, it treats the edges 
809
-as forces that pull vertices together, no-edges as forces that push 
810
-vertices apart, vertices move to a position as environment changes; 
811
-initial positions of the vertices are set randomly by calling 
812
-\Rfunction{randomGraphLayout}.  Notice that the choice of "width" and 
813
-"height" values has dramatic impact on the performance.
814
-
815
-<<Layoutdemo2>>=
791
+%The following functions are interfaces to those in BGL, they only calculate 
792
+%the (x, y)-coordinates of the vertices in the graph.  The actual layout is 
793
+%achieved with additional function, we provide an example on how to do so.
794
+%
795
+%Following functions are available:
796
+%
797
+%The \Rfunction{randomGraphLayout} function puts the vertices randomly 
798
+%on a plane;
799
+%
800
+%The \Rfunction{circleLayout} function puts the vertices as vertices of 
801
+%a regular polygon;
802
+%
803
+%The \Rfunction{kamadaKawaiSpringLayout} function is for connected, 
804
+%undirected graphs, it treats the edges as springs and tries to minimize 
805
+%the energy of the whole system;
806
+%
807
+%The \Rfunction{fruchtermanReingoldForceDirectedLayout} function is for 
808
+%unweighted, undirected, possibly disconnected graphs, it treats the edges 
809
+%as forces that pull vertices together, no-edges as forces that push 
810
+%vertices apart, vertices move to a position as environment changes; 
811
+%initial positions of the vertices are set randomly by calling 
812
+%\Rfunction{randomGraphLayout}.  Notice that the choice of "width" and 
813
+%"height" values has dramatic impact on the performance.
814
+
815
+<<Layoutdemo2,echo=FALSE,eval=FALSE>>=
816 816
 randomGraphLayout(coex)
817 817
 circleLayout(coex)
818 818
 kamadaKawaiSpringLayout(coex)
... ...
@@ -821,10 +821,10 @@ fruchtermanReingoldForceDirectedLayout(coex, 10, 10)
821 821
 
822 822
 Outputs are the (x, y)-coordinates of the vertices in the layout.
823 823
 
824
-If you want to draw the graphs based on the calculated coordinates, you need 
825
-an additional function.  The following is an example.
824
+%If you want to draw the graphs based on the calculated coordinates, you need 
825
+%an additional function.  The following is an example.
826 826
 
827
-<<Layoutdemo3>>=
827
+<<Layoutdemo3,echo=FALSE,eval=FALSE>>=
828 828
 crudeGraphPlot <- function(g, alg=circleLayout, ...) {
829 829
 #
830 830
 # the alg parameter is a function that computes the
... ...
@@ -848,33 +848,33 @@ crudeGraphPlot(coex)
848 848
 crudeGraphPlot(coex, alg=kamadaKawaiSpringLayout, col="green")
849 849
 @
850 850
 
851
-<<figlayout1, fig=TRUE, echo=false, results=hide, include=FALSE>>=
851
+<<figlayout1, fig=TRUE, echo=false, results=hide, include=FALSE,eval=FALSE>>=
852 852
 crudeGraphPlot(coex)
853 853
 @
854 854
 
855
-<<figlayout2, fig=TRUE, echo=false, results=hide, include=FALSE>>=
855
+<<figlayout2, fig=TRUE, echo=false, results=hide, include=FALSE,eval=FALSE>>=
856 856
 crudeGraphPlot(coex, alg=kamadaKawaiSpringLayout, col="green")
857 857
 @
858 858
 
859
-\begin{figure}[tp]
860
-\begin{center}
861
-\begin{tabular}{cc}
862
-\includegraphics[width=0.49\textwidth]{RBGL-figneato} &
863
-\includegraphics[width=0.49\textwidth]{RBGL-figlayout1} \\
864
-\includegraphics[width=0.49\textwidth]{RBGL-figlayout2} \\
865
-\end{tabular}
866
-\end{center}
867
-\caption{\label{fig:graphlayout}%
868
-a) plot(coex, neato).
869
-b) crudeGraphPlot(coex).
870
-c) crudeGraphPlot(coex, alg=kamadaKawaiSpringLayout, col="green"). }
871
-\end{figure}
872
-
873
-Call crudeGraphPlot(coex) gives the default circular layout on your graphics device.
874
-
875
-Call crudeGraphPlot(coex, alg=kamada.kawai.spring.layout, col="green") shows you the spring layout with green edges, see Figure~\ref{fig:graphlayout}.
876
-
877
-
859
+%\begin{figure}[tp]
860
+%\begin{center}
861
+%\begin{tabular}{cc}
862
+%\includegraphics[width=0.49\textwidth]{RBGL-figneato} &
863
+%\includegraphics[width=0.49\textwidth]{RBGL-figlayout1} \\
864
+%\includegraphics[width=0.49\textwidth]{RBGL-figlayout2} \\
865
+%\end{tabular}
866
+%\end{center}
867
+%\caption{\label{fig:graphlayout}%
868
+%a) plot(coex, neato).
869
+%b) crudeGraphPlot(coex).
870
+%c) crudeGraphPlot(coex, alg=kamadaKawaiSpringLayout, col="green"). }
871
+%\end{figure}
872
+%
873
+%Call crudeGraphPlot(coex) gives the default circular layout on your graphics device.
874
+%
875
+%Call crudeGraphPlot(coex, alg=kamada.kawai.spring.layout, col="green") shows you the spring layout with green edges, see Figure~\ref{fig:graphlayout}.
876
+%
877
+%
878 878
 \subsection{Isomorphism}
879 879
 
880 880
 The \Rfunction{isomorphism} function determines if two graphs are isomorphism,