mirror of
https://github.com/heyarne/earth-observation-for-journalism.git
synced 2026-05-06 19:13:40 +02:00
"pplt" → "plt"
This commit is contained in:
parent
5461777aea
commit
1ff1d972d5
7 changed files with 126 additions and 136 deletions
|
|
@ -3484,16 +3484,16 @@
|
|||
"source": [
|
||||
"import rasterio as r\n",
|
||||
"import rasterio.plot as rplt\n",
|
||||
"import matplotlib.pyplot as pplt\n",
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
"\n",
|
||||
"# preview the first downloaded image\n",
|
||||
"with r.open(sentinel_helpers.scihub_band_paths(downloaded_paths[3], ['TCI'], '20m')[0]) as true_color:\n",
|
||||
" # we do not need\n",
|
||||
" fig, (axr, axg, axb) = pplt.subplots(1,3, figsize=(21,7))\n",
|
||||
" fig, (axr, axg, axb) = plt.subplots(1,3, figsize=(21,7))\n",
|
||||
" rplt.show((true_color, 1), ax=axr, cmap='Reds', title='red channel')\n",
|
||||
" rplt.show((true_color, 2), ax=axg, cmap='Greens', title='green channel')\n",
|
||||
" rplt.show((true_color, 3), ax=axb, cmap='Blues', title='blue channel')\n",
|
||||
" pplt.show()"
|
||||
" plt.show()"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -3505,9 +3505,9 @@
|
|||
"# plotting the included true-colo image\n",
|
||||
"with r.open(sentinel_helpers.scihub_band_paths(downloaded_paths[3], ['TCI'], '20m')[0]) as true_color:\n",
|
||||
" # note that in order to get the real colors, we need to reverse the bands into \"rasterio band order\"\n",
|
||||
" pplt.figure(figsize=(20,20))\n",
|
||||
" plt.figure(figsize=(20,20))\n",
|
||||
" rplt.show(true_color.read(), transform=true_color.transform)\n",
|
||||
" pplt.show()"
|
||||
" plt.show()"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -3650,10 +3650,10 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fig, (ax) = pplt.subplots(1, 1, figsize=(8,16))\n",
|
||||
"fig, (ax) = plt.subplots(1, 1, figsize=(8,16))\n",
|
||||
"rplt.show(mosaic, transform=mosaic_transform, ax=ax)\n",
|
||||
"brandenburg.to_crs(target_crs).plot(ax=ax, facecolor='none', edgecolor='white')\n",
|
||||
"pplt.show()"
|
||||
"plt.show()"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue