ui.Chart.image.byClass

  • ui.Chart.image.byClass generates a chart from an image, plotting derived band values in classified regions.

  • The chart's x-axis represents the band name, the y-axis represents the band value, and the series represents the class label.

  • The function takes several arguments including the classified image, class band, optional region, reducer, scale, class labels, and x-labels.

  • It returns a ui.Chart object.

Generates a Chart from an image. Plots derived band values in classified regions in an image.

  - X-axis = Band name (all bands except the class band are charted).

  - Y-axis = Band value.

  - Series = Class label.

Returns a chart.

Usage Returns
ui.Chart.image.byClass(image, classBand, region , reducer , scale , classLabels , xLabels ) ui.Chart
Argument Type Details
image
Image Classified image to derive band values from.
classBand
Number|String The class label band in this image.
region
Feature|FeatureCollection|Geometry, optional The region to reduce. If omitted, uses the entire image.
reducer
Reducer, optional Reducer that generates the value(s) for the y-axis. Must return a single value per band. Defaults to ee.Reducer.mean().
scale
Number, optional Scale to use with the reducer in meters.
classLabels
List.<String>|List<String>|Object, optional A dictionary of labels used to identify classes in the series legend. If omitted, classes will be labeled with the value of classBand.
xLabels
List<Object>, optional A list of labels used to label bands on the xAxis. Must have one fewer elements than the number of image bands. If omitted, bands will be labeled with their names. If the labels are numeric (e.g. wavelengths), x-axis will be continuous.
Design a Mobile Site
View Site in Mobile | Classic
Share by: