Skip to content

Instantly share code, notes, and snippets.

@jdbcode
Created March 18, 2021 19:42
Show Gist options
  • Save jdbcode/95f669d041a6ab636dd6d041bc0c1b78 to your computer and use it in GitHub Desktop.
Save jdbcode/95f669d041a6ab636dd6d041bc0c1b78 to your computer and use it in GitHub Desktop.
[Medium] Code example 04 for the Medium blog on Earth Engine charting guide update
var what = ee.ImageCollection('MODIS/006/MOD13A2').select('NDVI');
var where = ee.Geometry.Point([-93.51, 35.76]);
var chartStyle = {
title: 'ggplot2 Default Chart Style',
colors: ['F8766D'],
hAxis: {
title: 'Observation Date',
titleTextStyle: {italic: false, bold: true},
gridlines: {color: 'FFF'},
baselineColor: 'FFF'
},
vAxis: {
title: 'NDVI (1e4)',
titleTextStyle: {italic: false, bold: true},
gridlines: {color: 'FFF'},
baselineColor: 'FFF'
},
chartArea: {backgroundColor: 'EBEBEB'}
};
print(ui.Chart.image.series(what, where).setOptions(chartStyle));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment