Jason Grout wrote: > William Stein wrote: >> On Tue, Aug 18, 2009 at 7:10 AM, docfleetwood<docfleetw...@gmail.com> wrote: >>> I now how to name a graph with 'g.name("name")'. But is there a way >>> to display the name when you display the graph? ie. as a title above >>> or below the graph. I can't seem to find a command or any example >>> where this is done. >>> >>> So something like... >>> >>> show(g,display_name=True) >> That sounds like a great feature. You should implement it and post a patch.. > > > This sounds great. I think > > show(g,title=True) > > or > > show(g,title="My text") > > would be a nice interface. If title=True, then the object's natural > title (e.g., the graph name) is used. Otherwise, the text string is used. >
docfleetwood: if you don't get to this before me, I'll try to add this to my overhaul of the plotting code. If title=True, I'll use g.name() (if defined) as the title. If g.name() is not defined, I'll use g.__custom_name, which is what you assign when you do g.rename('some text'). In fact, maybe the graph code ought to set the __custom_name attribute, to be consistent with the rest of Sage, instead of using _backend.name. What do you think, Robert/anyone else interested? 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 -~----------~----~----~----~------~----~------~--~---