Coverage for local/lib/python2.7/site-packages/sage/graphs/print_graphs.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
## ## print-graphs.sage ## ## Craig Citro ## 07_06_12 ## ## Copying old scheme print-graph methods over to Sage ##
#***************************************************************************** # Copyright (C) 2007 Craig Citro # # Distributed under the terms of the GNU General Public License (GPL) # http://www.gnu.org/licenses/ #*****************************************************************************
""" Give the header for a postscript file.
EXAMPLES::
sage: from sage.graphs.print_graphs import print_header_ps sage: print(print_header_ps('')) %% --- Auto-generated PostScript --- %% Generated on: %%...
"""
""" Give the header for an encapsulated postscript file.
EXAMPLES::
sage: from sage.graphs.print_graphs import print_header_eps sage: print(print_header_eps('',0,0,1,1)) %!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: 0 0 1 1
"""
""" Define edge and point drawing functions.
EXAMPLES::
sage: from sage.graphs.print_graphs import print_functions sage: print(print_functions('')) /point %% input: x y { moveto gsave currentpoint translate 0 0 2 0 360 arc fill grestore } def /edge %% input: x1 y1 x2 y2 { moveto lineto stroke } def
"""
""" Give postscript text for drawing a graph.
EXAMPLES::
sage: from sage.graphs.print_graphs import print_graph_ps sage: P = graphs.PetersenGraph() sage: print(print_graph_ps(P.vertices(), P.edges(), sage.graphs.generic_graph_pyx.spring_layout_fast(P))) %% --- Auto-generated PostScript --- %% Generated on: %%... /point %% input: x y { moveto gsave currentpoint translate 0 0 2 0 360 arc fill grestore } def /edge %% input: x1 y1 x2 y2 { moveto lineto stroke } def ... point ... ... point ... edge ... ... edge """
""" Give postscript text for drawing a graph.
EXAMPLES::
sage: from sage.graphs.print_graphs import print_graph_eps sage: P = graphs.PetersenGraph() sage: print(print_graph_eps(P.vertices(), P.edges(), sage.graphs.generic_graph_pyx.spring_layout_fast(P))) %!PS-Adobe-3.0 EPSF-3.0 %%BoundingBox: 0 0 100 100 /point %% input: x y { moveto gsave currentpoint translate 0 0 2 0 360 arc fill grestore } def /edge %% input: x1 y1 x2 y2 { moveto lineto stroke } def ... point ... ... point ... edge ... ... edge
"""
# n = len(vert_ls)
|