ui.Chart.image.byRegion

Generates a Chart from an image. Extracts and plots band values in one or more regions in the image, with each band in a separate series.

  - X-axis = Region labeled by xProperty (default: 'system:index')

  - Y-axis = Reducer output.

  - Series = Band name.

Returns a chart.

UsageReturns
ui.Chart.image.byRegion(image, regions, reducer, scale, xProperty)ui.Chart
ArgumentTypeDetails
imageImage

Image to extract band values from.

regionsFeature|FeatureCollection|Geometry|List, optional

Regions to reduce. Defaults to the image's footprint.

reducerReducer, optional

Reducer that generates the value(s) for the y-axis. Must return a single value per band. Defaults to ee.Reducer.mean().

scaleNumber, optional

Scale to use with the reducer in meters.

xPropertyString, optional

Property to be used as the label for each Region on the x-axis. Defaults to 'system:index'.

Examples

JavaScript

// Your example goes here!

Python

# Your example goes here!