Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jni committed Jan 8, 2025
1 parent 1bf167f commit caa196c
Show file tree
Hide file tree
Showing 727 changed files with 1,246 additions and 1,264 deletions.
Binary file modified dev/_downloads/00e7696e0c5e504a25d80ad4f12395c4/set_theme.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,13 @@
# are not in the exported figure.
viewer.theme = "light"
# Optionally for saving the exported figure: viewer.export_figure(path="export_figure.png")
export_figure = viewer.export_figure(flash=False) # bug: default flash=True causes the canvas to be grayscale in docs
scaled_export_figure = viewer.export_figure(scale_factor=5, flash=False)
export_figure = viewer.export_figure()
scaled_export_figure = viewer.export_figure(scale_factor=5)
viewer.theme = "dark"

viewer.add_image(export_figure, rgb=True, name='exported_figure')
viewer.add_image(scaled_export_figure, rgb=True, name='scaled_exported_figure')
viewer.reset_view()

# from skimage.io import imsave
# imsave('screenshot.png', screenshot)

if __name__ == '__main__':
napari.run()
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file modified dev/_downloads/1da6595d849ac041f5c975e57f743bdd/add_image.zip
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/1dfac501616088d72425dec7711622c0/swap_dims.zip
Binary file not shown.
Binary file modified dev/_downloads/1e274fb9b67e15af5487fcafc71b4340/add_3D_image.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file modified dev/_downloads/33af6caabb5a40e7c10a6fc2119f3c97/export_figure.zip
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/3b252b54c600f14b324cb87b16587e6c/tracks_2d.zip
Binary file not shown.
Binary file modified dev/_downloads/3bebfb4bc3aee139ca3296606b6f6d0e/layers.zip
Binary file not shown.
Binary file modified dev/_downloads/3d5a3198b85f4e6fae5437ed1c4fa2f8/cursor_ray.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file modified dev/_downloads/42b41304b313e0d10a4d9e44735cc32b/labels3d.zip
Binary file not shown.
Binary file not shown.
Binary file modified dev/_downloads/43eff8c243d1d9c4529eb0b685742b3b/image_depth.zip
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file modified dev/_downloads/55239c1dbb11ca8c15cb695037108f68/nD_vectors.zip
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file modified dev/_downloads/62a47e5370a74b2df2ef0779e96b4323/add_labels.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"outputs": [],
"source": [
"import numpy as np\nfrom skimage import data\nfrom vispy.color import Colormap\n\nimport napari\n\n# create the viewer and window\nviewer = napari.Viewer()\n\n# add the image\nimg_layer = viewer.add_image(data.camera(), name='photographer')\nimg_layer.colormap = 'gray'\n\n# create a list of polygons\npolygons = [\n np.array([[11, 13], [111, 113], [22, 246]]),\n np.array(\n [\n [505, 60],\n [402, 71],\n [383, 42],\n [251, 95],\n [212, 59],\n [131, 137],\n [126, 187],\n [191, 204],\n [171, 248],\n [211, 260],\n [273, 243],\n [264, 225],\n [430, 173],\n [512, 160],\n ]\n ),\n np.array(\n [\n [310, 382],\n [229, 381],\n [209, 401],\n [221, 411],\n [258, 411],\n [300, 412],\n [306, 435],\n [268, 434],\n [265, 454],\n [298, 461],\n [307, 461],\n [307, 507],\n [349, 510],\n [352, 369],\n [330, 366],\n [330, 366],\n ]\n ),\n]\n\n# add polygons\nlayer = viewer.add_shapes(\n polygons,\n shape_type='polygon',\n edge_width=1,\n edge_color='coral',\n face_color='royalblue',\n name='shapes',\n)\n\n# change some attributes of the layer\nlayer.selected_data = set(range(layer.nshapes))\nlayer.current_edge_width = 5\nlayer.opacity = 0.75\nlayer.selected_data = set()\n\n# add an ellipse to the layer\nellipse = np.array([[59, 222], [110, 289], [170, 243], [119, 176]])\nlayer.add(\n ellipse,\n shape_type='ellipse',\n edge_width=5,\n edge_color='coral',\n face_color='purple',\n)\n\nmasks = layer.to_masks([512, 512])\nmasks_layer = viewer.add_image(masks.astype(float), name='masks')\nmasks_layer.opacity = 0.7\nmasks_layer.colormap = Colormap([[0.0, 0.0, 0.0, 0.0], [1.0, 0.0, 0.0, 1.0]])\n\nlabels = layer.to_labels([512, 512])\nlabels_layer = viewer.add_labels(labels, name='labels')\n\npoints = np.array([[100, 100], [200, 200], [333, 111]])\nsize = np.array([10, 20, 20])\nviewer.add_points(points, size=size)\n\n# sample vector coord-like data\nn = 100\npos = np.zeros((n, 2, 2), dtype=np.float32)\nphi_space = np.linspace(0, 4 * np.pi, n)\nradius_space = np.linspace(0, 100, n)\n\n# assign x-y position\npos[:, 0, 0] = radius_space * np.cos(phi_space) + 350\npos[:, 0, 1] = radius_space * np.sin(phi_space) + 256\n\n# assign x-y projection\npos[:, 1, 0] = 2 * radius_space * np.cos(phi_space)\npos[:, 1, 1] = 2 * radius_space * np.sin(phi_space)\n\n# add the vectors\nlayer = viewer.add_vectors(pos, edge_width=2)\n\n# take screenshot\nscreenshot = viewer.screenshot(flash=False) # bug: default flash=True causes the canvas to be grayscale in docs\nviewer.add_image(screenshot, rgb=True, name='screenshot')\n\n# from skimage.io import imsave\n# imsave('screenshot.png', screenshot)\n\nif __name__ == '__main__':\n napari.run()"
"import numpy as np\nfrom skimage import data\nfrom vispy.color import Colormap\n\nimport napari\n\n# create the viewer and window\nviewer = napari.Viewer()\n\n# add the image\nimg_layer = viewer.add_image(data.camera(), name='photographer')\nimg_layer.colormap = 'gray'\n\n# create a list of polygons\npolygons = [\n np.array([[11, 13], [111, 113], [22, 246]]),\n np.array(\n [\n [505, 60],\n [402, 71],\n [383, 42],\n [251, 95],\n [212, 59],\n [131, 137],\n [126, 187],\n [191, 204],\n [171, 248],\n [211, 260],\n [273, 243],\n [264, 225],\n [430, 173],\n [512, 160],\n ]\n ),\n np.array(\n [\n [310, 382],\n [229, 381],\n [209, 401],\n [221, 411],\n [258, 411],\n [300, 412],\n [306, 435],\n [268, 434],\n [265, 454],\n [298, 461],\n [307, 461],\n [307, 507],\n [349, 510],\n [352, 369],\n [330, 366],\n [330, 366],\n ]\n ),\n]\n\n# add polygons\nlayer = viewer.add_shapes(\n polygons,\n shape_type='polygon',\n edge_width=1,\n edge_color='coral',\n face_color='royalblue',\n name='shapes',\n)\n\n# change some attributes of the layer\nlayer.selected_data = set(range(layer.nshapes))\nlayer.current_edge_width = 5\nlayer.opacity = 0.75\nlayer.selected_data = set()\n\n# add an ellipse to the layer\nellipse = np.array([[59, 222], [110, 289], [170, 243], [119, 176]])\nlayer.add(\n ellipse,\n shape_type='ellipse',\n edge_width=5,\n edge_color='coral',\n face_color='purple',\n)\n\nmasks = layer.to_masks([512, 512])\nmasks_layer = viewer.add_image(masks.astype(float), name='masks')\nmasks_layer.opacity = 0.7\nmasks_layer.colormap = Colormap([[0.0, 0.0, 0.0, 0.0], [1.0, 0.0, 0.0, 1.0]])\n\nlabels = layer.to_labels([512, 512])\nlabels_layer = viewer.add_labels(labels, name='labels')\n\npoints = np.array([[100, 100], [200, 200], [333, 111]])\nsize = np.array([10, 20, 20])\nviewer.add_points(points, size=size)\n\n# sample vector coord-like data\nn = 100\npos = np.zeros((n, 2, 2), dtype=np.float32)\nphi_space = np.linspace(0, 4 * np.pi, n)\nradius_space = np.linspace(0, 100, n)\n\n# assign x-y position\npos[:, 0, 0] = radius_space * np.cos(phi_space) + 350\npos[:, 0, 1] = radius_space * np.sin(phi_space) + 256\n\n# assign x-y projection\npos[:, 1, 0] = 2 * radius_space * np.cos(phi_space)\npos[:, 1, 1] = 2 * radius_space * np.sin(phi_space)\n\n# add the vectors\nlayer = viewer.add_vectors(pos, edge_width=2)\n\n# take screenshot\nscreenshot = viewer.screenshot()\n# optionally for saving the exported screenshot: viewer.screenshot(path=\"screenshot.png\")\nviewer.add_image(screenshot, rgb=True, name='screenshot')\n\nif __name__ == '__main__':\n napari.run()"
]
}
],
Expand All @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"outputs": [],
"source": [
"import numpy as np\nfrom skimage import data\n\nimport napari\n\n# Create a napari viewer with multiple layer types and add a scale bar.\n# One of the polygon shapes exists outside the image extent, which is\n# useful in displaying how figure export handles the extent of all layers.\n\nviewer = napari.Viewer()\n\n# add a 2D image layer\nimg_layer = viewer.add_image(data.camera(), name='photographer')\nimg_layer.colormap = 'gray'\n\n# polygon within image extent\nlayer_within = viewer.add_shapes(\n np.array([[11, 13], [111, 113], [22, 246]]),\n shape_type='polygon',\n face_color='coral',\n name='shapes_within',\n)\n\n# add a polygon shape layer\nlayer_outside = viewer.add_shapes(\n np.array([[572, 222], [305, 292], [577, 440]]),\n shape_type='polygon',\n face_color='royalblue',\n name='shapes_outside',\n)\n\n# add scale_bar with background box\nviewer.scale_bar.visible = True\nviewer.scale_bar.box = True\n# viewer.scale_bar.length = 150 # prevent dynamic adjustment of scale bar length\n\n\n# Take screenshots and export figures in 'light' theme, to show the canvas\n# margins and the extent of the exported figure.\nviewer.theme = 'light'\nscreenshot = viewer.screenshot(flash=False) # bug: default flash=True causes the canvas to be grayscale in docs\nfigure = viewer.export_figure(flash=False)\n# optionally, save the exported figure: viewer.export_figure(path='export_figure.png')\n# or screenshot: viewer.screenshot(path='screenshot.png')\n\n\n# Zoom in and take another screenshot and export figure to show the different\n# extents of the exported figure and screenshot.\nviewer.camera.zoom = 3\nscreenshot_zoomed = viewer.screenshot(flash=False)\nfigure_zoomed = viewer.export_figure(flash=False)\n\n\n# Remove the layer that exists outside the image extent and take another\n# figure export to show the extent of the exported figure without the\n# layer that exists outside the camera image extent.\nviewer.layers.remove(layer_outside)\nfigure_no_outside_shape = viewer.export_figure(flash=False)\n\n\n# Display the screenshots and figures in 'dark' theme, and switch to grid mode\n# for comparison. In the final grid state shown, the first row represents exported\n# images. The first two show that zoom is not reflected in the exported figure.\n# The final one shows how the exported figure adapts to change in the layer extent.\n# In the second row are the screenshots, showing the fact that the entire canvas\n# is captured and that zoom is preserved.\nviewer.theme = 'dark'\nviewer.layers.select_all()\nviewer.layers.remove_selected()\n\nviewer.add_image(screenshot_zoomed, rgb=True, name='screenshot_zoomed')\nviewer.add_image(screenshot, rgb=True, name='screenshot')\nviewer.add_image(figure_no_outside_shape, rgb=True, name='figure_no_outside_shape')\nviewer.add_image(figure_zoomed, rgb=True, name='figure_zoomed')\nviewer.add_image(figure, rgb=True, name='figure')\n\nviewer.grid.enabled = True\nviewer.grid.shape = (2, 3)\n\nif __name__ == '__main__':\n napari.run()"
"import numpy as np\nfrom skimage import data\n\nimport napari\n\n# Create a napari viewer with multiple layer types and add a scale bar.\n# One of the polygon shapes exists outside the image extent, which is\n# useful in displaying how figure export handles the extent of all layers.\n\nviewer = napari.Viewer()\n\n# add a 2D image layer\nimg_layer = viewer.add_image(data.camera(), name='photographer')\nimg_layer.colormap = 'gray'\n\n# polygon within image extent\nlayer_within = viewer.add_shapes(\n np.array([[11, 13], [111, 113], [22, 246]]),\n shape_type='polygon',\n face_color='coral',\n name='shapes_within',\n)\n\n# add a polygon shape layer\nlayer_outside = viewer.add_shapes(\n np.array([[572, 222], [305, 292], [577, 440]]),\n shape_type='polygon',\n face_color='royalblue',\n name='shapes_outside',\n)\n\n# add scale_bar with background box\nviewer.scale_bar.visible = True\nviewer.scale_bar.box = True\n# viewer.scale_bar.length = 150 # prevent dynamic adjustment of scale bar length\n\n\n# Take screenshots and export figures in 'light' theme, to show the canvas\n# margins and the extent of the exported figure.\nviewer.theme = 'light'\nscreenshot = viewer.screenshot()\nfigure = viewer.export_figure()\n# optionally, save the exported figure: viewer.export_figure(path='export_figure.png')\n# or screenshot: viewer.screenshot(path='screenshot.png')\n\n\n# Zoom in and take another screenshot and export figure to show the different\n# extents of the exported figure and screenshot.\nviewer.camera.zoom = 3\nscreenshot_zoomed = viewer.screenshot()\nfigure_zoomed = viewer.export_figure()\n\n\n# Remove the layer that exists outside the image extent and take another\n# figure export to show the extent of the exported figure without the\n# layer that exists outside the camera image extent.\nviewer.layers.remove(layer_outside)\nfigure_no_outside_shape = viewer.export_figure()\n\n\n# Display the screenshots and figures in 'dark' theme, and switch to grid mode\n# for comparison. In the final grid state shown, the first row represents exported\n# images. The first two show that zoom is not reflected in the exported figure.\n# The final one shows how the exported figure adapts to change in the layer extent.\n# In the second row are the screenshots, showing the fact that the entire canvas\n# is captured and that zoom is preserved.\nviewer.theme = 'dark'\nviewer.layers.select_all()\nviewer.layers.remove_selected()\n\nviewer.add_image(screenshot_zoomed, rgb=True, name='screenshot_zoomed')\nviewer.add_image(screenshot, rgb=True, name='screenshot')\nviewer.add_image(figure_no_outside_shape, rgb=True, name='figure_no_outside_shape')\nviewer.add_image(figure_zoomed, rgb=True, name='figure_zoomed')\nviewer.add_image(figure, rgb=True, name='figure')\n\nviewer.grid.enabled = True\nviewer.grid.shape = (2, 3)\n\nif __name__ == '__main__':\n napari.run()"
]
}
],
Expand All @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.15"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
Binary file not shown.
Binary file modified dev/_downloads/79b42e22517b178b9c5bcefff29fc821/nD_shapes.zip
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit caa196c

Please sign in to comment.