Announcement: All noncommercial projects registered to use Earth Engine beforeApril 15, 2025 mustverify noncommercial eligibility to maintain access. If you have not verified by September 26, 2025, your access may be on hold.

ui.Chart.image.regions

  • Theui.Chart.image.regions function generates a chart by extracting and plotting the value of each band within specified regions from an image.

  • The chart's x-axis represents bands, the y-axis displays the reducer output, and series represent regions.

  • Key arguments include the inputimage, optionalregions,reducer,scale,seriesProperty for labeling regions, andxLabels for band labels.

Generates a Chart from an image. Extracts and plots the value of each band in one or more regions.

  - X-axis = Band labeled by xProperty (default: band name).

  - Y-axis = Reducer output.

  - Series = Region labeled by seriesProperty (default: 'system:index').

Returns a chart.

UsageReturns
ui.Chart.image.regions(image,regions,reducer,scale,seriesProperty,xLabels)ui.Chart
ArgumentTypeDetails
imageImageImage to extract band values from.
regionsFeature|FeatureCollection|Geometry|List<Feature>|List<Geometry>, optionalRegions to reduce. Defaults to the image's footprint.
reducerReducer, optionalReducer that generates the value(s) for the y-axis. Must return a single value per band.
scaleNumber, optionalThe pixel scale in meters.
seriesPropertyString, optionalProperty to be used as the label for each region in the legend. Defaults to 'system:index'.
xLabelsList<Object>, optionalA list of labels used for bands on the x-axis. Must have the same number of elements as the image bands. If omitted, bands will be labeled with their names. If the labels are numeric (e.g. wavelengths), x-axis will be continuous.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-08 UTC.