[sage-support] Re: paths in graphs

2009-04-27 Thread William Stein

On Mon, Apr 27, 2009 at 12:06 PM, Jason Grout
 wrote:
>
> William Stein wrote:
>> On Mon, Apr 27, 2009 at 10:02 AM, Jason Grout
>>  wrote:
>>> William Stein wrote:
 On Mon, Apr 27, 2009 at 7:45 AM, Robert Miller  wrote:
> On Mon, Apr 27, 2009 at 6:47 AM, William Stein  wrote:
>> Hi Robert,
>>
>> Did you guys every write any code to plot *paths* in graphs?
> No, but you can color the edges of the path differently.
 That is pretty bad, IMHO.  E.g., try this:

 g = graphs.CompleteGraph(5)
 g.plot(edge_colors={'red':[(0,1)]})

 If you try to color any edges, then it *deletes* all other edges that
 aren't colored.

>>> Well, "deletes" is a pretty strong word.  More accurately, it doesn't
>>> show any edges for which you didn't specify a color.
>>>
>>> I've found this to be a slight annoyance when I wanted to create pretty
>>> edge-colored graphs, as I have to specifically color my "other" edges black.
>>>
>>
>> So do you also consider it a bug?  I don't want to report bugs about
>> graph theory until getting some graph theorists to agree, since I'm
>> not a graph theorist.
>
> I don't know that it is a "bug" (i.e., an unintended consequence or
> mistake), but it is an interface decision that I think is annoying and
> surprising.  For that reason, I'd be +1 on changing it.
>
> I think vertex_colors also has the same convention of hiding vertices
> that are not specified.

It's even worse.  It leaves in the vertex label but forgets to draw
the circle around it.  Ouch.

> You might also be interested in the "highlight" function from the bottom
> of #2378, which is a first step towards implementing functionality like
> the mathematica Highlight and AnimateGraph commands:
>
> http://reference.wolfram.com/mathematica/Combinatorica/ref/Highlight.html
>
> http://reference.wolfram.com/mathematica/Combinatorica/ref/AnimateGraph.html
>
> Jason
>
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: paths in graphs

2009-04-27 Thread Jason Grout

William Stein wrote:
> On Mon, Apr 27, 2009 at 10:02 AM, Jason Grout
>  wrote:
>> William Stein wrote:
>>> On Mon, Apr 27, 2009 at 7:45 AM, Robert Miller  wrote:
 On Mon, Apr 27, 2009 at 6:47 AM, William Stein  wrote:
> Hi Robert,
>
> Did you guys every write any code to plot *paths* in graphs?
 No, but you can color the edges of the path differently.
>>> That is pretty bad, IMHO.  E.g., try this:
>>>
>>> g = graphs.CompleteGraph(5)
>>> g.plot(edge_colors={'red':[(0,1)]})
>>>
>>> If you try to color any edges, then it *deletes* all other edges that
>>> aren't colored.
>>>
>> Well, "deletes" is a pretty strong word.  More accurately, it doesn't
>> show any edges for which you didn't specify a color.
>>
>> I've found this to be a slight annoyance when I wanted to create pretty
>> edge-colored graphs, as I have to specifically color my "other" edges black.
>>
> 
> So do you also consider it a bug?  I don't want to report bugs about
> graph theory until getting some graph theorists to agree, since I'm
> not a graph theorist.

I don't know that it is a "bug" (i.e., an unintended consequence or 
mistake), but it is an interface decision that I think is annoying and 
surprising.  For that reason, I'd be +1 on changing it.

I think vertex_colors also has the same convention of hiding vertices 
that are not specified.

You might also be interested in the "highlight" function from the bottom 
of #2378, which is a first step towards implementing functionality like 
the mathematica Highlight and AnimateGraph commands:

http://reference.wolfram.com/mathematica/Combinatorica/ref/Highlight.html

http://reference.wolfram.com/mathematica/Combinatorica/ref/AnimateGraph.html

Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: paths in graphs

2009-04-27 Thread William Stein

On Mon, Apr 27, 2009 at 10:02 AM, Jason Grout
 wrote:
>
> William Stein wrote:
>> On Mon, Apr 27, 2009 at 7:45 AM, Robert Miller  wrote:
>>> On Mon, Apr 27, 2009 at 6:47 AM, William Stein  wrote:
 Hi Robert,

 Did you guys every write any code to plot *paths* in graphs?
>>> No, but you can color the edges of the path differently.
>>
>> That is pretty bad, IMHO.  E.g., try this:
>>
>> g = graphs.CompleteGraph(5)
>> g.plot(edge_colors={'red':[(0,1)]})
>>
>> If you try to color any edges, then it *deletes* all other edges that
>> aren't colored.
>>
>
> Well, "deletes" is a pretty strong word.  More accurately, it doesn't
> show any edges for which you didn't specify a color.
>
> I've found this to be a slight annoyance when I wanted to create pretty
> edge-colored graphs, as I have to specifically color my "other" edges black.
>

So do you also consider it a bug?  I don't want to report bugs about
graph theory until getting some graph theorists to agree, since I'm
not a graph theorist.

William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: paths in graphs

2009-04-27 Thread Jason Grout

William Stein wrote:
> On Mon, Apr 27, 2009 at 7:45 AM, Robert Miller  wrote:
>> On Mon, Apr 27, 2009 at 6:47 AM, William Stein  wrote:
>>> Hi Robert,
>>>
>>> Did you guys every write any code to plot *paths* in graphs?
>> No, but you can color the edges of the path differently.
> 
> That is pretty bad, IMHO.  E.g., try this:
> 
> g = graphs.CompleteGraph(5)
> g.plot(edge_colors={'red':[(0,1)]})
> 
> If you try to color any edges, then it *deletes* all other edges that
> aren't colored.
> 

Well, "deletes" is a pretty strong word.  More accurately, it doesn't 
show any edges for which you didn't specify a color.

I've found this to be a slight annoyance when I wanted to create pretty 
edge-colored graphs, as I have to specifically color my "other" edges black.

Jason



--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: paths in graphs

2009-04-27 Thread William Stein
On Mon, Apr 27, 2009 at 7:45 AM, Robert Miller  wrote:
> On Mon, Apr 27, 2009 at 6:47 AM, William Stein  wrote:
>> Hi Robert,
>>
>> Did you guys every write any code to plot *paths* in graphs?
>
> No, but you can color the edges of the path differently.

That is pretty bad, IMHO.  E.g., try this:

g = graphs.CompleteGraph(5)
g.plot(edge_colors={'red':[(0,1)]})

If you try to color any edges, then it *deletes* all other edges that
aren't colored.

William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---

<>