0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Automating GIS Processes 2024 写経 Exercise 6 (Problem 2)(2)

0
Posted at

(2e) Optional Raster value histogram - (0 point)

Use your previous skills with matplotlib to create a histogram of the raster values from the original NDVI raster (before reclassification). The histogram should visualize the distribution of NDVI values across the dataset, providing insights into the spread and frequency of different vegetation index values. Customize the bins and labels as needed to make the plot clear and informative.

matplotlibについて習得したスキルを使って、もともとのNDVI(正規化植生指標)ラスタ(再分類前)の値から、ヒストグラムを作ってください。
このヒストグラムはそのデータセット全体のNDVI(正規化植生指標)の分布を可視化し、植生指標の広がりと頻度に関する洞察を提供します。
必要に応じて、ビンとラベルをカスタマイズして、ヒストグラムをより明確で有益にしてください。

import matplotlib.pyplot as plt
import numpy as np

# 一次元に
ndvi_vector = ndvi_raster.values.flatten()

plt.figure(figsize=(10, 7))
plt.hist(ndvi_vector, bins=1000)
plt.xlabel("NDVI")
plt.ylabel("Frequency")
plt.title("NDVI Histogram")
plt.show()

image.png

ようやくLesson 7が終わりました。
次は、Final Assignmentです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?