# StatisticsHistogram

## 语法

`StatisticsHistogram (raster, statistics, histogram)`
 参数 说明 数据类型 raster The input raster. Raster statistics 统计信息列表，基于每个波段的预定义统计信息。为单波段栅格指定的统计数据，例如：statistics = [{"min": 0, "max": 23.06, mean": 4.547517, "standardDeviation": 2.6870, "count": 10000, "median": 5, "mode": 6}]。为三波段栅格指定的统计数据，例如：statistics = [{"min": 0, "max": 23.06, "mean": 4.547517, "standardDeviation": 2.6870, "count": 10000, "median": 5, "mode": 6}, {"min":2, "max": 25, "mean": 5.32, "standardDeviation": 3.42, "count": 10000, "median": 6, "mode": 6}, {"min": 5, "max": 53.06, "mean": 35.23, "standardDeviation": 6.3270, "count": 10000, "median": 36, "mode": 6}]。 List histogram 基于每个波段预定义直方图的直方图信息字典。使用以下示例输入直方图信息字典：``````{ "rasterFunction": "StatisticsHistogram", "rasterFunctionArguments": { "histograms": [{ "size": 256, "min": 0, "max": 23.064547032777931, "counts": [559, 172, 217, ... //256 elements for each of the bins in this example ] }]`````` Dictionary

 数据类型 说明 Raster 已定义统计数据和直方图的输出栅格。

## 代码示例

StatisticsHistogram 示例

``````import arcpy

StatisticsHistogram_raster = arcpy.sa.StatisticsHistogram(imagePath1, [-4.514, 4.338, 0.0043, 1.0], None)``````

#### 相关主题

##### 相关主题
1. Spatial Analyst 函数概述