From ea81304cb2c8401b4a8a17269cffc99efb3774ad Mon Sep 17 00:00:00 2001 From: "Egli Adrian (IT-SCI-API-PFI)" <adrian.egli@sbb.ch> Date: Wed, 24 Jul 2019 06:57:25 +0200 Subject: [PATCH] #119 refactored --- flatland/utils/rendertools.py | 3 ++- notebooks/Scene_Editor.ipynb | 40 ++++++----------------------------- 2 files changed, 8 insertions(+), 35 deletions(-) diff --git a/flatland/utils/rendertools.py b/flatland/utils/rendertools.py index d3619572..bd4c02f8 100644 --- a/flatland/utils/rendertools.py +++ b/flatland/utils/rendertools.py @@ -293,7 +293,8 @@ class RenderTool(object): for visited_cell in prediction_dict[agent]: cell_coord = array(visited_cell[:2]) cell_coord_trans = np.matmul(cell_coord, rt.row_col_to_xy) + rt.x_y_half - self._draw_square(cell_coord_trans, 1 / (agent + 1.1), color, layer=1, opacity=100) # TODO : Track highlighting (Adrian) + self._draw_square(cell_coord_trans, 1 / (agent + 1.1), color, layer=1, opacity=100) + # TODO : Track highlighting (Adrian) def render_rail(self, spacing=False, rail_color="gray", curves=True, arrows=False): diff --git a/notebooks/Scene_Editor.ipynb b/notebooks/Scene_Editor.ipynb index 3a95729f..38024cc6 100644 --- a/notebooks/Scene_Editor.ipynb +++ b/notebooks/Scene_Editor.ipynb @@ -9,22 +9,9 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "<style>.container { width:95% !important; }</style>" - ], - "text/plain": [ - "<IPython.core.display.HTML object>" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "from IPython.core.display import display, HTML\n", "display(HTML(\"<style>.container { width:95% !important; }</style>\"))" @@ -32,12 +19,12 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from flatland.utils.editor import EditorMVC\n", - "mvc = EditorMVC(sGL=\"PIL\" ) " + "mvc = EditorMVC(sGL=\"PILSVG\" ) " ] }, { @@ -62,26 +49,11 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": { "scrolled": false }, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2e206d6a7c254d7e816cd6e3694ba147", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "HBox(children=(Canvas(), VBox(children=(Text(value='temp.pkl', description='Filename'), Button(description='Re…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "mvc.view.display()" ] -- GitLab