#18289: Make graph display configurable
-------------------------------------+-------------------------------------
Reporter: vbraun | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.7
Component: graph theory | Resolution:
Keywords: | Merged in:
Authors: Volker Braun | Reviewers: Nathann Cohen
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vbraun/graph_preference | 40e6f7c6dadf251d92e67ed980cae7b575c9d1b8
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vbraun):
Replying to [comment:86 ncohen]:
> What would you think of returning a string similar to that in the
notebook
> when the graph is too big to be automatically plotted?
Sounds good, done
> - What would you think, when in the notebook, to do both at
> once: print the string *AND* plot the graph?
Sounds good, but will have to think about the proper implementation first.
Right now there are only rich output containers for a particular type. So
we either
* render the text inside the image (meh)
* add an optional caption to all image output types (maybe), or
* add a rich output type that is a container of other rich output types
(probably want this for other purposes, too)
I'd say that is material for another ticket.
> - Could you explain this part of the code?
> {{{
> output = self.plot(**kwds)._rich_repr_(display_manager)
> if output is not None:
> return output
> }}}
> In which case would this call return a "None"?
By convention, the `_rich_repr_` method can just return `None` to indicate
that there is no rich output, e.g. because the desired output types is not
supported. The display framework then falls back to `_repr_`.
> - About other graph-like objects
I've adjusted the docstring. I don't have any immediate plans to switch
other objects to graphical output, though we should think about that when
the dust has settled...
> - Do you still plan to deprecate show in #18302?
yes
> - What would you think of having a `DisplayPreferences` object in each
of
> those backends files?
Sounds good, though I wanted to revisit the preferences system to make it
more general and make them more like google app engine ndb models. IMHO we
need an easy-to-use validating(!) option system for graphics options and
the like. The display preferences are just a quick implementation that I
needed. It is better than dumb dictionaries, but not as good as it can be.
--
Ticket URL: <http://trac.sagemath.org/ticket/18289#comment:88>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.