@doctest_depends_on(exe=('latex', 'dvipng'), modules=('pyglet',))
def preview_diagram(diagram, masked=None, diagram_format='', groups=None, output='png', viewer=None, euler=True, **hints):
 from sympy.printing import preview
 latex_output = xypic_draw_diagram(diagram, masked, diagram_format, groups, **hints)
 preview(latex_output, output, viewer, euler, ('xypic',))

@ doctest_depends_on ( exe = ( 'latex' , 'dvipng' ) , modules = ( 'pyglet' , ) ) def preview_diagram ( diagram , masked = None , diagram_format = '' , groups = None , output = 'png' , viewer = None , euler = True , ** hints ) : from sympy . printing import preview latex_output = xypic_draw_diagram ( diagram , masked , diagram_format , groups , ** hints ) preview ( latex_output , output , viewer , euler , ( 'xypic' , ) )
combines the functionality of xypic_draw_diagram and sympy .