【发布时间】:2021-04-15 05:18:29
【问题描述】:
我正在尝试为单个像素的 GPP 和 LAI 创建时间序列图像图表。就值而言,该图看起来很好。我想为两个 y 轴添加一个标题,并使两个 y 轴的最小值都为 0。我会发布我目前拥有的图表的图片,但堆栈溢出不会让我这样做。
这是脚本:
https://code.earthengine.google.com/18dedf6d2e871cfb9ce1869f15dd0d80
var chart = ui.Chart.image.series({
imageCollection: modisVeg ,
region: tree ,
scale: 500 ,
xProperty: 'system:index'
})
.setSeriesNames(['GPP', 'LAI'])
.setOptions({
title: '[Time-series Analysis (2019)]: Tree Pixel' ,
series: {
0: {
targetAxisIndex: 0 ,
type: "line" ,
lineWidth: 5 ,
pointSize: 0 ,
color: "blue"
} ,
1: {
targetAxisIndex: 1 ,
type: "line" ,
lineWidth: 5 ,
pointSize: 0 ,
color: "green"
} ,
} ,
hAxis: {
title: 'Date' ,
titleTextStyle: { italic: false, bold: true }
} ,
vAxis: {
0: {
title: "GPP (g*C / m^2)" ,
baseline: 0 ,
titleTextStyle: { bold: true , color: 'blue' }
} ,
1: {
title: "LAI" ,
baseline: 0 ,
titleTextStyle: { bold: true, color: 'green' }
}
} ,
curveType: 'function'
});
print(chart);
【问题讨论】: