Merge pull request #2131 from borglab/fix/EKF_SLAM_example

Fix figure in EKF_SLAM example
release/4.3a0
Frank Dellaert 2025-05-10 12:18:51 -04:00 committed by GitHub
commit 37aba60ac3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 14 deletions

View File

@ -102,7 +102,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 9, "execution_count": 3,
"id": "params-code-fls", "id": "params-code-fls",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@ -145,7 +145,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 10, "execution_count": 4,
"id": "ground-truth-call-fls", "id": "ground-truth-call-fls",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
@ -196,7 +196,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 11, "execution_count": 5,
"id": "smoother-init-code", "id": "smoother-init-code",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
@ -281,7 +281,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 12, "execution_count": 6,
"id": "smoother-loop-code", "id": "smoother-loop-code",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
@ -295,7 +295,7 @@
{ {
"data": { "data": {
"application/vnd.jupyter.widget-view+json": { "application/vnd.jupyter.widget-view+json": {
"model_id": "65c6048ecb324a96ac367007900bb015", "model_id": "21976a68ac2846559c4b7b45e35d06e2",
"version_major": 2, "version_major": 2,
"version_minor": 0 "version_minor": 0
}, },
@ -402,7 +402,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 13, "execution_count": 7,
"id": "plotly-animation-call-code-fls", "id": "plotly-animation-call-code-fls",
"metadata": { "metadata": {
"tags": [] "tags": []
@ -418,7 +418,7 @@
{ {
"data": { "data": {
"application/vnd.jupyter.widget-view+json": { "application/vnd.jupyter.widget-view+json": {
"model_id": "7a03e84472a1445ebfd1e59f4a5b76ff", "model_id": "a0452bf011b144be88c1c3c1a17465b5",
"version_major": 2, "version_major": 2,
"version_minor": 0 "version_minor": 0
}, },
@ -441,6 +441,7 @@
"data": { "data": {
"application/vnd.plotly.v1+json": { "application/vnd.plotly.v1+json": {
"config": { "config": {
"displayModeBar": false,
"plotlyServerURL": "https://plot.ly" "plotlyServerURL": "https://plot.ly"
}, },
"data": [ "data": [
@ -14455,6 +14456,7 @@
} }
], ],
"layout": { "layout": {
"autosize": true,
"height": 600, "height": 600,
"hovermode": "closest", "hovermode": "closest",
"images": [ "images": [
@ -14478,6 +14480,12 @@
"x": 0.52, "x": 0.52,
"y": 1 "y": 1
}, },
"margin": {
"b": 50,
"l": 0,
"r": 0,
"t": 50
},
"shapes": [ "shapes": [
{ {
"fillcolor": "rgba(255,0,255,0.2)", "fillcolor": "rgba(255,0,255,0.2)",
@ -14491,7 +14499,7 @@
"yref": "y" "yref": "y"
} }
], ],
"showlegend": true, "showlegend": false,
"sliders": [ "sliders": [
{ {
"active": 0, "active": 0,
@ -16337,7 +16345,7 @@
"direction": "left", "direction": "left",
"pad": { "pad": {
"r": 10, "r": 10,
"t": 87 "t": 20
}, },
"showactive": false, "showactive": false,
"type": "buttons", "type": "buttons",
@ -16347,7 +16355,6 @@
"yanchor": "top" "yanchor": "top"
} }
], ],
"width": 1000,
"xaxis": { "xaxis": {
"constrain": "domain", "constrain": "domain",
"domain": [ "domain": [
@ -16390,7 +16397,7 @@
")\n", ")\n",
"\n", "\n",
"print(\"Displaying animation...\")\n", "print(\"Displaying animation...\")\n",
"fig.show()" "fig.show(config={'displayModeBar': False})"
] ]
}, },
{ {

View File

@ -353,7 +353,7 @@ def configure_figure_layout(
type="buttons", type="buttons",
showactive=False, showactive=False,
direction="left", direction="left",
pad={"r": 10, "t": 87}, pad={"r": 10, "t": 20},
x=plot_domain[0], x=plot_domain[0],
xanchor="left", xanchor="left",
y=0, y=0,
@ -401,20 +401,21 @@ def configure_figure_layout(
scaleratio=1, scaleratio=1,
domain=[0, 1], domain=[0, 1],
), ),
width=1000, autosize=True,
height=600, height=600,
hovermode="closest", hovermode="closest",
updatemenus=updatemenus, updatemenus=updatemenus,
sliders=sliders, sliders=sliders,
shapes=initial_shapes, # Initial shapes (frame 0) shapes=initial_shapes, # Initial shapes (frame 0)
images=([initial_image] if initial_image else []), # Initial image (frame 0) images=([initial_image] if initial_image else []), # Initial image (frame 0)
showlegend=True, # Keep legend for clarity
legend=dict( legend=dict(
x=plot_domain[0], x=plot_domain[0],
y=1, y=1,
traceorder="normal", # Position legend traceorder="normal", # Position legend
bgcolor="rgba(255,255,255,0.5)", bgcolor="rgba(255,255,255,0.5)",
), ),
showlegend=False,
margin=dict(l=0, r=0, t=50, b=50),
) )