@@ -106,8 +106,10 @@ def arvi(nir_agg: xr.DataArray,
106106 Examples
107107 --------
108108 In this example, we'll use data available in xrspatial.datasets
109+
109110 .. plot::
110111 :include-source:
112+
111113 >>> from xrspatial.datasets import get_data
112114 >>> data = get_data('sentinel-2') # Open Example Data
113115 >>> nir = data['NIR']
@@ -122,6 +124,7 @@ def arvi(nir_agg: xr.DataArray,
122124 >>> arvi_agg.plot(aspect=2, size=4)
123125
124126 .. sourcecode:: python
127+
125128 >>> y1, x1, y2, x2 = 100, 100, 103, 104
126129 >>> print(nir[y1:y2, x1:x2].data)
127130 [[1519. 1504. 1530. 1589.]
@@ -270,6 +273,7 @@ def evi(nir_agg: xr.DataArray,
270273 >>> evi_agg.plot(aspect=2, size=4)
271274
272275 .. sourcecode:: python
276+
273277 >>> y, x = 100, 100
274278 >>> m, n = 3, 4
275279 >>> print(nir[y1:y2, x1:x2].data)
@@ -409,6 +413,7 @@ def gci(nir_agg: xr.DataArray,
409413 >>> gci_agg.plot(aspect=2, size=4)
410414
411415 .. sourcecode:: python
416+
412417 >>> y1, x1, y2, x2 = 100, 100, 103, 104
413418 >>> print(nir[y1:y2, x1:x2].data)
414419 [[1519. 1504. 1530. 1589.]
@@ -472,6 +477,7 @@ def nbr(nir_agg: xr.DataArray,
472477 --------
473478 .. plot::
474479 :include-source:
480+
475481 >>> from xrspatial.datasets import get_data
476482 >>> data = get_data('sentinel-2') # Open Example Data
477483 >>> nir = data['NIR']
@@ -484,6 +490,7 @@ def nbr(nir_agg: xr.DataArray,
484490 >>> nbr_agg.plot(aspect=2, size=4)
485491
486492 .. sourcecode:: python
493+
487494 >>> y1, x1, y2, x2 = 100, 100, 103, 104
488495 >>> print(nir[y1:y2, x1:x2].data)
489496 [[1519. 1504. 1530. 1589.]
@@ -554,6 +561,7 @@ def nbr2(swir1_agg: xr.DataArray,
554561 --------
555562 .. plot::
556563 :include-source:
564+
557565 >>> from xrspatial.datasets import get_data
558566 >>> data = get_data('sentinel-2') # Open Example Data
559567 >>> swir1 = data['SWIR1']
@@ -566,6 +574,7 @@ def nbr2(swir1_agg: xr.DataArray,
566574 >>> nbr2_agg.plot(aspect=2, size=4)
567575
568576 .. sourcecode:: python
577+
569578 >>> y1, x1, y2, x2 = 100, 100, 103, 104
570579 >>> print(swir1[y1:y2, x1:x2].data)
571580 [[2092. 2242. 2333. 2382.]
@@ -630,7 +639,7 @@ def ndvi(nir_agg: xr.DataArray,
630639 --------
631640 .. plot::
632641 :include-source:
633- >>> from xrspatial.datasets import get_data
642+ >>> from xrspatial.datasets import get_data
634643 >>> data = get_data('sentinel-2') # Open Example Data
635644 >>> nir = data['NIR']
636645 >>> red = data['Red']
@@ -642,6 +651,7 @@ def ndvi(nir_agg: xr.DataArray,
642651 >>> ndvi_agg.plot(aspect=2, size=4)
643652
644653 .. sourcecode:: python
654+
645655 >>> y1, x1, y2, x2 = 100, 100, 103, 104
646656 >>> print(nir[y1:y2, x1:x2].data)
647657 [[1519. 1504. 1530. 1589.]
@@ -710,6 +720,7 @@ def ndmi(nir_agg: xr.DataArray,
710720 --------
711721 .. plot::
712722 :include-source:
723+
713724 >>> from xrspatial.datasets import get_data
714725 >>> data = get_data('sentinel-2') # Open Example Data
715726 >>> nir = data['NIR']
@@ -722,6 +733,7 @@ def ndmi(nir_agg: xr.DataArray,
722733 >>> ndmi_agg.plot(aspect=2, size=4)
723734
724735 .. sourcecode:: python
736+
725737 >>> y1, x1, y2, x2 = 100, 100, 103, 104
726738 >>> print(nir[y1:y2, x1:x2].data)
727739 [[1519. 1504. 1530. 1589.]
@@ -892,6 +904,7 @@ def savi(nir_agg: xr.DataArray,
892904 --------
893905 .. plot::
894906 :include-source:
907+
895908 >>> from xrspatial.datasets import get_data
896909 >>> data = get_data('sentinel-2') # Open Example Data
897910 >>> nir = data['NIR']
@@ -904,6 +917,7 @@ def savi(nir_agg: xr.DataArray,
904917 >>> savi_agg.plot(aspect=2, size=4)
905918
906919 .. sourcecode:: python
920+
907921 >>> print(nir[y1:y2, x1:x2].data)
908922 [[1519. 1504. 1530. 1589.]
909923 [1491. 1473. 1542. 1609.]
@@ -1020,6 +1034,7 @@ def sipi(nir_agg: xr.DataArray,
10201034 --------
10211035 .. plot::
10221036 :include-source:
1037+
10231038 >>> from xrspatial.datasets import get_data
10241039 >>> data = get_data('sentinel-2') # Open Example Data
10251040 >>> nir = data['NIR']
@@ -1034,6 +1049,7 @@ def sipi(nir_agg: xr.DataArray,
10341049 >>> sipi_agg.plot(aspect=2, size=4)
10351050
10361051 .. sourcecode:: python
1052+
10371053 >>> y1, x1, y2, x2 = 100, 100, 103, 104
10381054 >>> print(nir[y1:y2, x1:x2].data)
10391055 [[1519. 1504. 1530. 1589.]
@@ -1357,6 +1373,7 @@ def true_color(r, g, b, nodata=1, c=10.0, th=0.125, name='true_color'):
13571373 --------
13581374 .. plot::
13591375 :include-source:
1376+
13601377 >>> from xrspatial.datasets import get_data
13611378 >>> data = get_data('sentinel-2') # Open Example Data
13621379 >>> red = data['Red']
0 commit comments