|
313 | 313 | "| `spatialTargetY` | Y-coordinate of the viewport center | `500.0` |\n", |
314 | 314 | "| `featureSelection` | List of selected genes or other features | `[\"EPCAM\"]` |\n", |
315 | 315 | "\n", |
316 | | - "Use `config.link_views()` to pin initial values for one or more coordination types across a list of views:\n", |
| 316 | + "Use `config.link_views_by_dict()` to set initial values for one or more coordination types across a list of views:\n", |
317 | 317 | "\n", |
318 | 318 | "```python\n", |
319 | | - "config.link_views(\n", |
320 | | - " views=[my_view],\n", |
321 | | - " c_types=[\"spatialZoom\", \"spatialTargetX\", \"spatialTargetY\"],\n", |
322 | | - " c_values=[2, 500.0, 500.0]\n", |
| 319 | + "config.link_views_by_dict([my_view],\n", |
| 320 | + " {\n", |
| 321 | + " \"spatialZoom\": 2,\n", |
| 322 | + " \"spatialTargetX\": 500.0,\n", |
| 323 | + " \"spatialTargetY\": 500.0\n", |
| 324 | + " }\n", |
323 | 325 | ")\n", |
324 | 326 | "```" |
325 | 327 | ] |
|
343 | 345 | "spatial_view2 = config2.add_view(\"spatialBeta\", dataset=dataset2)\n", |
344 | 346 | "\n", |
345 | 347 | "# Set the initial zoom level and pan position\n", |
346 | | - "config2.link_views(\n", |
347 | | - " views=[spatial_view2],\n", |
348 | | - " c_types=[\"spatialZoom\", \"spatialTargetX\", \"spatialTargetY\"],\n", |
349 | | - " c_values=[-2, 300.0, 300.0]\n", |
| 348 | + "config2.link_views_by_dict([spatial_view2],\n", |
| 349 | + " {\n", |
| 350 | + " \"spatialZoom\": -2,\n", |
| 351 | + " \"spatialTargetX\": 300.0,\n", |
| 352 | + " \"spatialTargetY\": 300.0,\n", |
| 353 | + " }\n", |
350 | 354 | ")\n", |
351 | 355 | "\n", |
352 | 356 | "config2.layout(spatial_view2)\n", |
|
555 | 559 | "spatial = vc.add_view(\"spatialBeta\", dataset=dataset)\n", |
556 | 560 | "\n", |
557 | 561 | "# Link all views to share the same obsType coordination value\n", |
558 | | - "vc.link_views([spatial], [\"obsType\"], [\"spot\"])\n", |
| 562 | + "vc.link_views_by_dict([spatial], { \"obsType\": \"spot\" })\n", |
559 | 563 | "\n", |
560 | 564 | "vc.layout(spatial)\n", |
561 | 565 | "vc.widget()" |
|
0 commit comments