Skip to content

Commit

Permalink
update example plot code with vmin)
Browse files Browse the repository at this point in the history
  • Loading branch information
gantian127 committed Jul 25, 2024
1 parent 31b37a7 commit 28151d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ for key, value in soil_grids.metadata.items():


# plot data
data.plot(figsize=(9, 5))
data.plot(figsize=(9, 5), vmin=0)
plt.title("Mean pH between 0 and 5 cm soil depth in Senegal")
```
![tif_plot](docs/source/_static/tif_plot.png)
Expand Down Expand Up @@ -136,7 +136,7 @@ extent = [min_x - dx, max_x + dx, min_y - dy, max_y + dy]

# plot data
fig, ax = plt.subplots(1, 1, figsize=(9, 5))
im = ax.imshow(data_2D, extent=extent)
im = ax.imshow(data_2D, extent=extent, vmin=0)
fig.colorbar(im)
plt.xlabel("X")
plt.ylabel("Y")
Expand Down
4 changes: 2 additions & 2 deletions docs/source/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ for key, value in soil_grids.metadata.items():


# plot data
data.plot(figsize=(9, 5))
data.plot(figsize=(9, 5), vmin=0)
plt.title("Mean pH between 0 and 5 cm soil depth in Senegal")
```

Expand Down Expand Up @@ -143,7 +143,7 @@ extent = [min_x - dx, max_x + dx, min_y - dy, max_y + dy]

# plot data
fig, ax = plt.subplots(1, 1, figsize=(9, 5))
im = ax.imshow(data_2D, extent=extent)
im = ax.imshow(data_2D, extent=extent, vmin=0)
fig.colorbar(im)
plt.xlabel("X")
plt.ylabel("Y")
Expand Down

0 comments on commit 28151d5

Please sign in to comment.