- X축 = xProperty로 라벨이 지정된 이미지 (기본값: 'system:time_start')
- Y축 = 리듀서 출력
- 계열 = seriesProperty로 라벨이 지정된 지역 (기본값: 'system:index')
차트를 반환합니다.
사용 | 반환 값 |
---|---|
ui.Chart.image.seriesByRegion(imageCollection, regions, reducer, band, scale, xProperty, seriesProperty) | ui.Chart |
인수 | 유형 | 세부정보 |
---|---|---|
imageCollection | ImageCollection | 차트에 포함할 데이터가 있는 ImageCollection입니다. |
regions | Feature|FeatureCollection|Geometry|List<Feature>|List<Geometry> | 축소할 영역입니다. |
reducer | 감소기 | y축 값을 생성하는 리듀서입니다. 단일 값을 반환해야 합니다. |
band | Number|String, 선택사항 | 리듀서를 사용하여 줄일 밴드 이름입니다. 기본값은 첫 번째 밴드입니다. |
scale | 숫자, 선택사항 | 미터 단위로 리듀서와 함께 사용하도록 조정합니다. |
xProperty | 문자열, 선택사항 | x축의 각 이미지에 라벨로 사용할 속성입니다. 기본값은 'system:time_start'입니다. |
seriesProperty | 문자열, 선택사항 | 계열 라벨에 사용할 opt_regions의 특성입니다. 기본값은 'system:index'입니다. |
예
코드 편집기 (JavaScript)
// Define regions of pixels to reduce and chart a time series for. var regions = ee.FeatureCollection([ ee.Feature( ee.Geometry.BBox(-121.916, 37.130, -121.844, 37.076), {label: 'Forest'}), ee.Feature( ee.Geometry.BBox(-122.438, 37.765, -122.396, 37.800), {label: 'Urban'}) ]); // Define an image collection time series to chart, MODIS vegetation indices // in this case. var imgCol = ee.ImageCollection('MODIS/006/MOD13A1') .filter(ee.Filter.date('2015-01-01', '2020-01-01')) .select(['NDVI', 'EVI']); // Define the chart and print it to the console. var chart = ui.Chart.image.seriesByRegion({ imageCollection: imgCol, band: 'NDVI', regions: regions, reducer: ee.Reducer.mean(), scale: 500, seriesProperty: 'label', xProperty: 'system:time_start' }) .setOptions({ title: 'Average NDVI Value by Date', hAxis: {title: 'Date', titleTextStyle: {italic: false, bold: true}}, vAxis: { title: 'NDVI (x1e4)', titleTextStyle: {italic: false, bold: true} }, lineWidth: 5, colors: ['0f8755', '808080'], }); print(chart);