Geographic Information Systems Asked on December 4, 2020
I have created scatter plot in GEE but for some reason it doesn’t display the R2 and the way the linear regression displayd is also not good:
as you can see. the R2 isn’t displayed at all and the linear regression has NDVI inside it.
This is the code I have used:
// Generate chart from sample
var chart = ui.Chart.feature.byFeature(sample, 'SAR', 'NDVI')
.setChartType('ScatterChart')
.setOptions({title: "NDVI vs SAR(db)", pointSize: 3,
legend: {maxLines: 5, position: 'top'},
series: {
0: {targetAxisIndex: 0},
1: {targetAxisIndex: 1}
},
vAxes: {
// Adds titles to each axis.
0: {title: 'NDVI'},
1: {title: 'NDVI '}
},
hAxes: {
// Adds titles to each axis.
0: {title: 'db'},
1: {title: 'db '}
},
trendlines: {
0: {
type: 'linear',
color: 'lightblue',
lineWidth: 3,
opacity: 0.7,
showR2: true,
visibleInLegend: true
},
},
});
As you can see, the showR2 is true, what is the mistake?
In fact, it is shown. it is enough that change position of legend to right.
Answered by Fateme Ghasempour on December 4, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP