From 9d7e6386e40bcfc6637d8034e827ace78430f6cf Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 17 Sep 2020 10:25:00 +0200 Subject: [PATCH] python: reduce automata width to prevent overflows with Jupyter * python/spot/__init__.py (setup): Reduce the default maximal width of automata so that Jupyter output does not add an horizontal scroll bar for a few pixels. * tests/python/automata-io.ipynb: Adjust. --- python/spot/__init__.py | 2 +- tests/python/automata-io.ipynb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/spot/__init__.py b/python/spot/__init__.py index a3f0c3b57..faa50d30e 100644 --- a/python/spot/__init__.py +++ b/python/spot/__init__.py @@ -86,7 +86,7 @@ def setup(**kwargs): import os s = ('size="{}" edge[arrowhead=vee, arrowsize=.7]') - os.environ['SPOT_DOTEXTRA'] = s.format(kwargs.get('size', '10.2,5')) + os.environ['SPOT_DOTEXTRA'] = s.format(kwargs.get('size', '10.13,5')) bullets = 'B' if kwargs.get('bullets', True) else '' max_states = '<' + str(kwargs.get('max_states', 50)) diff --git a/tests/python/automata-io.ipynb b/tests/python/automata-io.ipynb index 6d364a678..24fcda286 100644 --- a/tests/python/automata-io.ipynb +++ b/tests/python/automata-io.ipynb @@ -68,7 +68,7 @@ " fontname=\"Lato\"\n", " node [fontname=\"Lato\"]\n", " edge [fontname=\"Lato\"]\n", - " size=\"10.2,5\" edge[arrowhead=vee, arrowsize=.7]\n", + " size=\"10.13,5\" edge[arrowhead=vee, arrowsize=.7]\n", " I [label=\"\", style=invis, width=0]\n", " I -> 1\n", " 0 [label=<0>, peripheries=2]\n",