diff --git a/docs/getting_started/01_study.ipynb b/docs/getting_started/01_study.ipynb index 23173e4..5cf41b8 100644 --- a/docs/getting_started/01_study.ipynb +++ b/docs/getting_started/01_study.ipynb @@ -155,7 +155,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 14, "id": "0df1511e-565d-45d0-93a8-adafbfaaaefa", "metadata": { "scrolled": true @@ -164,7 +164,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "be7c1a38bc504a67abc215743d681813", + "model_id": "bd157ce6c3034fd5a0533f8220e44c9e", "version_major": 2, "version_minor": 0 }, @@ -175,44 +175,10 @@ "metadata": {}, "output_type": "display_data" }, - { - "data": { - "text/html": [ - "" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/javascript": [ - "return_id_result('http://127.0.0.1:8889', 'zZtxQrYJanXwlIbrckDc', 'test message')" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "f073135af213448c994b303e53484519", + "model_id": "f7080afa9cce47deb47ef9c1b145ce71", "version_major": 2, "version_minor": 0 }, @@ -226,7 +192,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "bd4476310d4241688ea7f374c549b0b5", + "model_id": "69b3da5b0e884431b9cb84d758067af4", "version_major": 2, "version_minor": 0 }, @@ -236,131 +202,16 @@ }, "metadata": {}, "output_type": "display_data" - }, - { - "data": { - "application/javascript": [ - "//js\n", - "document.getElementById('studywjFNvmgEOX').contentWindow.network.on( 'click', function(properties) {\n", - " var nodeId = document.getElementById('studywjFNvmgEOX').contentWindow.network.getNodeAt({x:properties.event.srcEvent.offsetX, y:properties.event.srcEvent.offsetY});\n", - " if (! (nodeId === undefined)) {\n", - " return_id_result('http://127.0.0.1:8889', 'MoudfJVIPcWgNAgFZTZW', nodeId);\n", - " }\n", - "});" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "explore 10000000001\n", - "2\n", - "make visible 2 \n", - "document.getElementById('studywjFNvmgEOX').contentWindow.nodes.update({ id: 2, label: `didn't study\n", - "\u20ac\tR: 15`, group: \"states\", x: 57, y: -10 });\n" - ] - } - ], - "source": [ - "vis = show(mdp, layout=Layout(\"layouts/pinkgreen.json\"), name=\"study\", show_editor=True)" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "6cb412a1-52fa-4663-b7ba-371e06001f7a", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{0: {Edge(from_=0, to_=10000000000, label=None), Edge(from_=0, to_=10000000001, label=None)}, 10000000000: {Edge(from_=10000000000, to_=1, label='1')}, 10000000001: {Edge(from_=10000000001, to_=2, label='1')}, 1: {Edge(from_=1, to_=3, label='9/10'), Edge(from_=1, to_=4, label='1/10')}, 2: {Edge(from_=2, to_=4, label='3/5'), Edge(from_=2, to_=3, label='2/5')}, 3: {Edge(from_=3, to_=5, label='1')}, 4: {Edge(from_=4, to_=5, label='1')}}\n" - ] - } - ], - "source": [ - "print(vis.nt.edges)" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "f281c503-d45e-4f36-a368-71bda9e0a898", - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "make visible 10000000001 \n", - "document.getElementById('studywjFNvmgEOX').contentWindow.nodes.update({ id: 10000000001, label: `don't study\n", - "\u20ac\tR: 0`, group: \"actions\", x: 77, y: -144 });\n" - ] - }, - { - "data": { - "application/javascript": [ - "document.getElementById('studywjFNvmgEOX').contentWindow.nodes.update({ id: 10000000001, label: `don't study\n", - "\u20ac\tR: 0`, group: \"actions\", x: 77, y: -144 });" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "vis.nt.make_node_visible(10000000001, True)" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "id": "fee61f37-2e8e-48d0-9d57-e7f92c3effab", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "make visible 2 \n", - "document.getElementById('studywjFNvmgEOX').contentWindow.nodes.update({ id: 2, label: `didn't study\n", - "\u20ac\tR: 15`, group: \"states\", x: 57, y: -10 });\n" - ] - }, - { - "data": { - "application/javascript": [ - "document.getElementById('studywjFNvmgEOX').contentWindow.nodes.update({ id: 2, label: `didn't study\n", - "\u20ac\tR: 15`, group: \"states\", x: 57, y: -10 });" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" } ], "source": [ - "vis.nt.make_node_visible(2, True)" + "vis = show(mdp, layout=Layout(\"layouts/pinkgreen.json\"), name=\"study\", show_editor=False)" ] }, { "cell_type": "code", "execution_count": null, - "id": "5ffb652e-e2ca-4212-b8b3-44db33ba46f3", + "id": "a9e68b97-49d8-47dc-8ba1-5d179bcecc52", "metadata": {}, "outputs": [], "source": [] diff --git a/docs/getting_started/layouts/pinkgreen.json b/docs/getting_started/layouts/pinkgreen.json index 5b72941..799d8a7 100644 --- a/docs/getting_started/layouts/pinkgreen.json +++ b/docs/getting_started/layouts/pinkgreen.json @@ -103,7 +103,7 @@ "enable_physics": true, "width": 800, "height": 600, - "explore": true + "explore": false }, "saving": { "relative_path": true, diff --git a/docs/getting_started/study.html b/docs/getting_started/study.html index 2228f93..e7edec5 100644 --- a/docs/getting_started/study.html +++ b/docs/getting_started/study.html @@ -1,6 +1,6 @@