Opened 4 years ago

#21943 new enhancement

Add plotting conventions to Developer Manual

Reported by: jepperlein Owned by:
Priority: major Milestone: sage-7.5
Component: documentation Keywords: days79
Cc: vdelecroix Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

Looking through the plotting and LaTeX generating code of different objects there seem to be some unstated conventions and some inconsistencies between how show, plot and _latex_ behave. I could not find a place in the documentation, stating the conventions for these methods.

For example here is what I think I understood:

  • Everything that can be reasonably plotted to GraphicsObjects? should have plot method that produces this plot.
  • Most stuff doesn't have a show method, but for example graphs do.
  • The funtion
    show(G)
    
    is an alias for
    pretty_print(G)
    
    which tries to find out what is the "best" representation for an object.
  • G._latex_ should produce a latex representation but there seems to be no concensus if this should be more like a plot of the object or the name of the object with fancy symbols that can be picked up by MathJax?
  • Some objects like Polytopes solve this ambiguity by providing a tikz method

Then there are inconsistencies between how for example edge colorings are specified. In graph.plot the format is {color:edges}, in graph.set_latex_options it is either {edge:color} for tikzpictures or {color:edges} for dot2tex pictures.

Before fixing these inconsistencies, I think one needs a more or less precise definition of the semantics of these functions at a central place.

Change History (0)

Note: See TracTickets for help on using tickets.