From 3389c0bdc864953e18e26b19615fac34d633f3e1 Mon Sep 17 00:00:00 2001 From: Tom Schierenbeck Date: Wed, 29 May 2024 13:16:15 +0200 Subject: [PATCH] Better intervals are working already. --- examples/door.ipynb | 4046 +----------- examples/product_spaces.ipynb | 9676 +--------------------------- requirements.txt | 8 +- src/random_events/interval.py | 179 + src/random_events/sigma_algebra.py | 386 ++ test/test_interval.py | 73 + 6 files changed, 685 insertions(+), 13683 deletions(-) create mode 100644 src/random_events/interval.py create mode 100644 src/random_events/sigma_algebra.py create mode 100644 test/test_interval.py diff --git a/examples/door.ipynb b/examples/door.ipynb index 2e81f18..cfa2923 100644 --- a/examples/door.ipynb +++ b/examples/door.ipynb @@ -11,4049 +11,6 @@ "start_time": "2024-04-02T06:11:00.190359Z" } }, - "outputs": [ - { - "data": { - "application/vnd.plotly.v1+json": { - "data": [ - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": true, - "x": [ - 2, - 2, - 4, - 4, - 2, - 2, - 4, - 4 - ], - "y": [ - 5, - 10, - 10, - 5, - 5, - 10, - 10, - 5 - ], - "z": [ - 0, - 0, - 0, - 0, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 0, - 0, - 1, - 1, - 0, - 0, - 1, - 1 - ], - "y": [ - 0, - 10, - 10, - 0, - 0, - 10, - 10, - 0 - ], - "z": [ - 0, - 0, - 0, - 0, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 5, - 5, - 6, - 6, - 5, - 5, - 6, - 6 - ], - "y": [ - 0, - 10, - 10, - 0, - 0, - 10, - 10, - 0 - ], - "z": [ - 0, - 0, - 0, - 0, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2 - ], - "y": [ - 0, - 5, - 5, - 0, - 0, - 5, - 5, - 0 - ], - "z": [ - 0, - 0, - 0, - 0, - 6, - 6, - 6, - 6 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2 - ], - "y": [ - 0, - 5, - 5, - 0, - 0, - 5, - 5, - 0 - ], - "z": [ - 8, - 8, - 8, - 8, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 1, - 1, - 2, - 2, - 1, - 1, - 2, - 2 - ], - "y": [ - 0, - 4, - 4, - 0, - 0, - 4, - 4, - 0 - ], - "z": [ - 0, - 0, - 0, - 0, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 1, - 1, - 2, - 2, - 1, - 1, - 2, - 2 - ], - "y": [ - 5, - 10, - 10, - 5, - 5, - 10, - 10, - 5 - ], - "z": [ - 0, - 0, - 0, - 0, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 1, - 1, - 2, - 2, - 1, - 1, - 2, - 2 - ], - "y": [ - 4, - 5, - 5, - 4, - 4, - 5, - 5, - 4 - ], - "z": [ - 0, - 0, - 0, - 0, - 6, - 6, - 6, - 6 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 1, - 1, - 2, - 2, - 1, - 1, - 2, - 2 - ], - "y": [ - 4, - 5, - 5, - 4, - 4, - 5, - 5, - 4 - ], - "z": [ - 7, - 7, - 7, - 7, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 4, - 4, - 5, - 5, - 4, - 4, - 5, - 5 - ], - "y": [ - 0, - 3, - 3, - 0, - 0, - 3, - 3, - 0 - ], - "z": [ - 0, - 0, - 0, - 0, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 4, - 4, - 5, - 5, - 4, - 4, - 5, - 5 - ], - "y": [ - 4, - 10, - 10, - 4, - 4, - 10, - 10, - 4 - ], - "z": [ - 0, - 0, - 0, - 0, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 4, - 4, - 5, - 5, - 4, - 4, - 5, - 5 - ], - "y": [ - 3, - 4, - 4, - 3, - 3, - 4, - 4, - 3 - ], - "z": [ - 0, - 0, - 0, - 0, - 7, - 7, - 7, - 7 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 4, - 4, - 5, - 5, - 4, - 4, - 5, - 5 - ], - "y": [ - 3, - 4, - 4, - 3, - 3, - 4, - 4, - 3 - ], - "z": [ - 8, - 8, - 8, - 8, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 4, - 4, - 4, - 4, - 4, - 4, - 4, - 4 - ], - "y": [ - 0, - 2, - 2, - 0, - 0, - 2, - 2, - 0 - ], - "z": [ - 0, - 0, - 0, - 0, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 4, - 4, - 4, - 4, - 4, - 4, - 4, - 4 - ], - "y": [ - 3, - 10, - 10, - 3, - 3, - 10, - 10, - 3 - ], - "z": [ - 0, - 0, - 0, - 0, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 2, - 2, - 2.5, - 2.5, - 2, - 2, - 2.5, - 2.5 - ], - "y": [ - 0, - 2, - 2, - 0, - 0, - 2, - 2, - 0 - ], - "z": [ - 0, - 0, - 0, - 0, - 6, - 6, - 6, - 6 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 2, - 2, - 2.5, - 2.5, - 2, - 2, - 2.5, - 2.5 - ], - "y": [ - 0, - 2, - 2, - 0, - 0, - 2, - 2, - 0 - ], - "z": [ - 8, - 8, - 8, - 8, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 2, - 2, - 2.5, - 2.5, - 2, - 2, - 2.5, - 2.5 - ], - "y": [ - 3, - 5, - 5, - 3, - 3, - 5, - 5, - 3 - ], - "z": [ - 0, - 0, - 0, - 0, - 6, - 6, - 6, - 6 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 2, - 2, - 2.5, - 2.5, - 2, - 2, - 2.5, - 2.5 - ], - "y": [ - 3, - 5, - 5, - 3, - 3, - 5, - 5, - 3 - ], - "z": [ - 8, - 8, - 8, - 8, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 3.5, - 3.5, - 4, - 4, - 3.5, - 3.5, - 4, - 4 - ], - "y": [ - 0, - 2, - 2, - 0, - 0, - 2, - 2, - 0 - ], - "z": [ - 0, - 0, - 0, - 0, - 6, - 6, - 6, - 6 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 3.5, - 3.5, - 4, - 4, - 3.5, - 3.5, - 4, - 4 - ], - "y": [ - 0, - 2, - 2, - 0, - 0, - 2, - 2, - 0 - ], - "z": [ - 8, - 8, - 8, - 8, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 3.5, - 3.5, - 4, - 4, - 3.5, - 3.5, - 4, - 4 - ], - "y": [ - 3, - 5, - 5, - 3, - 3, - 5, - 5, - 3 - ], - "z": [ - 0, - 0, - 0, - 0, - 6, - 6, - 6, - 6 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 3.5, - 3.5, - 4, - 4, - 3.5, - 3.5, - 4, - 4 - ], - "y": [ - 3, - 5, - 5, - 3, - 3, - 5, - 5, - 3 - ], - "z": [ - 8, - 8, - 8, - 8, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 2.5, - 2.5, - 3.5, - 3.5, - 2.5, - 2.5, - 3.5, - 3.5 - ], - "y": [ - 0, - 2, - 2, - 0, - 0, - 2, - 2, - 0 - ], - "z": [ - 0, - 0, - 0, - 0, - 3, - 3, - 3, - 3 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 2.5, - 2.5, - 3.5, - 3.5, - 2.5, - 2.5, - 3.5, - 3.5 - ], - "y": [ - 0, - 2, - 2, - 0, - 0, - 2, - 2, - 0 - ], - "z": [ - 8, - 8, - 8, - 8, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 2.5, - 2.5, - 3.5, - 3.5, - 2.5, - 2.5, - 3.5, - 3.5 - ], - "y": [ - 3, - 5, - 5, - 3, - 3, - 5, - 5, - 3 - ], - "z": [ - 0, - 0, - 0, - 0, - 3, - 3, - 3, - 3 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 2.5, - 2.5, - 3.5, - 3.5, - 2.5, - 2.5, - 3.5, - 3.5 - ], - "y": [ - 3, - 5, - 5, - 3, - 3, - 5, - 5, - 3 - ], - "z": [ - 8, - 8, - 8, - 8, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 4, - 4, - 4, - 4, - 4, - 4, - 4, - 4 - ], - "y": [ - 2, - 3, - 3, - 2, - 2, - 3, - 3, - 2 - ], - "z": [ - 0, - 0, - 0, - 0, - 8, - 8, - 8, - 8 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 4, - 4, - 4, - 4, - 4, - 4, - 4, - 4 - ], - "y": [ - 2, - 3, - 3, - 2, - 2, - 3, - 3, - 2 - ], - "z": [ - 9, - 9, - 9, - 9, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 2, - 2, - 2.5, - 2.5, - 2, - 2, - 2.5, - 2.5 - ], - "y": [ - 2, - 3, - 3, - 2, - 2, - 3, - 3, - 2 - ], - "z": [ - 0, - 0, - 0, - 0, - 6, - 6, - 6, - 6 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 2, - 2, - 2.5, - 2.5, - 2, - 2, - 2.5, - 2.5 - ], - "y": [ - 2, - 3, - 3, - 2, - 2, - 3, - 3, - 2 - ], - "z": [ - 9, - 9, - 9, - 9, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 3.5, - 3.5, - 4, - 4, - 3.5, - 3.5, - 4, - 4 - ], - "y": [ - 2, - 3, - 3, - 2, - 2, - 3, - 3, - 2 - ], - "z": [ - 0, - 0, - 0, - 0, - 6, - 6, - 6, - 6 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 3.5, - 3.5, - 4, - 4, - 3.5, - 3.5, - 4, - 4 - ], - "y": [ - 2, - 3, - 3, - 2, - 2, - 3, - 3, - 2 - ], - "z": [ - 9, - 9, - 9, - 9, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 2.5, - 2.5, - 3.5, - 3.5, - 2.5, - 2.5, - 3.5, - 3.5 - ], - "y": [ - 2, - 3, - 3, - 2, - 2, - 3, - 3, - 2 - ], - "z": [ - 0, - 0, - 0, - 0, - 3, - 3, - 3, - 3 - ], - "type": "mesh3d" - }, - { - "color": "grey", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680682919344", - "name": "Event", - "showlegend": false, - "x": [ - 2.5, - 2.5, - 3.5, - 3.5, - 2.5, - 2.5, - 3.5, - 3.5 - ], - "y": [ - 2, - 3, - 3, - 2, - 2, - 3, - 3, - 2 - ], - "z": [ - 9, - 9, - 9, - 9, - 10, - 10, - 10, - 10 - ], - "type": "mesh3d" - }, - { - "color": "#bcbd22", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680683003280", - "name": "Event", - "showlegend": true, - "x": [ - 2, - 2, - 4, - 4, - 2, - 2, - 4, - 4 - ], - "y": [ - 0, - 5, - 5, - 0, - 0, - 5, - 5, - 0 - ], - "z": [ - 6, - 6, - 6, - 6, - 8, - 8, - 8, - 8 - ], - "type": "mesh3d" - }, - { - "color": "#bcbd22", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680683003280", - "name": "Event", - "showlegend": false, - "x": [ - 2.5, - 2.5, - 3.5, - 3.5, - 2.5, - 2.5, - 3.5, - 3.5 - ], - "y": [ - 0, - 5, - 5, - 0, - 0, - 5, - 5, - 0 - ], - "z": [ - 3, - 3, - 3, - 3, - 6, - 6, - 6, - 6 - ], - "type": "mesh3d" - }, - { - "color": "#bcbd22", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680683003280", - "name": "Event", - "showlegend": false, - "x": [ - 1, - 1, - 2, - 2, - 1, - 1, - 2, - 2 - ], - "y": [ - 4, - 5, - 5, - 4, - 4, - 5, - 5, - 4 - ], - "z": [ - 6, - 6, - 6, - 6, - 7, - 7, - 7, - 7 - ], - "type": "mesh3d" - }, - { - "color": "#bcbd22", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680683003280", - "name": "Event", - "showlegend": false, - "x": [ - 4, - 4, - 5, - 5, - 4, - 4, - 5, - 5 - ], - "y": [ - 3, - 4, - 4, - 3, - 3, - 4, - 4, - 3 - ], - "z": [ - 7, - 7, - 7, - 7, - 8, - 8, - 8, - 8 - ], - "type": "mesh3d" - }, - { - "color": "#bcbd22", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139680683003280", - "name": "Event", - "showlegend": false, - "x": [ - 2, - 2, - 4, - 4, - 2, - 2, - 4, - 4 - ], - "y": [ - 2, - 3, - 3, - 2, - 2, - 3, - 3, - 2 - ], - "z": [ - 8, - 8, - 8, - 8, - 9, - 9, - 9, - 9 - ], - "type": "mesh3d" - } - ], - "layout": { - "template": { - "data": { - "histogram2dcontour": [ - { - "type": "histogram2dcontour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "choropleth": [ - { - "type": "choropleth", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "histogram2d": [ - { - "type": "histogram2d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmap": [ - { - "type": "heatmap", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmapgl": [ - { - "type": "heatmapgl", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "contourcarpet": [ - { - "type": "contourcarpet", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "contour": [ - { - "type": "contour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "surface": [ - { - "type": "surface", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "mesh3d": [ - { - "type": "mesh3d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "scatter": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scatter" - } - ], - "parcoords": [ - { - "type": "parcoords", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolargl": [ - { - "type": "scatterpolargl", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "bar": [ - { - "error_x": { - "color": "#f2f5fa" - }, - "error_y": { - "color": "#f2f5fa" - }, - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "bar" - } - ], - "scattergeo": [ - { - "type": "scattergeo", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolar": [ - { - "type": "scatterpolar", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "histogram": [ - { - "marker": { - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "histogram" - } - ], - "scattergl": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scattergl" - } - ], - "scatter3d": [ - { - "type": "scatter3d", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattermapbox": [ - { - "type": "scattermapbox", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterternary": [ - { - "type": "scatterternary", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattercarpet": [ - { - "type": "scattercarpet", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "carpet": [ - { - "aaxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "baxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "type": "carpet" - } - ], - "table": [ - { - "cells": { - "fill": { - "color": "#506784" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "header": { - "fill": { - "color": "#2a3f5f" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "type": "table" - } - ], - "barpolar": [ - { - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "barpolar" - } - ], - "pie": [ - { - "automargin": true, - "type": "pie" - } - ] - }, - "layout": { - "autotypenumbers": "strict", - "colorway": [ - "#636efa", - "#EF553B", - "#00cc96", - "#ab63fa", - "#FFA15A", - "#19d3f3", - "#FF6692", - "#B6E880", - "#FF97FF", - "#FECB52" - ], - "font": { - "color": "#f2f5fa" - }, - "hovermode": "closest", - "hoverlabel": { - "align": "left" - }, - "paper_bgcolor": "rgb(17,17,17)", - "plot_bgcolor": "rgb(17,17,17)", - "polar": { - "bgcolor": "rgb(17,17,17)", - "angularaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "radialaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "ternary": { - "bgcolor": "rgb(17,17,17)", - "aaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "baxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "caxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "coloraxis": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "colorscale": { - "sequential": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "sequentialminus": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "diverging": [ - [ - 0, - "#8e0152" - ], - [ - 0.1, - "#c51b7d" - ], - [ - 0.2, - "#de77ae" - ], - [ - 0.3, - "#f1b6da" - ], - [ - 0.4, - "#fde0ef" - ], - [ - 0.5, - "#f7f7f7" - ], - [ - 0.6, - "#e6f5d0" - ], - [ - 0.7, - "#b8e186" - ], - [ - 0.8, - "#7fbc41" - ], - [ - 0.9, - "#4d9221" - ], - [ - 1, - "#276419" - ] - ] - }, - "xaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "yaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "scene": { - "xaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "yaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "zaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - } - }, - "shapedefaults": { - "line": { - "color": "#f2f5fa" - } - }, - "annotationdefaults": { - "arrowcolor": "#f2f5fa", - "arrowhead": 0, - "arrowwidth": 1 - }, - "geo": { - "bgcolor": "rgb(17,17,17)", - "landcolor": "rgb(17,17,17)", - "subunitcolor": "#506784", - "showland": true, - "showlakes": true, - "lakecolor": "rgb(17,17,17)" - }, - "title": { - "x": 0.05 - }, - "updatemenudefaults": { - "bgcolor": "#506784", - "borderwidth": 0 - }, - "sliderdefaults": { - "bgcolor": "#C8D4E3", - "borderwidth": 1, - "bordercolor": "rgb(17,17,17)", - "tickwidth": 0 - }, - "mapbox": { - "style": "dark" - } - } - } - }, - "config": { - "plotlyServerURL": "https://plot.ly" - } - }, - "text/html": "
" - }, - "metadata": {}, - "output_type": "display_data" - } - ], "source": [ "from random_events.events import Event, ComplexEvent\n", "from random_events.variables import Continuous\n", @@ -4085,7 +42,8 @@ "fig.add_traces(lock.plot(color=\"grey\"))\n", "fig.add_traces(keyhole.plot(gold))\n", "fig.show()" - ] + ], + "outputs": [] }, { "cell_type": "markdown", diff --git a/examples/product_spaces.ipynb b/examples/product_spaces.ipynb index 8638928..85e50d7 100644 --- a/examples/product_spaces.ipynb +++ b/examples/product_spaces.ipynb @@ -49,15 +49,6 @@ "start_time": "2024-04-02T10:44:50.128762Z" } }, - "outputs": [ - { - "data": { - "text/html": " \n " - }, - "metadata": {}, - "output_type": "display_data" - } - ], "source": [ "from random_events.variables import Symbolic, Continuous, Integer\n", "from random_events.events import Event, ComplexEvent\n", @@ -66,7 +57,8 @@ "plotly.offline.init_notebook_mode()\n", "import plotly.graph_objects as go\n", "from itertools import chain, combinations, product" - ] + ], + "outputs": [] }, { "cell_type": "markdown", @@ -94,16 +86,6 @@ }, { "cell_type": "code", - "outputs": [ - { - "data": { - "text/plain": "[set(),\n {'b'},\n {'c'},\n {'a'},\n {'b', 'c'},\n {'a', 'b'},\n {'a', 'c'},\n {'a', 'b', 'c'}]" - }, - "execution_count": 46, - "metadata": {}, - "output_type": "execute_result" - } - ], "source": [ "def powerset(iterable):\n", " s = list(iterable)\n", @@ -123,7 +105,8 @@ } }, "id": "efd225f025a25755", - "execution_count": 46 + "execution_count": 46, + "outputs": [] }, { "cell_type": "markdown", @@ -137,16 +120,6 @@ }, { "cell_type": "code", - "outputs": [ - { - "data": { - "text/plain": "True" - }, - "execution_count": 47, - "metadata": {}, - "output_type": "execute_result" - } - ], "source": [ "E in powerset_of_E" ], @@ -158,7 +131,8 @@ } }, "id": "4718cfb47e7aabf5", - "execution_count": 47 + "execution_count": 47, + "outputs": [] }, { "cell_type": "markdown", @@ -172,7 +146,6 @@ }, { "cell_type": "code", - "outputs": [], "source": [ "for A, B in combinations(powerset_of_E, 2):\n", " if A - B not in powerset_of_E:\n", @@ -186,7 +159,8 @@ } }, "id": "dc64275c217072e", - "execution_count": 48 + "execution_count": 48, + "outputs": [] }, { "cell_type": "markdown", @@ -200,7 +174,6 @@ }, { "cell_type": "code", - "outputs": [], "source": [ "for A, B in combinations(powerset_of_E, 2):\n", " if A.union(B) not in powerset_of_E:\n", @@ -216,7 +189,8 @@ } }, "id": "e7dc354bb8a70a12", - "execution_count": 49 + "execution_count": 49, + "outputs": [] }, { "cell_type": "markdown", @@ -235,16 +209,6 @@ { "cell_type": "code", "execution_count": 50, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Symbolic(item, ('bowl', 'cup', 'spoon'))\n", - "Symbolic(color, ('blue', 'green', 'red'))\n" - ] - } - ], "source": [ "item = Symbolic(\"item\", [\"bowl\", \"cup\", \"spoon\"])\n", "color = Symbolic(\"color\", [\"blue\", \"green\", \"red\"])\n", @@ -258,7 +222,8 @@ "start_time": "2024-04-02T10:44:50.340246Z" } }, - "id": "27ea010bc8892833" + "id": "27ea010bc8892833", + "outputs": [] }, { "cell_type": "markdown", @@ -302,16 +267,6 @@ }, { "cell_type": "code", - "outputs": [ - { - "data": { - "text/plain": "[('bowl', 'blue'),\n ('bowl', 'green'),\n ('bowl', 'red'),\n ('cup', 'blue'),\n ('cup', 'green'),\n ('cup', 'red'),\n ('spoon', 'blue'),\n ('spoon', 'green'),\n ('spoon', 'red')]" - }, - "execution_count": 51, - "metadata": {}, - "output_type": "execute_result" - } - ], "source": [ "product_E = product(item.domain, color.domain)\n", "list(product_E)" @@ -324,7 +279,8 @@ } }, "id": "379cef1a50307c47", - "execution_count": 51 + "execution_count": 51, + "outputs": [] }, { "cell_type": "markdown", @@ -339,16 +295,6 @@ }, { "cell_type": "code", - "outputs": [ - { - "data": { - "text/plain": "[('bowl', 'blue'), ('cup', 'blue')]" - }, - "execution_count": 52, - "metadata": {}, - "output_type": "execute_result" - } - ], "source": [ "event = Event({item: (\"bowl\", \"cup\"), color: \"blue\"})\n", "list(product(*event.values()))" @@ -361,7 +307,8 @@ } }, "id": "a53e718226f00339", - "execution_count": 52 + "execution_count": 52, + "outputs": [] }, { "cell_type": "markdown", @@ -375,7 +322,6 @@ }, { "cell_type": "code", - "outputs": [], "source": [ "event1 = Event({item: \"bowl\", color: \"blue\"})\n", "event2 = Event({item: \"cup\", color: \"red\"})" @@ -388,7 +334,8 @@ } }, "id": "1bb140fb470e3cf7", - "execution_count": 53 + "execution_count": 53, + "outputs": [] }, { "cell_type": "markdown", @@ -402,16 +349,6 @@ }, { "cell_type": "code", - "outputs": [ - { - "data": { - "text/plain": "{Symbolic(item): ('bowl', 'cup'), Symbolic(color): ('blue', 'red')}" - }, - "execution_count": 54, - "metadata": {}, - "output_type": "execute_result" - } - ], "source": [ "event_union = Event({item: (\"bowl\", \"cup\"), color: (\"blue\", \"red\")})\n", "event_union" @@ -424,7 +361,8 @@ } }, "id": "b74c89bfbed07d6f", - "execution_count": 54 + "execution_count": 54, + "outputs": [] }, { "cell_type": "markdown", @@ -438,16 +376,6 @@ }, { "cell_type": "code", - "outputs": [ - { - "data": { - "text/plain": "\"{color: ('blue',), item: ('bowl',)} u {item: ('cup',), color: ('red',)}\"" - }, - "execution_count": 55, - "metadata": {}, - "output_type": "execute_result" - } - ], "source": [ "real_event_union = event1 | event2\n", "str(real_event_union)" @@ -460,7 +388,8 @@ } }, "id": "7fd789bf96187ca1", - "execution_count": 55 + "execution_count": 55, + "outputs": [] }, { "cell_type": "markdown", @@ -499,884 +428,6 @@ { "cell_type": "code", "execution_count": 56, - "outputs": [ - { - "data": { - "application/vnd.plotly.v1+json": { - "data": [ - { - "fill": "toself", - "mode": "lines", - "name": "Event", - "x": [ - 2, - 2, - 3, - 3, - 2, - null - ], - "y": [ - 10, - 15, - 15, - 10, - 10, - null - ], - "type": "scatter" - } - ], - "layout": { - "xaxis": { - "title": { - "text": "x" - } - }, - "yaxis": { - "title": { - "text": "y" - } - }, - "template": { - "data": { - "histogram2dcontour": [ - { - "type": "histogram2dcontour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "choropleth": [ - { - "type": "choropleth", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "histogram2d": [ - { - "type": "histogram2d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmap": [ - { - "type": "heatmap", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmapgl": [ - { - "type": "heatmapgl", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "contourcarpet": [ - { - "type": "contourcarpet", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "contour": [ - { - "type": "contour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "surface": [ - { - "type": "surface", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "mesh3d": [ - { - "type": "mesh3d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "scatter": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scatter" - } - ], - "parcoords": [ - { - "type": "parcoords", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolargl": [ - { - "type": "scatterpolargl", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "bar": [ - { - "error_x": { - "color": "#f2f5fa" - }, - "error_y": { - "color": "#f2f5fa" - }, - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "bar" - } - ], - "scattergeo": [ - { - "type": "scattergeo", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolar": [ - { - "type": "scatterpolar", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "histogram": [ - { - "marker": { - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "histogram" - } - ], - "scattergl": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scattergl" - } - ], - "scatter3d": [ - { - "type": "scatter3d", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattermapbox": [ - { - "type": "scattermapbox", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterternary": [ - { - "type": "scatterternary", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattercarpet": [ - { - "type": "scattercarpet", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "carpet": [ - { - "aaxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "baxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "type": "carpet" - } - ], - "table": [ - { - "cells": { - "fill": { - "color": "#506784" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "header": { - "fill": { - "color": "#2a3f5f" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "type": "table" - } - ], - "barpolar": [ - { - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "barpolar" - } - ], - "pie": [ - { - "automargin": true, - "type": "pie" - } - ] - }, - "layout": { - "autotypenumbers": "strict", - "colorway": [ - "#636efa", - "#EF553B", - "#00cc96", - "#ab63fa", - "#FFA15A", - "#19d3f3", - "#FF6692", - "#B6E880", - "#FF97FF", - "#FECB52" - ], - "font": { - "color": "#f2f5fa" - }, - "hovermode": "closest", - "hoverlabel": { - "align": "left" - }, - "paper_bgcolor": "rgb(17,17,17)", - "plot_bgcolor": "rgb(17,17,17)", - "polar": { - "bgcolor": "rgb(17,17,17)", - "angularaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "radialaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "ternary": { - "bgcolor": "rgb(17,17,17)", - "aaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "baxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "caxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "coloraxis": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "colorscale": { - "sequential": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "sequentialminus": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "diverging": [ - [ - 0, - "#8e0152" - ], - [ - 0.1, - "#c51b7d" - ], - [ - 0.2, - "#de77ae" - ], - [ - 0.3, - "#f1b6da" - ], - [ - 0.4, - "#fde0ef" - ], - [ - 0.5, - "#f7f7f7" - ], - [ - 0.6, - "#e6f5d0" - ], - [ - 0.7, - "#b8e186" - ], - [ - 0.8, - "#7fbc41" - ], - [ - 0.9, - "#4d9221" - ], - [ - 1, - "#276419" - ] - ] - }, - "xaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "yaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "scene": { - "xaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "yaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "zaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - } - }, - "shapedefaults": { - "line": { - "color": "#f2f5fa" - } - }, - "annotationdefaults": { - "arrowcolor": "#f2f5fa", - "arrowhead": 0, - "arrowwidth": 1 - }, - "geo": { - "bgcolor": "rgb(17,17,17)", - "landcolor": "rgb(17,17,17)", - "subunitcolor": "#506784", - "showland": true, - "showlakes": true, - "lakecolor": "rgb(17,17,17)" - }, - "title": { - "x": 0.05 - }, - "updatemenudefaults": { - "bgcolor": "#506784", - "borderwidth": 0 - }, - "sliderdefaults": { - "bgcolor": "#C8D4E3", - "borderwidth": 1, - "bordercolor": "rgb(17,17,17)", - "tickwidth": 0 - }, - "mapbox": { - "style": "dark" - } - } - }, - "title": { - "text": "Rectangle event in 2D" - } - }, - "config": { - "plotlyServerURL": "https://plot.ly" - } - }, - "text/html": "
" - }, - "metadata": {}, - "output_type": "display_data" - } - ], "source": [ "x = Continuous(\"x\")\n", "y = Continuous(\"y\")\n", @@ -1393,7 +444,8 @@ "start_time": "2024-04-02T10:44:50.542689Z" } }, - "id": "a86b223360f60725" + "id": "a86b223360f60725", + "outputs": [] }, { "cell_type": "markdown", @@ -1411,16 +463,6 @@ { "cell_type": "code", "execution_count": 57, - "outputs": [ - { - "data": { - "text/plain": "{Continuous(x): [2,3] | [4,5] | [6,7], Continuous(y): [10,15] | [25,27]}" - }, - "execution_count": 57, - "metadata": {}, - "output_type": "execute_result" - } - ], "source": [ "complex_event = Event({x: portion.closed(2, 3) | portion.closed(4, 5) | portion.closed(6,7), y: portion.closed(10, 15) | portion.closed(25, 27)})\n", "complex_event" @@ -1432,7 +474,8 @@ "start_time": "2024-04-02T10:44:50.561779Z" } }, - "id": "86d42ecd896bef10" + "id": "86d42ecd896bef10", + "outputs": [] }, { "cell_type": "markdown", @@ -1447,944 +490,6 @@ { "cell_type": "code", "execution_count": 58, - "outputs": [ - { - "data": { - "application/vnd.plotly.v1+json": { - "data": [ - { - "fill": "toself", - "mode": "lines", - "name": "Event", - "x": [ - 2, - 2, - 3, - 3, - 2, - null, - 2, - 2, - 3, - 3, - 2, - null, - 4, - 4, - 5, - 5, - 4, - null, - 4, - 4, - 5, - 5, - 4, - null, - 6, - 6, - 7, - 7, - 6, - null, - 6, - 6, - 7, - 7, - 6, - null - ], - "y": [ - 10, - 15, - 15, - 10, - 10, - null, - 25, - 27, - 27, - 25, - 25, - null, - 10, - 15, - 15, - 10, - 10, - null, - 25, - 27, - 27, - 25, - 25, - null, - 10, - 15, - 15, - 10, - 10, - null, - 25, - 27, - 27, - 25, - 25, - null - ], - "type": "scatter" - } - ], - "layout": { - "xaxis": { - "title": { - "text": "x" - } - }, - "yaxis": { - "title": { - "text": "y" - } - }, - "template": { - "data": { - "histogram2dcontour": [ - { - "type": "histogram2dcontour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "choropleth": [ - { - "type": "choropleth", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "histogram2d": [ - { - "type": "histogram2d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmap": [ - { - "type": "heatmap", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmapgl": [ - { - "type": "heatmapgl", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "contourcarpet": [ - { - "type": "contourcarpet", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "contour": [ - { - "type": "contour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "surface": [ - { - "type": "surface", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "mesh3d": [ - { - "type": "mesh3d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "scatter": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scatter" - } - ], - "parcoords": [ - { - "type": "parcoords", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolargl": [ - { - "type": "scatterpolargl", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "bar": [ - { - "error_x": { - "color": "#f2f5fa" - }, - "error_y": { - "color": "#f2f5fa" - }, - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "bar" - } - ], - "scattergeo": [ - { - "type": "scattergeo", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolar": [ - { - "type": "scatterpolar", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "histogram": [ - { - "marker": { - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "histogram" - } - ], - "scattergl": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scattergl" - } - ], - "scatter3d": [ - { - "type": "scatter3d", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattermapbox": [ - { - "type": "scattermapbox", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterternary": [ - { - "type": "scatterternary", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattercarpet": [ - { - "type": "scattercarpet", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "carpet": [ - { - "aaxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "baxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "type": "carpet" - } - ], - "table": [ - { - "cells": { - "fill": { - "color": "#506784" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "header": { - "fill": { - "color": "#2a3f5f" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "type": "table" - } - ], - "barpolar": [ - { - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "barpolar" - } - ], - "pie": [ - { - "automargin": true, - "type": "pie" - } - ] - }, - "layout": { - "autotypenumbers": "strict", - "colorway": [ - "#636efa", - "#EF553B", - "#00cc96", - "#ab63fa", - "#FFA15A", - "#19d3f3", - "#FF6692", - "#B6E880", - "#FF97FF", - "#FECB52" - ], - "font": { - "color": "#f2f5fa" - }, - "hovermode": "closest", - "hoverlabel": { - "align": "left" - }, - "paper_bgcolor": "rgb(17,17,17)", - "plot_bgcolor": "rgb(17,17,17)", - "polar": { - "bgcolor": "rgb(17,17,17)", - "angularaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "radialaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "ternary": { - "bgcolor": "rgb(17,17,17)", - "aaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "baxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "caxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "coloraxis": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "colorscale": { - "sequential": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "sequentialminus": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "diverging": [ - [ - 0, - "#8e0152" - ], - [ - 0.1, - "#c51b7d" - ], - [ - 0.2, - "#de77ae" - ], - [ - 0.3, - "#f1b6da" - ], - [ - 0.4, - "#fde0ef" - ], - [ - 0.5, - "#f7f7f7" - ], - [ - 0.6, - "#e6f5d0" - ], - [ - 0.7, - "#b8e186" - ], - [ - 0.8, - "#7fbc41" - ], - [ - 0.9, - "#4d9221" - ], - [ - 1, - "#276419" - ] - ] - }, - "xaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "yaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "scene": { - "xaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "yaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "zaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - } - }, - "shapedefaults": { - "line": { - "color": "#f2f5fa" - } - }, - "annotationdefaults": { - "arrowcolor": "#f2f5fa", - "arrowhead": 0, - "arrowwidth": 1 - }, - "geo": { - "bgcolor": "rgb(17,17,17)", - "landcolor": "rgb(17,17,17)", - "subunitcolor": "#506784", - "showland": true, - "showlakes": true, - "lakecolor": "rgb(17,17,17)" - }, - "title": { - "x": 0.05 - }, - "updatemenudefaults": { - "bgcolor": "#506784", - "borderwidth": 0 - }, - "sliderdefaults": { - "bgcolor": "#C8D4E3", - "borderwidth": 1, - "bordercolor": "rgb(17,17,17)", - "tickwidth": 0 - }, - "mapbox": { - "style": "dark" - } - } - }, - "title": { - "text": "Complex event in 2D" - } - }, - "config": { - "plotlyServerURL": "https://plot.ly" - } - }, - "text/html": "
" - }, - "metadata": {}, - "output_type": "display_data" - } - ], "source": [ "fig = go.Figure(complex_event.plot(), complex_event.plotly_layout())\n", "fig.update_layout(title= \"Complex event in 2D\")\n", @@ -2397,7 +502,8 @@ "start_time": "2024-04-02T10:44:50.611069Z" } }, - "id": "7d81de549d20f02b" + "id": "7d81de549d20f02b", + "outputs": [] }, { "cell_type": "markdown", @@ -2412,2237 +518,6 @@ { "cell_type": "code", "execution_count": 59, - "outputs": [ - { - "data": { - "application/vnd.plotly.v1+json": { - "data": [ - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 2, - 2, - 3, - 3, - 2, - 2, - 3, - 3 - ], - "y": [ - 10, - 15, - 15, - 10, - 10, - 15, - 15, - 10 - ], - "z": [ - 1, - 1, - 1, - 1, - 3, - 3, - 3, - 3 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 2, - 2, - 3, - 3, - 2, - 2, - 3, - 3 - ], - "y": [ - 10, - 15, - 15, - 10, - 10, - 15, - 15, - 10 - ], - "z": [ - 4, - 4, - 4, - 4, - 4.5, - 4.5, - 4.5, - 4.5 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 2, - 2, - 3, - 3, - 2, - 2, - 3, - 3 - ], - "y": [ - 10, - 15, - 15, - 10, - 10, - 15, - 15, - 10 - ], - "z": [ - 10, - 10, - 10, - 10, - 11.5, - 11.5, - 11.5, - 11.5 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 2, - 2, - 3, - 3, - 2, - 2, - 3, - 3 - ], - "y": [ - 25, - 27, - 27, - 25, - 25, - 27, - 27, - 25 - ], - "z": [ - 1, - 1, - 1, - 1, - 3, - 3, - 3, - 3 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 2, - 2, - 3, - 3, - 2, - 2, - 3, - 3 - ], - "y": [ - 25, - 27, - 27, - 25, - 25, - 27, - 27, - 25 - ], - "z": [ - 4, - 4, - 4, - 4, - 4.5, - 4.5, - 4.5, - 4.5 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 2, - 2, - 3, - 3, - 2, - 2, - 3, - 3 - ], - "y": [ - 25, - 27, - 27, - 25, - 25, - 27, - 27, - 25 - ], - "z": [ - 10, - 10, - 10, - 10, - 11.5, - 11.5, - 11.5, - 11.5 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 4, - 4, - 5, - 5, - 4, - 4, - 5, - 5 - ], - "y": [ - 10, - 15, - 15, - 10, - 10, - 15, - 15, - 10 - ], - "z": [ - 1, - 1, - 1, - 1, - 3, - 3, - 3, - 3 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 4, - 4, - 5, - 5, - 4, - 4, - 5, - 5 - ], - "y": [ - 10, - 15, - 15, - 10, - 10, - 15, - 15, - 10 - ], - "z": [ - 4, - 4, - 4, - 4, - 4.5, - 4.5, - 4.5, - 4.5 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 4, - 4, - 5, - 5, - 4, - 4, - 5, - 5 - ], - "y": [ - 10, - 15, - 15, - 10, - 10, - 15, - 15, - 10 - ], - "z": [ - 10, - 10, - 10, - 10, - 11.5, - 11.5, - 11.5, - 11.5 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 4, - 4, - 5, - 5, - 4, - 4, - 5, - 5 - ], - "y": [ - 25, - 27, - 27, - 25, - 25, - 27, - 27, - 25 - ], - "z": [ - 1, - 1, - 1, - 1, - 3, - 3, - 3, - 3 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 4, - 4, - 5, - 5, - 4, - 4, - 5, - 5 - ], - "y": [ - 25, - 27, - 27, - 25, - 25, - 27, - 27, - 25 - ], - "z": [ - 4, - 4, - 4, - 4, - 4.5, - 4.5, - 4.5, - 4.5 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 4, - 4, - 5, - 5, - 4, - 4, - 5, - 5 - ], - "y": [ - 25, - 27, - 27, - 25, - 25, - 27, - 27, - 25 - ], - "z": [ - 10, - 10, - 10, - 10, - 11.5, - 11.5, - 11.5, - 11.5 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 6, - 6, - 7, - 7, - 6, - 6, - 7, - 7 - ], - "y": [ - 10, - 15, - 15, - 10, - 10, - 15, - 15, - 10 - ], - "z": [ - 1, - 1, - 1, - 1, - 3, - 3, - 3, - 3 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 6, - 6, - 7, - 7, - 6, - 6, - 7, - 7 - ], - "y": [ - 10, - 15, - 15, - 10, - 10, - 15, - 15, - 10 - ], - "z": [ - 4, - 4, - 4, - 4, - 4.5, - 4.5, - 4.5, - 4.5 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 6, - 6, - 7, - 7, - 6, - 6, - 7, - 7 - ], - "y": [ - 10, - 15, - 15, - 10, - 10, - 15, - 15, - 10 - ], - "z": [ - 10, - 10, - 10, - 10, - 11.5, - 11.5, - 11.5, - 11.5 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 6, - 6, - 7, - 7, - 6, - 6, - 7, - 7 - ], - "y": [ - 25, - 27, - 27, - 25, - 25, - 27, - 27, - 25 - ], - "z": [ - 1, - 1, - 1, - 1, - 3, - 3, - 3, - 3 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 6, - 6, - 7, - 7, - 6, - 6, - 7, - 7 - ], - "y": [ - 25, - 27, - 27, - 25, - 25, - 27, - 27, - 25 - ], - "z": [ - 4, - 4, - 4, - 4, - 4.5, - 4.5, - 4.5, - 4.5 - ], - "type": "mesh3d" - }, - { - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "x": [ - 6, - 6, - 7, - 7, - 6, - 6, - 7, - 7 - ], - "y": [ - 25, - 27, - 27, - 25, - 25, - 27, - 27, - 25 - ], - "z": [ - 10, - 10, - 10, - 10, - 11.5, - 11.5, - 11.5, - 11.5 - ], - "type": "mesh3d" - } - ], - "layout": { - "scene": { - "xaxis": { - "title": { - "text": "x" - } - }, - "yaxis": { - "title": { - "text": "y" - } - }, - "zaxis": { - "title": { - "text": "z" - } - } - }, - "template": { - "data": { - "histogram2dcontour": [ - { - "type": "histogram2dcontour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "choropleth": [ - { - "type": "choropleth", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "histogram2d": [ - { - "type": "histogram2d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmap": [ - { - "type": "heatmap", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmapgl": [ - { - "type": "heatmapgl", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "contourcarpet": [ - { - "type": "contourcarpet", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "contour": [ - { - "type": "contour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "surface": [ - { - "type": "surface", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "mesh3d": [ - { - "type": "mesh3d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "scatter": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scatter" - } - ], - "parcoords": [ - { - "type": "parcoords", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolargl": [ - { - "type": "scatterpolargl", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "bar": [ - { - "error_x": { - "color": "#f2f5fa" - }, - "error_y": { - "color": "#f2f5fa" - }, - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "bar" - } - ], - "scattergeo": [ - { - "type": "scattergeo", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolar": [ - { - "type": "scatterpolar", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "histogram": [ - { - "marker": { - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "histogram" - } - ], - "scattergl": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scattergl" - } - ], - "scatter3d": [ - { - "type": "scatter3d", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattermapbox": [ - { - "type": "scattermapbox", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterternary": [ - { - "type": "scatterternary", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattercarpet": [ - { - "type": "scattercarpet", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "carpet": [ - { - "aaxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "baxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "type": "carpet" - } - ], - "table": [ - { - "cells": { - "fill": { - "color": "#506784" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "header": { - "fill": { - "color": "#2a3f5f" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "type": "table" - } - ], - "barpolar": [ - { - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "barpolar" - } - ], - "pie": [ - { - "automargin": true, - "type": "pie" - } - ] - }, - "layout": { - "autotypenumbers": "strict", - "colorway": [ - "#636efa", - "#EF553B", - "#00cc96", - "#ab63fa", - "#FFA15A", - "#19d3f3", - "#FF6692", - "#B6E880", - "#FF97FF", - "#FECB52" - ], - "font": { - "color": "#f2f5fa" - }, - "hovermode": "closest", - "hoverlabel": { - "align": "left" - }, - "paper_bgcolor": "rgb(17,17,17)", - "plot_bgcolor": "rgb(17,17,17)", - "polar": { - "bgcolor": "rgb(17,17,17)", - "angularaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "radialaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "ternary": { - "bgcolor": "rgb(17,17,17)", - "aaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "baxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "caxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "coloraxis": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "colorscale": { - "sequential": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "sequentialminus": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "diverging": [ - [ - 0, - "#8e0152" - ], - [ - 0.1, - "#c51b7d" - ], - [ - 0.2, - "#de77ae" - ], - [ - 0.3, - "#f1b6da" - ], - [ - 0.4, - "#fde0ef" - ], - [ - 0.5, - "#f7f7f7" - ], - [ - 0.6, - "#e6f5d0" - ], - [ - 0.7, - "#b8e186" - ], - [ - 0.8, - "#7fbc41" - ], - [ - 0.9, - "#4d9221" - ], - [ - 1, - "#276419" - ] - ] - }, - "xaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "yaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "scene": { - "xaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "yaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "zaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - } - }, - "shapedefaults": { - "line": { - "color": "#f2f5fa" - } - }, - "annotationdefaults": { - "arrowcolor": "#f2f5fa", - "arrowhead": 0, - "arrowwidth": 1 - }, - "geo": { - "bgcolor": "rgb(17,17,17)", - "landcolor": "rgb(17,17,17)", - "subunitcolor": "#506784", - "showland": true, - "showlakes": true, - "lakecolor": "rgb(17,17,17)" - }, - "title": { - "x": 0.05 - }, - "updatemenudefaults": { - "bgcolor": "#506784", - "borderwidth": 0 - }, - "sliderdefaults": { - "bgcolor": "#C8D4E3", - "borderwidth": 1, - "bordercolor": "rgb(17,17,17)", - "tickwidth": 0 - }, - "mapbox": { - "style": "dark" - } - } - }, - "title": { - "text": "Complex event in 3D" - } - }, - "config": { - "plotlyServerURL": "https://plot.ly" - } - }, - "text/html": "
" - }, - "metadata": {}, - "output_type": "display_data" - } - ], "source": [ "# extend previous event by 3rd dimension\n", "z = Continuous(\"z\")\n", @@ -4659,7 +534,8 @@ "start_time": "2024-04-02T10:44:50.631387Z" } }, - "id": "da2b51a986fa9d05" + "id": "da2b51a986fa9d05", + "outputs": [] }, { "cell_type": "markdown", @@ -4685,937 +561,6 @@ }, { "cell_type": "code", - "outputs": [ - { - "data": { - "application/vnd.plotly.v1+json": { - "data": [ - { - "fill": "toself", - "legendgroup": "139948440077312", - "line": { - "color": "#636EFA" - }, - "mode": "lines", - "name": "Event", - "showlegend": true, - "x": [ - -1, - -1, - 0, - 0, - -1, - null, - 1, - 1, - 2, - 2, - 1, - null - ], - "y": [ - -1, - 2, - 2, - -1, - -1, - null, - -1, - 2, - 2, - -1, - -1, - null - ], - "type": "scatter" - }, - { - "fill": "toself", - "legendgroup": "139948440077312", - "line": { - "color": "#636EFA" - }, - "mode": "lines", - "name": "Event", - "showlegend": false, - "x": [ - 0, - 0, - 1, - 1, - 0, - null, - 0, - 0, - 1, - 1, - 0, - null - ], - "y": [ - -1, - 0, - 0, - -1, - -1, - null, - 1, - 2, - 2, - 1, - 1, - null - ], - "type": "scatter" - } - ], - "layout": { - "xaxis": { - "title": { - "text": "x" - } - }, - "yaxis": { - "title": { - "text": "y" - } - }, - "template": { - "data": { - "histogram2dcontour": [ - { - "type": "histogram2dcontour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "choropleth": [ - { - "type": "choropleth", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "histogram2d": [ - { - "type": "histogram2d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmap": [ - { - "type": "heatmap", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmapgl": [ - { - "type": "heatmapgl", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "contourcarpet": [ - { - "type": "contourcarpet", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "contour": [ - { - "type": "contour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "surface": [ - { - "type": "surface", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "mesh3d": [ - { - "type": "mesh3d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "scatter": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scatter" - } - ], - "parcoords": [ - { - "type": "parcoords", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolargl": [ - { - "type": "scatterpolargl", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "bar": [ - { - "error_x": { - "color": "#f2f5fa" - }, - "error_y": { - "color": "#f2f5fa" - }, - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "bar" - } - ], - "scattergeo": [ - { - "type": "scattergeo", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolar": [ - { - "type": "scatterpolar", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "histogram": [ - { - "marker": { - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "histogram" - } - ], - "scattergl": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scattergl" - } - ], - "scatter3d": [ - { - "type": "scatter3d", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattermapbox": [ - { - "type": "scattermapbox", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterternary": [ - { - "type": "scatterternary", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattercarpet": [ - { - "type": "scattercarpet", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "carpet": [ - { - "aaxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "baxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "type": "carpet" - } - ], - "table": [ - { - "cells": { - "fill": { - "color": "#506784" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "header": { - "fill": { - "color": "#2a3f5f" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "type": "table" - } - ], - "barpolar": [ - { - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "barpolar" - } - ], - "pie": [ - { - "automargin": true, - "type": "pie" - } - ] - }, - "layout": { - "autotypenumbers": "strict", - "colorway": [ - "#636efa", - "#EF553B", - "#00cc96", - "#ab63fa", - "#FFA15A", - "#19d3f3", - "#FF6692", - "#B6E880", - "#FF97FF", - "#FECB52" - ], - "font": { - "color": "#f2f5fa" - }, - "hovermode": "closest", - "hoverlabel": { - "align": "left" - }, - "paper_bgcolor": "rgb(17,17,17)", - "plot_bgcolor": "rgb(17,17,17)", - "polar": { - "bgcolor": "rgb(17,17,17)", - "angularaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "radialaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "ternary": { - "bgcolor": "rgb(17,17,17)", - "aaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "baxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "caxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "coloraxis": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "colorscale": { - "sequential": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "sequentialminus": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "diverging": [ - [ - 0, - "#8e0152" - ], - [ - 0.1, - "#c51b7d" - ], - [ - 0.2, - "#de77ae" - ], - [ - 0.3, - "#f1b6da" - ], - [ - 0.4, - "#fde0ef" - ], - [ - 0.5, - "#f7f7f7" - ], - [ - 0.6, - "#e6f5d0" - ], - [ - 0.7, - "#b8e186" - ], - [ - 0.8, - "#7fbc41" - ], - [ - 0.9, - "#4d9221" - ], - [ - 1, - "#276419" - ] - ] - }, - "xaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "yaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "scene": { - "xaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "yaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "zaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - } - }, - "shapedefaults": { - "line": { - "color": "#f2f5fa" - } - }, - "annotationdefaults": { - "arrowcolor": "#f2f5fa", - "arrowhead": 0, - "arrowwidth": 1 - }, - "geo": { - "bgcolor": "rgb(17,17,17)", - "landcolor": "rgb(17,17,17)", - "subunitcolor": "#506784", - "showland": true, - "showlakes": true, - "lakecolor": "rgb(17,17,17)" - }, - "title": { - "x": 0.05 - }, - "updatemenudefaults": { - "bgcolor": "#506784", - "borderwidth": 0 - }, - "sliderdefaults": { - "bgcolor": "#C8D4E3", - "borderwidth": 1, - "bordercolor": "rgb(17,17,17)", - "tickwidth": 0 - }, - "mapbox": { - "style": "dark" - } - } - } - }, - "config": { - "plotlyServerURL": "https://plot.ly" - } - }, - "text/html": "
" - }, - "metadata": {}, - "output_type": "display_data" - } - ], "source": [ "event = Event({x: portion.open(0, 1), y: portion.open(0, 1)})\n", "complement = event.complement()\n", @@ -5632,7 +577,8 @@ } }, "id": "97f6f80a61c8abaf", - "execution_count": 60 + "execution_count": 60, + "outputs": [] }, { "cell_type": "markdown", @@ -5654,1346 +600,6 @@ }, { "cell_type": "code", - "outputs": [ - { - "data": { - "application/vnd.plotly.v1+json": { - "data": [ - { - "color": "#636EFA", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139948440078272", - "name": "Event", - "showlegend": true, - "x": [ - -1, - -1, - 0, - 0, - -1, - -1, - 0, - 0 - ], - "y": [ - -1, - 2, - 2, - -1, - -1, - 2, - 2, - -1 - ], - "z": [ - -1, - -1, - -1, - -1, - 2, - 2, - 2, - 2 - ], - "type": "mesh3d" - }, - { - "color": "#636EFA", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139948440078272", - "name": "Event", - "showlegend": false, - "x": [ - 1, - 1, - 2, - 2, - 1, - 1, - 2, - 2 - ], - "y": [ - -1, - 2, - 2, - -1, - -1, - 2, - 2, - -1 - ], - "z": [ - -1, - -1, - -1, - -1, - 2, - 2, - 2, - 2 - ], - "type": "mesh3d" - }, - { - "color": "#636EFA", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139948440078272", - "name": "Event", - "showlegend": false, - "x": [ - 0, - 0, - 1, - 1, - 0, - 0, - 1, - 1 - ], - "y": [ - -1, - 0, - 0, - -1, - -1, - 0, - 0, - -1 - ], - "z": [ - -1, - -1, - -1, - -1, - 2, - 2, - 2, - 2 - ], - "type": "mesh3d" - }, - { - "color": "#636EFA", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139948440078272", - "name": "Event", - "showlegend": false, - "x": [ - 0, - 0, - 1, - 1, - 0, - 0, - 1, - 1 - ], - "y": [ - 1, - 2, - 2, - 1, - 1, - 2, - 2, - 1 - ], - "z": [ - -1, - -1, - -1, - -1, - 2, - 2, - 2, - 2 - ], - "type": "mesh3d" - }, - { - "color": "#636EFA", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139948440078272", - "name": "Event", - "showlegend": false, - "x": [ - 0, - 0, - 1, - 1, - 0, - 0, - 1, - 1 - ], - "y": [ - 0, - 1, - 1, - 0, - 0, - 1, - 1, - 0 - ], - "z": [ - -1, - -1, - -1, - -1, - 0, - 0, - 0, - 0 - ], - "type": "mesh3d" - }, - { - "color": "#636EFA", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139948440078272", - "name": "Event", - "showlegend": false, - "x": [ - 0, - 0, - 1, - 1, - 0, - 0, - 1, - 1 - ], - "y": [ - 0, - 1, - 1, - 0, - 0, - 1, - 1, - 0 - ], - "z": [ - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2 - ], - "type": "mesh3d" - } - ], - "layout": { - "scene": { - "xaxis": { - "title": { - "text": "x" - } - }, - "yaxis": { - "title": { - "text": "y" - } - }, - "zaxis": { - "title": { - "text": "z" - } - } - }, - "template": { - "data": { - "histogram2dcontour": [ - { - "type": "histogram2dcontour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "choropleth": [ - { - "type": "choropleth", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "histogram2d": [ - { - "type": "histogram2d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmap": [ - { - "type": "heatmap", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmapgl": [ - { - "type": "heatmapgl", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "contourcarpet": [ - { - "type": "contourcarpet", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "contour": [ - { - "type": "contour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "surface": [ - { - "type": "surface", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "mesh3d": [ - { - "type": "mesh3d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "scatter": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scatter" - } - ], - "parcoords": [ - { - "type": "parcoords", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolargl": [ - { - "type": "scatterpolargl", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "bar": [ - { - "error_x": { - "color": "#f2f5fa" - }, - "error_y": { - "color": "#f2f5fa" - }, - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "bar" - } - ], - "scattergeo": [ - { - "type": "scattergeo", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolar": [ - { - "type": "scatterpolar", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "histogram": [ - { - "marker": { - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "histogram" - } - ], - "scattergl": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scattergl" - } - ], - "scatter3d": [ - { - "type": "scatter3d", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattermapbox": [ - { - "type": "scattermapbox", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterternary": [ - { - "type": "scatterternary", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattercarpet": [ - { - "type": "scattercarpet", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "carpet": [ - { - "aaxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "baxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "type": "carpet" - } - ], - "table": [ - { - "cells": { - "fill": { - "color": "#506784" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "header": { - "fill": { - "color": "#2a3f5f" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "type": "table" - } - ], - "barpolar": [ - { - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "barpolar" - } - ], - "pie": [ - { - "automargin": true, - "type": "pie" - } - ] - }, - "layout": { - "autotypenumbers": "strict", - "colorway": [ - "#636efa", - "#EF553B", - "#00cc96", - "#ab63fa", - "#FFA15A", - "#19d3f3", - "#FF6692", - "#B6E880", - "#FF97FF", - "#FECB52" - ], - "font": { - "color": "#f2f5fa" - }, - "hovermode": "closest", - "hoverlabel": { - "align": "left" - }, - "paper_bgcolor": "rgb(17,17,17)", - "plot_bgcolor": "rgb(17,17,17)", - "polar": { - "bgcolor": "rgb(17,17,17)", - "angularaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "radialaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "ternary": { - "bgcolor": "rgb(17,17,17)", - "aaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "baxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "caxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "coloraxis": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "colorscale": { - "sequential": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "sequentialminus": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "diverging": [ - [ - 0, - "#8e0152" - ], - [ - 0.1, - "#c51b7d" - ], - [ - 0.2, - "#de77ae" - ], - [ - 0.3, - "#f1b6da" - ], - [ - 0.4, - "#fde0ef" - ], - [ - 0.5, - "#f7f7f7" - ], - [ - 0.6, - "#e6f5d0" - ], - [ - 0.7, - "#b8e186" - ], - [ - 0.8, - "#7fbc41" - ], - [ - 0.9, - "#4d9221" - ], - [ - 1, - "#276419" - ] - ] - }, - "xaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "yaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "scene": { - "xaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "yaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "zaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - } - }, - "shapedefaults": { - "line": { - "color": "#f2f5fa" - } - }, - "annotationdefaults": { - "arrowcolor": "#f2f5fa", - "arrowhead": 0, - "arrowwidth": 1 - }, - "geo": { - "bgcolor": "rgb(17,17,17)", - "landcolor": "rgb(17,17,17)", - "subunitcolor": "#506784", - "showland": true, - "showlakes": true, - "lakecolor": "rgb(17,17,17)" - }, - "title": { - "x": 0.05 - }, - "updatemenudefaults": { - "bgcolor": "#506784", - "borderwidth": 0 - }, - "sliderdefaults": { - "bgcolor": "#C8D4E3", - "borderwidth": 1, - "bordercolor": "rgb(17,17,17)", - "tickwidth": 0 - }, - "mapbox": { - "style": "dark" - } - } - } - }, - "config": { - "plotlyServerURL": "https://plot.ly" - } - }, - "text/html": "
" - }, - "metadata": {}, - "output_type": "display_data" - } - ], "source": [ "event = Event({x: portion.closed(0, 1),\n", " y: portion.closed(0, 1),\n", @@ -7014,7 +620,8 @@ } }, "id": "9e47b2f884e4c9dd", - "execution_count": 61 + "execution_count": 61, + "outputs": [] }, { "cell_type": "markdown", @@ -7028,1266 +635,6 @@ }, { "cell_type": "code", - "outputs": [ - { - "data": { - "application/vnd.plotly.v1+json": { - "data": [ - { - "color": "#636EFA", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139948440078848", - "name": "Event", - "showlegend": true, - "x": [ - -1, - -1, - 0, - 0, - -1, - -1, - 0, - 0 - ], - "y": [ - -1, - 1, - 1, - -1, - -1, - 1, - 1, - -1 - ], - "z": [ - -1, - -1, - -1, - -1, - 2, - 2, - 2, - 2 - ], - "type": "mesh3d" - }, - { - "color": "#636EFA", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139948440078848", - "name": "Event", - "showlegend": false, - "x": [ - 1, - 1, - 2, - 2, - 1, - 1, - 2, - 2 - ], - "y": [ - -1, - 1, - 1, - -1, - -1, - 1, - 1, - -1 - ], - "z": [ - -1, - -1, - -1, - -1, - 2, - 2, - 2, - 2 - ], - "type": "mesh3d" - }, - { - "color": "#636EFA", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139948440078848", - "name": "Event", - "showlegend": false, - "x": [ - 0, - 0, - 1, - 1, - 0, - 0, - 1, - 1 - ], - "y": [ - -1, - 0, - 0, - -1, - -1, - 0, - 0, - -1 - ], - "z": [ - -1, - -1, - -1, - -1, - 2, - 2, - 2, - 2 - ], - "type": "mesh3d" - }, - { - "color": "#636EFA", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139948440078848", - "name": "Event", - "showlegend": false, - "x": [ - 0, - 0, - 1, - 1, - 0, - 0, - 1, - 1 - ], - "y": [ - 0, - 1, - 1, - 0, - 0, - 1, - 1, - 0 - ], - "z": [ - -1, - -1, - -1, - -1, - 0, - 0, - 0, - 0 - ], - "type": "mesh3d" - }, - { - "color": "#636EFA", - "flatshading": true, - "i": [ - 7, - 0, - 0, - 0, - 4, - 4, - 6, - 6, - 4, - 0, - 3, - 2 - ], - "j": [ - 3, - 4, - 1, - 2, - 5, - 6, - 5, - 2, - 0, - 1, - 6, - 3 - ], - "k": [ - 0, - 7, - 2, - 3, - 6, - 7, - 1, - 1, - 5, - 5, - 7, - 6 - ], - "legendgroup": "139948440078848", - "name": "Event", - "showlegend": false, - "x": [ - 0, - 0, - 1, - 1, - 0, - 0, - 1, - 1 - ], - "y": [ - 0, - 1, - 1, - 0, - 0, - 1, - 1, - 0 - ], - "z": [ - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2 - ], - "type": "mesh3d" - } - ], - "layout": { - "scene": { - "xaxis": { - "title": { - "text": "x" - } - }, - "yaxis": { - "title": { - "text": "y" - } - }, - "zaxis": { - "title": { - "text": "z" - } - } - }, - "template": { - "data": { - "histogram2dcontour": [ - { - "type": "histogram2dcontour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "choropleth": [ - { - "type": "choropleth", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "histogram2d": [ - { - "type": "histogram2d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmap": [ - { - "type": "heatmap", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmapgl": [ - { - "type": "heatmapgl", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "contourcarpet": [ - { - "type": "contourcarpet", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "contour": [ - { - "type": "contour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "surface": [ - { - "type": "surface", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "mesh3d": [ - { - "type": "mesh3d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "scatter": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scatter" - } - ], - "parcoords": [ - { - "type": "parcoords", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolargl": [ - { - "type": "scatterpolargl", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "bar": [ - { - "error_x": { - "color": "#f2f5fa" - }, - "error_y": { - "color": "#f2f5fa" - }, - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "bar" - } - ], - "scattergeo": [ - { - "type": "scattergeo", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolar": [ - { - "type": "scatterpolar", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "histogram": [ - { - "marker": { - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "histogram" - } - ], - "scattergl": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scattergl" - } - ], - "scatter3d": [ - { - "type": "scatter3d", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattermapbox": [ - { - "type": "scattermapbox", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterternary": [ - { - "type": "scatterternary", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattercarpet": [ - { - "type": "scattercarpet", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "carpet": [ - { - "aaxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "baxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "type": "carpet" - } - ], - "table": [ - { - "cells": { - "fill": { - "color": "#506784" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "header": { - "fill": { - "color": "#2a3f5f" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "type": "table" - } - ], - "barpolar": [ - { - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "barpolar" - } - ], - "pie": [ - { - "automargin": true, - "type": "pie" - } - ] - }, - "layout": { - "autotypenumbers": "strict", - "colorway": [ - "#636efa", - "#EF553B", - "#00cc96", - "#ab63fa", - "#FFA15A", - "#19d3f3", - "#FF6692", - "#B6E880", - "#FF97FF", - "#FECB52" - ], - "font": { - "color": "#f2f5fa" - }, - "hovermode": "closest", - "hoverlabel": { - "align": "left" - }, - "paper_bgcolor": "rgb(17,17,17)", - "plot_bgcolor": "rgb(17,17,17)", - "polar": { - "bgcolor": "rgb(17,17,17)", - "angularaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "radialaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "ternary": { - "bgcolor": "rgb(17,17,17)", - "aaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "baxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "caxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "coloraxis": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "colorscale": { - "sequential": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "sequentialminus": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "diverging": [ - [ - 0, - "#8e0152" - ], - [ - 0.1, - "#c51b7d" - ], - [ - 0.2, - "#de77ae" - ], - [ - 0.3, - "#f1b6da" - ], - [ - 0.4, - "#fde0ef" - ], - [ - 0.5, - "#f7f7f7" - ], - [ - 0.6, - "#e6f5d0" - ], - [ - 0.7, - "#b8e186" - ], - [ - 0.8, - "#7fbc41" - ], - [ - 0.9, - "#4d9221" - ], - [ - 1, - "#276419" - ] - ] - }, - "xaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "yaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "scene": { - "xaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "yaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "zaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - } - }, - "shapedefaults": { - "line": { - "color": "#f2f5fa" - } - }, - "annotationdefaults": { - "arrowcolor": "#f2f5fa", - "arrowhead": 0, - "arrowwidth": 1 - }, - "geo": { - "bgcolor": "rgb(17,17,17)", - "landcolor": "rgb(17,17,17)", - "subunitcolor": "#506784", - "showland": true, - "showlakes": true, - "lakecolor": "rgb(17,17,17)" - }, - "title": { - "x": 0.05 - }, - "updatemenudefaults": { - "bgcolor": "#506784", - "borderwidth": 0 - }, - "sliderdefaults": { - "bgcolor": "#C8D4E3", - "borderwidth": 1, - "bordercolor": "rgb(17,17,17)", - "tickwidth": 0 - }, - "mapbox": { - "style": "dark" - } - } - } - }, - "config": { - "plotlyServerURL": "https://plot.ly" - } - }, - "text/html": "
" - }, - "metadata": {}, - "output_type": "display_data" - } - ], "source": [ "cut_result = result.intersection(Event({y: portion.closed(-1, 1)}))\n", "fig = go.Figure(cut_result.plot(), cut_result.plotly_layout())\n", @@ -8301,7 +648,8 @@ } }, "id": "a4ef759878e21dd5", - "execution_count": 62 + "execution_count": 62, + "outputs": [] }, { "cell_type": "markdown", @@ -8319,967 +667,6 @@ }, { "cell_type": "code", - "outputs": [ - { - "data": { - "application/vnd.plotly.v1+json": { - "data": [ - { - "fill": "toself", - "legendgroup": "139948440374960", - "line": { - "color": "#636EFA" - }, - "mode": "lines", - "name": "Event", - "showlegend": true, - "x": [ - 0.0, - 0.0, - 5.0, - 5.0, - 0.0, - null - ], - "y": [ - 6.5, - 7.0, - 7.0, - 6.5, - 6.5, - null - ], - "type": "scatter" - }, - { - "fill": "toself", - "legendgroup": "139948440374960", - "line": { - "color": "#636EFA" - }, - "mode": "lines", - "name": "Event", - "showlegend": false, - "x": [ - 5.0, - 5.0, - 6.0, - 6.0, - 5.0, - null - ], - "y": [ - 6.3, - 7.0, - 7.0, - 6.3, - 6.3, - null - ], - "type": "scatter" - }, - { - "fill": "toself", - "legendgroup": "139948440374960", - "line": { - "color": "#636EFA" - }, - "mode": "lines", - "name": "Event", - "showlegend": false, - "x": [ - 0.0, - 0.0, - 0.5, - 0.5, - 0.0, - null - ], - "y": [ - 0.0, - 6.5, - 6.5, - 0.0, - 0.0, - null - ], - "type": "scatter" - }, - { - "fill": "toself", - "legendgroup": "139948440374960", - "line": { - "color": "#636EFA" - }, - "mode": "lines", - "name": "Event", - "showlegend": false, - "x": [ - 2, - 2, - 4, - 4, - 2, - null - ], - "y": [ - 3, - 5, - 5, - 3, - 3, - null - ], - "type": "scatter" - } - ], - "layout": { - "xaxis": { - "title": { - "text": "x" - } - }, - "yaxis": { - "title": { - "text": "y" - } - }, - "template": { - "data": { - "histogram2dcontour": [ - { - "type": "histogram2dcontour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "choropleth": [ - { - "type": "choropleth", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "histogram2d": [ - { - "type": "histogram2d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmap": [ - { - "type": "heatmap", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmapgl": [ - { - "type": "heatmapgl", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "contourcarpet": [ - { - "type": "contourcarpet", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "contour": [ - { - "type": "contour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "surface": [ - { - "type": "surface", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "mesh3d": [ - { - "type": "mesh3d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "scatter": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scatter" - } - ], - "parcoords": [ - { - "type": "parcoords", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolargl": [ - { - "type": "scatterpolargl", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "bar": [ - { - "error_x": { - "color": "#f2f5fa" - }, - "error_y": { - "color": "#f2f5fa" - }, - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "bar" - } - ], - "scattergeo": [ - { - "type": "scattergeo", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolar": [ - { - "type": "scatterpolar", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "histogram": [ - { - "marker": { - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "histogram" - } - ], - "scattergl": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scattergl" - } - ], - "scatter3d": [ - { - "type": "scatter3d", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattermapbox": [ - { - "type": "scattermapbox", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterternary": [ - { - "type": "scatterternary", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattercarpet": [ - { - "type": "scattercarpet", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "carpet": [ - { - "aaxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "baxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "type": "carpet" - } - ], - "table": [ - { - "cells": { - "fill": { - "color": "#506784" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "header": { - "fill": { - "color": "#2a3f5f" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "type": "table" - } - ], - "barpolar": [ - { - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "barpolar" - } - ], - "pie": [ - { - "automargin": true, - "type": "pie" - } - ] - }, - "layout": { - "autotypenumbers": "strict", - "colorway": [ - "#636efa", - "#EF553B", - "#00cc96", - "#ab63fa", - "#FFA15A", - "#19d3f3", - "#FF6692", - "#B6E880", - "#FF97FF", - "#FECB52" - ], - "font": { - "color": "#f2f5fa" - }, - "hovermode": "closest", - "hoverlabel": { - "align": "left" - }, - "paper_bgcolor": "rgb(17,17,17)", - "plot_bgcolor": "rgb(17,17,17)", - "polar": { - "bgcolor": "rgb(17,17,17)", - "angularaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "radialaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "ternary": { - "bgcolor": "rgb(17,17,17)", - "aaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "baxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "caxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "coloraxis": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "colorscale": { - "sequential": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "sequentialminus": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "diverging": [ - [ - 0, - "#8e0152" - ], - [ - 0.1, - "#c51b7d" - ], - [ - 0.2, - "#de77ae" - ], - [ - 0.3, - "#f1b6da" - ], - [ - 0.4, - "#fde0ef" - ], - [ - 0.5, - "#f7f7f7" - ], - [ - 0.6, - "#e6f5d0" - ], - [ - 0.7, - "#b8e186" - ], - [ - 0.8, - "#7fbc41" - ], - [ - 0.9, - "#4d9221" - ], - [ - 1, - "#276419" - ] - ] - }, - "xaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "yaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "scene": { - "xaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "yaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "zaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - } - }, - "shapedefaults": { - "line": { - "color": "#f2f5fa" - } - }, - "annotationdefaults": { - "arrowcolor": "#f2f5fa", - "arrowhead": 0, - "arrowwidth": 1 - }, - "geo": { - "bgcolor": "rgb(17,17,17)", - "landcolor": "rgb(17,17,17)", - "subunitcolor": "#506784", - "showland": true, - "showlakes": true, - "lakecolor": "rgb(17,17,17)" - }, - "title": { - "x": 0.05 - }, - "updatemenudefaults": { - "bgcolor": "#506784", - "borderwidth": 0 - }, - "sliderdefaults": { - "bgcolor": "#C8D4E3", - "borderwidth": 1, - "bordercolor": "rgb(17,17,17)", - "tickwidth": 0 - }, - "mapbox": { - "style": "dark" - } - } - } - }, - "config": { - "plotlyServerURL": "https://plot.ly" - } - }, - "text/html": "
" - }, - "metadata": {}, - "output_type": "display_data" - } - ], "source": [ "kitchen = Event({x: portion.closed(0, 6.6), y: portion.closed(0, 7)})\n", "refrigerator = Event({x: portion.closed(5, 6), y: portion.closed(6.3, 7)})\n", @@ -9300,7 +687,8 @@ } }, "id": "b8916038b2521a38", - "execution_count": 63 + "execution_count": 63, + "outputs": [] }, { "cell_type": "markdown", @@ -9314,991 +702,6 @@ }, { "cell_type": "code", - "outputs": [ - { - "data": { - "application/vnd.plotly.v1+json": { - "data": [ - { - "fill": "toself", - "legendgroup": "139948440371888", - "line": { - "color": "#636EFA" - }, - "mode": "lines", - "name": "Event", - "showlegend": true, - "x": [ - 6.0, - 6.0, - 6.6, - 6.6, - 6.0, - null - ], - "y": [ - 0.0, - 7.0, - 7.0, - 0.0, - 0.0, - null - ], - "type": "scatter" - }, - { - "fill": "toself", - "legendgroup": "139948440371888", - "line": { - "color": "#636EFA" - }, - "mode": "lines", - "name": "Event", - "showlegend": false, - "x": [ - 0.5, - 0.5, - 2.0, - 2.0, - 0.5, - null, - 4.0, - 4.0, - 5.0, - 5.0, - 4.0, - null - ], - "y": [ - 0.0, - 6.5, - 6.5, - 0.0, - 0.0, - null, - 0.0, - 6.5, - 6.5, - 0.0, - 0.0, - null - ], - "type": "scatter" - }, - { - "fill": "toself", - "legendgroup": "139948440371888", - "line": { - "color": "#636EFA" - }, - "mode": "lines", - "name": "Event", - "showlegend": false, - "x": [ - 5.0, - 5.0, - 6.0, - 6.0, - 5.0, - null - ], - "y": [ - 0.0, - 6.3, - 6.3, - 0.0, - 0.0, - null - ], - "type": "scatter" - }, - { - "fill": "toself", - "legendgroup": "139948440371888", - "line": { - "color": "#636EFA" - }, - "mode": "lines", - "name": "Event", - "showlegend": false, - "x": [ - 2, - 2, - 4, - 4, - 2, - null, - 2.0, - 2.0, - 4.0, - 4.0, - 2.0, - null - ], - "y": [ - 0, - 3, - 3, - 0, - 0, - null, - 5.0, - 6.5, - 6.5, - 5.0, - 5.0, - null - ], - "type": "scatter" - } - ], - "layout": { - "xaxis": { - "title": { - "text": "x" - } - }, - "yaxis": { - "title": { - "text": "y" - } - }, - "template": { - "data": { - "histogram2dcontour": [ - { - "type": "histogram2dcontour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "choropleth": [ - { - "type": "choropleth", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "histogram2d": [ - { - "type": "histogram2d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmap": [ - { - "type": "heatmap", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "heatmapgl": [ - { - "type": "heatmapgl", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "contourcarpet": [ - { - "type": "contourcarpet", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "contour": [ - { - "type": "contour", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "surface": [ - { - "type": "surface", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - }, - "colorscale": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ] - } - ], - "mesh3d": [ - { - "type": "mesh3d", - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - ], - "scatter": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scatter" - } - ], - "parcoords": [ - { - "type": "parcoords", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolargl": [ - { - "type": "scatterpolargl", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "bar": [ - { - "error_x": { - "color": "#f2f5fa" - }, - "error_y": { - "color": "#f2f5fa" - }, - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "bar" - } - ], - "scattergeo": [ - { - "type": "scattergeo", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterpolar": [ - { - "type": "scatterpolar", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "histogram": [ - { - "marker": { - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "histogram" - } - ], - "scattergl": [ - { - "marker": { - "line": { - "color": "#283442" - } - }, - "type": "scattergl" - } - ], - "scatter3d": [ - { - "type": "scatter3d", - "line": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattermapbox": [ - { - "type": "scattermapbox", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scatterternary": [ - { - "type": "scatterternary", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "scattercarpet": [ - { - "type": "scattercarpet", - "marker": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - } - } - ], - "carpet": [ - { - "aaxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "baxis": { - "endlinecolor": "#A2B1C6", - "gridcolor": "#506784", - "linecolor": "#506784", - "minorgridcolor": "#506784", - "startlinecolor": "#A2B1C6" - }, - "type": "carpet" - } - ], - "table": [ - { - "cells": { - "fill": { - "color": "#506784" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "header": { - "fill": { - "color": "#2a3f5f" - }, - "line": { - "color": "rgb(17,17,17)" - } - }, - "type": "table" - } - ], - "barpolar": [ - { - "marker": { - "line": { - "color": "rgb(17,17,17)", - "width": 0.5 - }, - "pattern": { - "fillmode": "overlay", - "size": 10, - "solidity": 0.2 - } - }, - "type": "barpolar" - } - ], - "pie": [ - { - "automargin": true, - "type": "pie" - } - ] - }, - "layout": { - "autotypenumbers": "strict", - "colorway": [ - "#636efa", - "#EF553B", - "#00cc96", - "#ab63fa", - "#FFA15A", - "#19d3f3", - "#FF6692", - "#B6E880", - "#FF97FF", - "#FECB52" - ], - "font": { - "color": "#f2f5fa" - }, - "hovermode": "closest", - "hoverlabel": { - "align": "left" - }, - "paper_bgcolor": "rgb(17,17,17)", - "plot_bgcolor": "rgb(17,17,17)", - "polar": { - "bgcolor": "rgb(17,17,17)", - "angularaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "radialaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "ternary": { - "bgcolor": "rgb(17,17,17)", - "aaxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "baxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - }, - "caxis": { - "gridcolor": "#506784", - "linecolor": "#506784", - "ticks": "" - } - }, - "coloraxis": { - "colorbar": { - "outlinewidth": 0, - "ticks": "" - } - }, - "colorscale": { - "sequential": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "sequentialminus": [ - [ - 0.0, - "#0d0887" - ], - [ - 0.1111111111111111, - "#46039f" - ], - [ - 0.2222222222222222, - "#7201a8" - ], - [ - 0.3333333333333333, - "#9c179e" - ], - [ - 0.4444444444444444, - "#bd3786" - ], - [ - 0.5555555555555556, - "#d8576b" - ], - [ - 0.6666666666666666, - "#ed7953" - ], - [ - 0.7777777777777778, - "#fb9f3a" - ], - [ - 0.8888888888888888, - "#fdca26" - ], - [ - 1.0, - "#f0f921" - ] - ], - "diverging": [ - [ - 0, - "#8e0152" - ], - [ - 0.1, - "#c51b7d" - ], - [ - 0.2, - "#de77ae" - ], - [ - 0.3, - "#f1b6da" - ], - [ - 0.4, - "#fde0ef" - ], - [ - 0.5, - "#f7f7f7" - ], - [ - 0.6, - "#e6f5d0" - ], - [ - 0.7, - "#b8e186" - ], - [ - 0.8, - "#7fbc41" - ], - [ - 0.9, - "#4d9221" - ], - [ - 1, - "#276419" - ] - ] - }, - "xaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "yaxis": { - "gridcolor": "#283442", - "linecolor": "#506784", - "ticks": "", - "title": { - "standoff": 15 - }, - "zerolinecolor": "#283442", - "automargin": true, - "zerolinewidth": 2 - }, - "scene": { - "xaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "yaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - }, - "zaxis": { - "backgroundcolor": "rgb(17,17,17)", - "gridcolor": "#506784", - "linecolor": "#506784", - "showbackground": true, - "ticks": "", - "zerolinecolor": "#C8D4E3", - "gridwidth": 2 - } - }, - "shapedefaults": { - "line": { - "color": "#f2f5fa" - } - }, - "annotationdefaults": { - "arrowcolor": "#f2f5fa", - "arrowhead": 0, - "arrowwidth": 1 - }, - "geo": { - "bgcolor": "rgb(17,17,17)", - "landcolor": "rgb(17,17,17)", - "subunitcolor": "#506784", - "showland": true, - "showlakes": true, - "lakecolor": "rgb(17,17,17)" - }, - "title": { - "x": 0.05 - }, - "updatemenudefaults": { - "bgcolor": "#506784", - "borderwidth": 0 - }, - "sliderdefaults": { - "bgcolor": "#C8D4E3", - "borderwidth": 1, - "bordercolor": "rgb(17,17,17)", - "tickwidth": 0 - }, - "mapbox": { - "style": "dark" - } - } - } - }, - "config": { - "plotlyServerURL": "https://plot.ly" - } - }, - "text/html": "
" - }, - "metadata": {}, - "output_type": "display_data" - } - ], "source": [ "free_space = kitchen.difference(occupied_spaces)\n", "fig = go.Figure(free_space.plot(), free_space.plotly_layout())\n", @@ -10312,7 +715,8 @@ } }, "id": "510b80164a41cfc", - "execution_count": 64 + "execution_count": 64, + "outputs": [] }, { "cell_type": "markdown", diff --git a/requirements.txt b/requirements.txt index b1dfed6..063a8bf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,6 @@ -portion -numpy -plotly +portion~=2.4.2 +numpy~=1.26.1 +plotly~=5.20.0 typing_extensions + +sortedcontainers~=2.4.0 \ No newline at end of file diff --git a/src/random_events/interval.py b/src/random_events/interval.py new file mode 100644 index 0000000..b4e7046 --- /dev/null +++ b/src/random_events/interval.py @@ -0,0 +1,179 @@ +import enum +from dataclasses import dataclass +from typing import Set + +from sortedcontainers import SortedSet +from typing_extensions import Self + +from . import sigma_algebra + + +class Bound(enum.Enum): + """ + Enumerates the possible bounds for an interval. + """ + + CLOSED = 0 + """ + Represents a closed bound, i. e. the element is included from the interval. + """ + + OPEN = 1 + """ + Represents an open bound, i. e. the element is excluded in the interval. + """ + + def invert(self): + return Bound.CLOSED if self == Bound.OPEN else Bound.OPEN + + def intersect(self, other: Self) -> Self: + """ + Intersect with another border + + :param other: The other border + :return: The intersection of the two borders + """ + return Bound.OPEN if self == Bound.OPEN or other == Bound.OPEN else Bound.CLOSED + + +@dataclass +class SimpleInterval(sigma_algebra.AbstractSimpleSet): + """ + Represents a simple interval. + """ + + lower: float = 0 + """ + The lower bound of the interval. + """ + + upper: float = 0 + """ + The upper bound of the interval. + """ + + left: Bound = Bound.OPEN + """ + The bound type of the lower bound. + """ + + right: Bound = Bound.OPEN + """ + The bound type of the upper bound. + """ + + def __lt__(self, other: Self): + if self.lower == other.lower: + return self.upper < other.upper + return self.lower < other.lower + + def is_empty(self) -> bool: + return self.lower > self.upper or ( + self.lower == self.upper and (self.left == Bound.OPEN or self.right == Bound.OPEN)) + + def intersection_with(self, other: Self) -> Self: + + # create new limits for the intersection + new_lower = max(self.lower, other.lower) + new_upper = min(self.upper, other.upper) + + # if the new limits are not valid, return an empty interval + if new_lower > new_upper: + return SimpleInterval() + + # create the new left bound + if self.lower == other.lower: + new_left = self.left.intersect(other.left) + else: + new_left = self.left if self.lower > other.lower else other.left + + # create the new right bound + if self.upper == other.upper: + new_right = self.right.intersect(other.right) + else: + new_right = self.right if self.upper < other.upper else other.right + + return SimpleInterval(new_lower, new_upper, new_left, new_right) + + def complement(self) -> SortedSet[Self]: + + # if the interval is empty + if self.is_empty(): + # return the real line + return SortedSet([SimpleInterval(float('-inf'), float('inf'), Bound.OPEN, Bound.OPEN)]) + + # initialize the result + result = SortedSet() + + # if this is the real line + if self.lower == float('-inf') and self.upper == float('inf'): + # return the empty set + return result + + # if the lower bound is not negative infinity + if self.lower > float('-inf'): + # add the interval from minus infinity to the lower bound + result.add(SimpleInterval(float('-inf'), self.lower, Bound.OPEN, self.left.invert())) + + # if the upper bound is not positive infinity + if self.upper < float('inf'): + # add the interval from the upper bound to infinity + result.add(SimpleInterval(self.upper, float('inf'), self.right.invert(), Bound.OPEN)) + + return result + + def contains(self, item: float) -> bool: + return (self.lower < item < self.upper or (self.lower == item and self.left == Bound.CLOSED) or ( + self.upper == item and self.right == Bound.CLOSED)) + + def __hash__(self): + return hash((self.lower, self.upper, self.left, self.right)) + + def non_empty_to_string(self) -> str: + left_bracket = '[' if self.left == Bound.CLOSED else '(' + right_bracket = ']' if self.right == Bound.CLOSED else ')' + return f'{left_bracket}{self.lower}, {self.upper}{right_bracket}' + + def __repr__(self): + return sigma_algebra.AbstractSimpleSet.to_string(self) + + def __str__(self): + return sigma_algebra.AbstractSimpleSet.to_string(self) + + +class Interval(sigma_algebra.AbstractCompositeSet): + + simple_sets: SortedSet[SimpleInterval] + + def simplify(self) -> Self: + + # if the set is empty, return it + if self.is_empty(): + return self + + # initialize the result + result = Interval([self.simple_sets[0]]) + + # iterate over the simple sets + for current_simple_interval in self.simple_sets[1:]: + + # get the last element in the result + last_simple_interval = result.simple_sets[-1] + + # if the borders are connected + if (last_simple_interval.upper > current_simple_interval.lower or + (last_simple_interval.upper == current_simple_interval.lower and not( + last_simple_interval.right == Bound.OPEN and current_simple_interval.left == Bound.OPEN))): + + # extend the upper bound of the last element + last_simple_interval.upper = current_simple_interval.upper + last_simple_interval.right = current_simple_interval.right + else: + + # add the current element to the result + result.simple_sets.add(current_simple_interval) + + return result + + def new_empty_set(self) -> Self: + return Interval() diff --git a/src/random_events/sigma_algebra.py b/src/random_events/sigma_algebra.py new file mode 100644 index 0000000..b597e0a --- /dev/null +++ b/src/random_events/sigma_algebra.py @@ -0,0 +1,386 @@ +import itertools +from abc import abstractmethod +from typing import Tuple + +from typing_extensions import Self, Set, Iterable, Optional +from sortedcontainers import SortedSet + +EMPTY_SET_SYMBOL = "∅" + + +class AbstractSimpleSet: + """ + Abstract class for simple sets. + + Simple sets are sets that can be represented as a single object. + """ + + @abstractmethod + def intersection_with(self, other: Self) -> Self: + """ + Form the intersection of this object with another object. + + :param other: The other SimpleSet + :return: The intersection of this set with the other set + """ + raise NotImplementedError + + @abstractmethod + def complement(self) -> SortedSet[Self]: + """ + :return: The complement of this set as disjoint set of simple sets. + """ + raise NotImplementedError + + @abstractmethod + def is_empty(self) -> bool: + """ + :return: Rather this set is empty or not. + """ + raise NotImplementedError + + @abstractmethod + def contains(self, item) -> bool: + """ + Check if this set contains an item. + :param item: The item to check + :return: Rather if the item is in the set or not + """ + raise NotImplementedError + + @abstractmethod + def __hash__(self): + raise NotImplementedError + + def non_empty_to_string(self) -> str: + """ + :return: A string representation of this set if it is not empty. + """ + raise NotImplementedError + + def difference_with(self, other: Self) -> SortedSet[Self]: + """ + Form the difference of this object with another object. + + :param other: The other SimpleSet + :return: The difference as disjoint set of simple sets. + """ + + # if the intersection is empty + intersection = self.intersection_with(other) + if intersection.is_empty(): + # then the difference is the set itself + return SortedSet([self]) + + # form the complement of the intersection + complement_of_intersection = intersection.complement() + + # for every element in the complement of the intersection + result = SortedSet() + for element in complement_of_intersection: + + # if it intersects with this set + intersection = element.intersection_with(self) + if not intersection.is_empty(): + + # add the intersection to the result + result.add(intersection) + + return result + + def to_string(self): + """ + :return: A string representation of this set. + """ + if self.is_empty(): + return EMPTY_SET_SYMBOL + return self.non_empty_to_string() + + def __str__(self): + return self.to_string() + + @abstractmethod + def __lt__(self, other): + raise NotImplementedError + + +class AbstractCompositeSet: + """ + Abstract class for composite sets. + + AbstractCompositeSet is a set that is composed of a disjoint union of simple sets. + """ + + simple_sets: SortedSet[AbstractSimpleSet] + + def __init__(self, simple_sets: Optional[Iterable[AbstractSimpleSet]] = None): + self.simple_sets = SortedSet(simple_sets) + + @abstractmethod + def simplify(self) -> Self: + """ + Simplify this set into an equivalent, more compact version. + + :return: The simplified set + """ + raise NotImplementedError + + @abstractmethod + def new_empty_set(self) -> Self: + """ + Create a new empty set. + + This method has to be implemented by the subclass and should take over all the relevant attributes to the new + set. + + :return: A new empty set. + """ + raise NotImplementedError + + def union_with(self, other: Self) -> Self: + """ + Form the union of this object with another object. + + :param other: The other set + :return: The union of this set with the other set + """ + result = self.new_empty_set() + result.simple_sets.update(self.simple_sets) + result.simple_sets.update(other.simple_sets) + return result.make_disjoint() + + def __or__(self, other: Self): + return self.union_with(other) + + def intersection_with_simple_set(self, other: AbstractSimpleSet) -> Self: + """ + Form the intersection of this object with a simple set. + + :param other: The simple set + :return: The intersection of this set with the simple set + """ + result = self.new_empty_set() + [result.add_simple_set(simple_set.intersection_with(other)) for simple_set in self.simple_sets] + return result + + def intersection_with(self, other: Self) -> Self: + """ + Form the intersection of this object with another object. + :param other: The other set + :return: The intersection of this set with the other set + """ + result = self.new_empty_set() + [result.simple_sets.update(self.intersection_with_simple_set(other_simple_set).simple_sets) + for other_simple_set in other.simple_sets] + return result + + def __and__(self, other): + return self.intersection_with(other) + + def difference_with_simple_set(self, other: AbstractSimpleSet) -> Self: + """ + Form the difference with another composite set. + :param other: The other set + :return: The difference of this set with the other set + """ + result = self.new_empty_set() + [result.simple_sets.update(simple_set.difference_with(other)) for simple_set in self.simple_sets] + return result.make_disjoint() + + def difference_with(self, other: Self) -> Self: + """ + Form the difference with another composite set. + :param other: The other set + :return: The difference of this set with the other set + """ + + # initialize the result + result = self.new_empty_set() + + # for every simple set in this set + for own_simple_set in self.simple_sets: + + # initialize the current difference + current_difference = self.new_empty_set() + first_iteration = True + + # for every simple set in the other set + for other_simple_set in other.simple_sets: + + # form the element wise difference + difference_with_other_simple_set = own_simple_set.difference_with(other_simple_set) + + # if this is the first iteration + if first_iteration: + # just copy the element wise difference + current_difference.simple_sets.update(difference_with_other_simple_set) + first_iteration = False + continue + + # form the intersection of the current difference with the element wise difference + difference = self.new_empty_set() + difference.simple_sets.update(difference_with_other_simple_set) + current_difference = current_difference.intersection_with(difference) + + # add the current difference to the result + result.simple_sets.update(current_difference.simple_sets) + + return result.make_disjoint() + + def __sub__(self, other): + return self.difference_with(other) + + def complement(self) -> Self: + """ + :return: The complement of this set + """ + result = self.new_empty_set() + first_iteration = True + for simple_set in self.simple_sets: + if first_iteration: + result = simple_set.complement() + first_iteration = False + else: + result = result.intersection_with(simple_set.complement()) + return result.make_disjoint() + + def __invert__(self): + return self.complement() + + def is_empty(self) -> bool: + """ + Check if this set is empty. + """ + return len(self.simple_sets) == 0 + + def contains(self, item) -> bool: + """ + Check if this set contains an item. + :param item: The item to check + :return: Rather if the item is in the set or not + """ + for simple_set in self.simple_sets: + if simple_set.contains(item): + return True + return False + + def __contains__(self, item): + return self.contains(item) + + def to_string(self): + """ + :return: A string representation of this set. + """ + if self.is_empty(): + return EMPTY_SET_SYMBOL + return "{" + " u ".join([simple_set.to_string() for simple_set in self.simple_sets]) + "}" + + def __str__(self): + return self.to_string() + + def __repr__(self): + return self.to_string() + + def is_disjoint(self): + """ + :return: Rather if the simple sets are disjoint or not. + """ + for a, b in itertools.combinations(self.simple_sets, 2): + if not a.intersection_with(b).is_empty(): + return False + return True + + def split_into_disjoint_and_non_disjoint(self) -> Tuple[Self, Self]: + """ + Split this composite set into disjoint and non-disjoint parts. + + This method is required for making the composite set disjoint. + The partitioning is done by removing every other simple set from every simple set. + The purified simple sets are then disjoint by definition and the pairwise intersections are (potentially) not + disjoint yet. + + This method requires: + - the intersection of two simple sets as a simple set + - the difference of a simple set (A) and another simple set (B) that is completely contained in A (B ⊆ A). + The result of that difference has to be a composite set with only one simple set in it. + + :return: A tuple of the disjoint and non-disjoint set. + """ + + # initialize result for disjoint and non-disjoint sets + disjoint = self.new_empty_set() + non_disjoint = self.new_empty_set() + + # for every simple set (a) + for simple_set_a in self.simple_sets: + + # initialize the difference of a with every b + difference = simple_set_a + + # for every other simple set (b) + for simple_set_b in self.simple_sets: + + # skip symmetric iterations + if simple_set_a == simple_set_b: + continue + + # get the intersection of a and b + intersection = simple_set_a.intersection_with(simple_set_b) + + # if the intersection is not empty add it to the non-disjoint set + non_disjoint.add_simple_set(intersection) + + # get the difference of the simple set with the intersection. + difference_with_intersection = difference.difference_with(intersection) + + # if the difference is empty + if len(difference_with_intersection) == 0: + # skip the rest of the loop and mark the set for discarding + difference = None + continue + + # the now should contain only 1 element + assert len(difference_with_intersection) == 1 + difference = difference_with_intersection[0] + + # if the difference has become None + if difference is None: + # skip the rest of the loop + continue + + # append the simple_set_a without every other simple set to the disjoint set + disjoint.simple_sets.add(difference) + + return disjoint, non_disjoint + + def make_disjoint(self) -> Self: + """ + Create an equal composite set that contains a disjoint union of simple sets. + + :return: The disjoint set. + """ + + disjoint, intersection = self.split_into_disjoint_and_non_disjoint() + + # while the intersection is not empty + while not intersection.is_empty(): + # split the intersection into disjoint and non-disjoint parts + current_disjoint, intersection = intersection.split_into_disjoint_and_non_disjoint() + + # add the disjoint intersection to the disjoint set + disjoint.simple_sets.update(current_disjoint.simple_sets) + + return disjoint.simplify() + + def add_simple_set(self, simple_set: AbstractSimpleSet): + """ + Add a simple set to this composite set if it is not empty. + + :param simple_set: The simple set to add + """ + if simple_set.is_empty(): + return + self.simple_sets.add(simple_set) + + def __eq__(self, other: Self): + return self.simple_sets._list == other.simple_sets._list diff --git a/test/test_interval.py b/test/test_interval.py new file mode 100644 index 0000000..c70611f --- /dev/null +++ b/test/test_interval.py @@ -0,0 +1,73 @@ +import unittest + +from random_events.interval import * + + +class SimpleIntervalTestCase(unittest.TestCase): + + def test_intersection(self): + a = SimpleInterval(0, 1) + b = SimpleInterval(0.5, 2) + c = SimpleInterval(0.5, 0.75, Bound.OPEN, Bound.CLOSED) + + intersection_a_b = a.intersection_with(b) + intersection_a_b_ = SimpleInterval(0.5, 1, Bound.OPEN, Bound.OPEN) + self.assertEqual(intersection_a_b, intersection_a_b_) + + intersection_a_c = a.intersection_with(c) + self.assertEqual(intersection_a_c, c) + + def test_is_empty(self): + a = SimpleInterval() + b = SimpleInterval(3, 1) + c = SimpleInterval(0, 1) + self.assertTrue(a.is_empty()) + self.assertTrue(b.is_empty()) + self.assertFalse(c.is_empty()) + + def test_complement(self): + a = SimpleInterval() + complement_a = a.complement() + self.assertEqual(complement_a, SortedSet([SimpleInterval(-float('inf'), float('inf'), Bound.OPEN, Bound.OPEN)])) + b = SimpleInterval(0, 1) + complement_b = b.complement() + self.assertEqual(complement_b, SortedSet([SimpleInterval(-float('inf'), 0, Bound.OPEN, Bound.CLOSED), + SimpleInterval(1, float('inf'), Bound.CLOSED, Bound.OPEN)])) + + def test_contains(self): + a = SimpleInterval(0, 1) + self.assertFalse(a.contains(0)) + self.assertTrue(a.contains(0.5)) + self.assertFalse(a.contains(1)) + self.assertFalse(a.contains(-1)) + self.assertFalse(a.contains(1.1)) + + +class IntervalTestCase(unittest.TestCase): + + def test_simplify(self): + a = SimpleInterval(0, 1) + b = SimpleInterval(0.5, 1.5) + c = SimpleInterval(1.5, 2, Bound.CLOSED) + d = SimpleInterval(3, 4) + a_b = Interval([d, a, b, c]) + a_b_simplified = a_b.simplify() + a_b_simplified_ = Interval([SimpleInterval(0, 2), SimpleInterval(3, 4)]) + self.assertEqual(a_b_simplified, a_b_simplified_) + + def test_union(self): + a = SimpleInterval(0, 1) + b = SimpleInterval(0.5, 1.5) + c = SimpleInterval(1.5, 2, Bound.CLOSED) + d = SimpleInterval(3, 4) + a_d = Interval([a, d]) + b_c = Interval([b, c]) + + union_a_d_b_c = a_d.union_with(b_c) + union_a_d_b_c_ = Interval([SimpleInterval(0, 2), SimpleInterval(3, 4)]) + self.assertEqual(union_a_d_b_c, union_a_d_b_c_) + self.assertTrue(union_a_d_b_c.is_disjoint()) + + +if __name__ == '__main__': + unittest.main()