plot#
- geetools.ee_image.ImageAccessor.plot(bands, region, ax=None, fc=None, cmap='viridis', crs='EPSG:4326', scale=0.0001, color='k')#
Plot the image on a matplotlib axis.
- Parameters:
bands (list) – The bands to plot.
region (ee.Geometry) – The geometry borders to plot the image on.
ax (matplotlib.axes.Axes | None) – The matplotlib axis to plot the image on.
fc (ee.FeatureCollection) – a FeatureCollection object to overlay on top of the image. Default is None, it can be a different object from the region.
cmap (str) – The colormap to use for the image. Default is
viridis. can only ber used for single band images.crs (str) – The coordinate reference system of the image. By default, we will use
"EPSG:4326"scale (float) – The scale of the image.
color – The color of the overlaid feature collection. Default is
k(black).
- Return type:
Examples
import ee, geetools import matplotlib.pyplot as plt ee.Initialize() image = ee.Image('COPERNICUS/S2_SR/20190828T151811_20190828T151809_T18GYT') fig, ax = plt.subplots() image.geetools.plot(["B4", "B3", "B2"], image.geometry(), ax)