Jason Grout wrote:
> kcrisman wrote:
>> I'm sorry, I didn't read the ticket on this.
>>
>> This is pretty great - thanks for the work!   Amazing what is possible
>> to do.  I assume by the fact that you gave the variable that name that
>> it would be possible at some later point to amend the code to allow
>> checking for other extra_property possibilities, like is_bipartite(),
>> is_eulerian(), is_connected(), etc., or even more than one at once...
>> though on the minus side my computer (only G4) takes quite a while
>> even computing len(list(graphs(8))), so maybe that's starting to get
>> carried away.
>>
>> I also agree with Jason's review regarding the much improved show()
>> functionality - what does the following output under this patch?
>>
>> sage: show([circle((0,0),n) for n in [1..3])
>>
>> or, if that syntax is not good (I still get confused about what's
>> allowed in the list comprehension),
>>
>> sage: show([circle((0,0),1),circle((0,0),2),circle((0,0),3)])
> 
> I'm working on generalizing the show(list of something) functionality 
> right now...

All right, extending Robert's patch, I've posted up trac #1908 at:

http://sagetrac.org/sage_trac/ticket/1908

This lets you do what you showed above:

sage: show([circle((0,0),n) for n in [1..3]]) # three circles

(note the extra "]" at the end, though).

To plot concentric circles, of course, you use:

sage: sum([circle((0,0),n) for n in [1..3]])


Also the following are tiled:

sage: show(graphs(3), layout='circular', vertex_size=50, 
vertex_labels=False, graph_border=True)
sage: show(list(graphs(3)), layout='circular', vertex_size=50, 
vertex_labels=False, graph_border=True)
sage: show(graphs(4), layout='circular', vertex_size=50, 
vertex_labels=False, graph_border=True)
sage: show([plot(sin(i*x)) for i in range(30)]) # Two pages of images
sage: show([sin(i*x) for i in range(2)])
sage: show([sin(i*x) for i in range(30)], columns=1, rows=10)

Robert, can you (or someone else) review the patch?  I did take out the 
default settings for graph_list plots from the generic show() code.  Can 
we put these somewhere in the graph code?  I'm envisioning show() being 
bogged down with lots of defaults for every kind of object.

Also, we can probably streamline the graph_list code quite a bit to use 
this now.  Even if we don't use show(list of graphs) directly, note some 
of the one-liner code using comprehensions to construct the grid (thanks 
to quick answers on sage-devel).

Thanks,

Jason


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

Reply via email to