From 004c30f7a242abbe88979287f088779efce65971 Mon Sep 17 00:00:00 2001 From: Tim Monko Date: Wed, 19 Aug 2026 17:31:38 -0500 Subject: [PATCH] update handedness guide --- docs/guides/handedness.md | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/docs/guides/handedness.md b/docs/guides/handedness.md index c645383cf..8220e1b8a 100644 --- a/docs/guides/handedness.md +++ b/docs/guides/handedness.md @@ -37,19 +37,6 @@ scale for each layer. This is good enough for many cases, but it sub-par when the data coordinates have an absolute correspondence to physical space — as is the case for latitude and longitude, for example: -```{code-cell} python ---- -tags: [hide-input] ---- -# function to convert xarray metadata to napari layer metadata -def get_scale_translate(dataset, array_name): - array = getattr(dataset, array_name) - dims = [getattr(dataset, dim) for dim in array.dims] - translate = [float(d[0]) for d in dims] - scale = [float(d[1] - d[0]) for d in dims] - return {'scale': scale, 'translate': translate} -``` - ```{code-cell} python import napari import xarray as xr @@ -58,10 +45,8 @@ sst = xr.tutorial.open_dataset('ersstv5') viewer, sst_layer = napari.imshow( sst.sst, name='sea surface temp', - **get_scale_translate(sst, 'sst'), colormap='magma', ) -viewer.dims.axis_labels = sst.sst.dims viewer.scene.overlays.axes.visible = True ```