– X-Achse: Bild, das mit dem xProperty-Wert gekennzeichnet ist.
– Y-Achse: Bandwert.
– Reihe: Bandnamen.
Gibt ein Diagramm zurück.
Nutzung | Ausgabe |
---|---|
ui.Chart.image.series(imageCollection, region, reducer, scale, xProperty) | ui.Chart |
Argument | Typ | Details |
---|---|---|
imageCollection | ImageCollection | Eine ImageCollection mit Daten, die im Diagramm enthalten sein sollen. |
region | Feature|FeatureCollection|Geometry | Die zu reduzierende Region. |
reducer | Reducer, optional | Reducer, der die Werte für die Y-Achse generiert. Muss einen einzelnen Wert zurückgeben. Die Standardeinstellung ist ee.Reducer.mean(). |
scale | Nummer, optional | Skala, die mit dem Reducer in Metern verwendet werden soll. |
xProperty | String, optional | Attribut, das als Beschriftung für jedes Bild auf der X-Achse verwendet werden soll. Die Standardeinstellung ist „system:time_start“. |
Beispiele
Code-Editor (JavaScript)
// Define a region of pixels to reduce and chart a time series for. var region = ee.Geometry.BBox(-121.916, 37.130, -121.844, 37.076); // 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.series({ imageCollection: imgCol, region: region, reducer: ee.Reducer.mean(), scale: 500, xProperty: 'system:time_start' }) .setSeriesNames(['EVI', 'NDVI']) .setOptions({ title: 'Average Vegetation Index Value by Date', hAxis: {title: 'Date', titleTextStyle: {italic: false, bold: true}}, vAxis: { title: 'Vegetation index (x1e4)', titleTextStyle: {italic: false, bold: true} }, lineWidth: 5, colors: ['e37d05', '1d6b99'], curveType: 'function' }); print(chart);