- محور X = تصویر با برچسب xProperty (پیشفرض: 'system:time_start').
- محور Y = خروجی کاهنده.
- Series = منطقه برچسبگذاری شده توسط seriesProperty (پیشفرض: 'system:index').
نموداری را برمیگرداند.
استفاده | برمی گرداند |
---|---|
ui.Chart.image.seriesByRegion(imageCollection, regions, reducer, band , scale , xProperty , seriesProperty ) | ui.Chart |
استدلال | تایپ کنید | جزئیات |
---|---|---|
imageCollection | ImageCollection | یک ImageCollection با داده هایی که باید در نمودار گنجانده شود. |
regions | ویژگی|مجموعه ویژگی|هندسه|فهرست<ویژگی>|فهرست<هندسه> | مناطق کاهش یابد. |
reducer | کاهنده | کاهنده ای که مقدار محور y را تولید می کند. باید یک مقدار واحد را برگرداند. |
band | شماره|رشته، اختیاری | نام باند برای کاهش با استفاده از کاهنده. به طور پیش فرض برای باند اول. |
scale | شماره، اختیاری | مقیاس برای استفاده با کاهنده بر حسب متر. |
xProperty | رشته، اختیاری | ویژگی برای استفاده به عنوان برچسب برای هر تصویر در محور x. پیشفرض «system:time_start» است. |
seriesProperty | رشته، اختیاری | ویژگی ویژگیها در opt_regions برای استفاده برای برچسبهای سری. پیشفرض «system:index» است. |
نمونه ها
ویرایشگر کد (جاوا اسکریپت)
// 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);