python: add a show= keyword to display_inline()
* python/spot/jupyter.py: Here. * tests/python/alternation.ipynb: Use it. * NEWS: Mention the above notebook as usage example.
This commit is contained in:
parent
60898b6d22
commit
9361bd9401
3 changed files with 15 additions and 10 deletions
|
|
@ -715,7 +715,9 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"If the state labels take too much space, you can reduce the size of the automaton by forcing states to be numbered with option `1`. The original label is still displayed as a tooltip when the mouse is over the state."
|
||||
"If the state labels take too much space, you can reduce the size of the automaton by forcing states to be numbered with option `1`. The original label is still displayed as a tooltip when the mouse is over the state.\n",
|
||||
"\n",
|
||||
"Note that passing option `show=...` to `display_inline` is similar to calling `aut.show(...)` on each argument."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -1359,7 +1361,7 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"display_inline(aut1.show('.bav1'), aut2.show('.bav1'), aut3.show('.bav1'), aut4.show('.bav1'), aut5.show('.bav1'))"
|
||||
"display_inline(aut1, aut2, aut3, aut4, aut5, show='.bav1')"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -1371,7 +1373,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
|
|
@ -1947,7 +1949,7 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"display_inline(aut1.show('.bav1u'), aut2.show('.bav1u'), aut3.show('.bav1u'), aut4.show('.bav1u'), aut5.show('.bav1u'))"
|
||||
"display_inline(aut1, aut2, aut3, aut4, aut5, show='.bav1u')"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -1959,7 +1961,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"execution_count": 10,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
|
|
@ -2579,8 +2581,7 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"display_inline(aut1.show('.bav1us'), aut2.show('.bav1us'), aut3.show('.bav1us'), \n",
|
||||
" aut4.show('.bav1us'), aut5.show('.bav1us'))"
|
||||
"display_inline(aut1, aut2, aut3, aut4, aut5, show='.bav1us')"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue