Skip to content

Commit 833e502

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 65ab33b commit 833e502

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

notebooks/examples/sdata_from_scratch.ipynb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
"import matplotlib.pyplot as plt\n",
6565
"import pandas as pd\n",
6666
"import spatialdata as sd\n",
67-
"import spatialdata_plot\n",
6867
"import squidpy as sq\n",
6968
"from shapely.geometry import Point\n",
7069
"from spatialdata.models import Image2DModel, ShapesModel, TableModel\n",
@@ -3467,16 +3466,14 @@
34673466
],
34683467
"source": [
34693468
"# subset the DataFrame to focus on a smaller region of the data\n",
3470-
"subset_df = spot_df[\n",
3471-
" (spot_df[\"array_col\"].between(20, 30)) & (spot_df[\"array_row\"].between(20, 30))\n",
3472-
"]\n",
3469+
"subset_df = spot_df[(spot_df[\"array_col\"].between(20, 30)) & (spot_df[\"array_row\"].between(20, 30))]\n",
34733470
"\n",
34743471
"# create the plot\n",
34753472
"plt.figure(figsize=(10, 8))\n",
34763473
"for _, row in subset_df.iterrows():\n",
34773474
" x, y = row[\"spot_center_x\"], row[\"spot_center_y\"]\n",
34783475
" label = f\"({row['array_row']},{row['array_col']})\"\n",
3479-
" plt.text(x, y+30, label, fontsize=9, ha=\"center\", va=\"center\")\n",
3476+
" plt.text(x, y + 30, label, fontsize=9, ha=\"center\", va=\"center\")\n",
34803477
" plt.scatter(x, y, c=\"k\", alpha=0.4)\n",
34813478
"\n",
34823479
"# set plot limits and labels\n",

0 commit comments

Comments
 (0)