> + >>> from sympy.categories import Object, NamedMorphism > + >>> from sympy.categories import Diagram, DiagramGrid > + >>> from sympy import FiniteSet > + >>> A = Object("A") > + >>> B = Object("B") > + >>> C = Object("C") > + >>> f = NamedMorphism(A, B, "f") > + >>> g = NamedMorphism(B, C, "g") > + >>> diagram = Diagram([f, g]) > + > + The simplest way to have a diagram laid out is the following: > + > + >>> grid = DiagramGrid(diagram) > + >>> (grid.width, grid.height) > + (2, 2) > + >>> print grid
That's a very cool idea, thanks for spotting it! --- Reply to this email directly or view it on GitHub: https://github.com/sympy/sympy/pull/1429/files#r1320983 -- You received this message because you are subscribed to the Google Groups "sympy-patches" group. To post to this group, send email to sympy-patches@googlegroups.com. To unsubscribe from this group, send email to sympy-patches+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.