Ticket #5713: trac_5713.patch

File trac_5713.patch, 1.7 KB (added by rlm, 11 years ago)
  • sage/graphs/graph.py

    # HG changeset patch
    # User Robert L. Miller <rlm@rlmiller.org>
    # Date 1239312553 25200
    # Node ID e3038ff064ef028ce2114879a96bc29d4152d0fd
    # Parent  5c72dbb92d8284101858a5e6f2b476a56e597e14
    Fix trac #5713
    
    diff -r 5c72dbb92d82 -r e3038ff064ef sage/graphs/graph.py
    a b  
    63826382            ...     (0,1,'e'),(0,1,'f'),(0,1,'f'),(2,1,'g'),(2,2,'h')])
    63836383            sage: g.plot(edge_labels=True, color_by_label=True, edge_style='dashed')
    63846384
     6385        ::
     6386
    63856387            sage: S = SupersingularModule(389)
    63866388            sage: H = S.hecke_matrix(2)
    63876389            sage: D = DiGraph(H)
    63886390            sage: P = D.plot()
    63896391
     6392        ::
     6393       
     6394            sage: G=Graph({'a':['a','b','b','b','e'],'b':['c','d','e'],'c':['c','d','d','d'],'d':['e']})
     6395            sage: G.show(pos={'a':[0,1],'b':[1,1],'c':[2,0],'d':[1,0],'e':[0,0]})
     6396       
    63906397        """
    63916398        from sage.graphs.graph_plot import GraphPlot
    63926399        return GraphPlot(graph=self, options=options).plot()
  • sage/graphs/graph_plot.py

    diff -r 5c72dbb92d82 -r e3038ff064ef sage/graphs/graph_plot.py
    a b  
    456456                    else:
    457457                        odd_x = lambda d : M[0]
    458458                        even_x = odd_x
    459                         odd_y = M[1] + d
    460                         even_y = M[1] - d
     459                        odd_y = lambda d : M[1] + d
     460                        even_y = lambda d : M[1] - d
    461461                   
    462462                    # We now have the control points for each bezier curve
    463463                    # in terms of distance parameter d.