公告:所有在
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。
ui.Chart.feature.histogram
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
根据一组特征生成图表。计算并绘制给定属性的直方图。
- X 轴 = 直方图分桶(属性值)。
- Y 轴 = 频次(即属性值位于 x 轴分桶边界内的特征数量)。
返回图表。
用法 | 返回 |
---|
ui.Chart.feature.histogram(features, property, maxBuckets, minBucketWidth, maxRaw) | ui.Chart |
参数 | 类型 | 详细信息 |
---|
features | Feature|FeatureCollection|List<Feature> | 图表中要包含的特征。 |
property | 字符串 | 要生成直方图的属性的名称。 |
maxBuckets | 数字,可选 | 构建直方图时要使用的最大分桶数;将向上舍入为 2 的幂。当属性的值为非数值时,不使用。 |
minBucketWidth | 数字,可选 | 最小直方图分桶宽度,如果为 null,则允许任何 2 的幂。如果属性为非数值,则不使用。 |
maxRaw | 数字,可选 | 在构建初始直方图之前要累积的值的数量。如果属性为非数值,则不使用。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eCreates a histogram chart visualizing the distribution of a specified property within a set of features.\u003c/p\u003e\n"],["\u003cp\u003eThe chart displays the frequency of features falling into different property value ranges (buckets) along the x and y axes.\u003c/p\u003e\n"],["\u003cp\u003eUsers can customize the histogram's maximum number of buckets, minimum bucket width, and the number of raw values used before building it.\u003c/p\u003e\n"],["\u003cp\u003eAccepts Feature, FeatureCollection, or List as input for features and returns a ui.Chart object.\u003c/p\u003e\n"]]],[],null,["# ui.Chart.feature.histogram\n\n\u003cbr /\u003e\n\nGenerates a Chart from a set of features. Computes and plots a histogram of the given property.\n\n\u003cbr /\u003e\n\n- X-axis = Histogram buckets (of property value).\n\n- Y-axis = Frequency (i.e. the number of features whose value of property lands within the x-axis bucket bounds).\n\nReturns a chart.\n\n| Usage | Returns |\n|----------------------------------------------------------------------------------------------------|----------|\n| `ui.Chart.feature.histogram(features, property, `*maxBuckets* `, `*minBucketWidth* `, `*maxRaw*`)` | ui.Chart |\n\n| Argument | Type | Details |\n|------------------|---------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `features` | Feature\\|FeatureCollection\\|List\\\u003cFeature\\\u003e | The features to include in the chart. |\n| `property` | String | The name of the property to generate the histogram for. |\n| `maxBuckets` | Number, optional | The maximum number of buckets to use when building a histogram; will be rounded up to a power of 2. Not used when the value of property is non-numeric. |\n| `minBucketWidth` | Number, optional | The minimum histogram bucket width, or null to allow any power of 2. Not used when property is non-numeric. |\n| `maxRaw` | Number, optional | The number of values to accumulate before building the initial histogram. Not used when property is non-numeric. |"]]