Skip to content

Commit

Permalink
more - now for plot.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nevrome committed Oct 22, 2023
1 parent c41b206 commit a76581d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/plot.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Improving the similarity search map plot

The map figure that emerged as the result of {doc}`A basic similarity search workflow <basic>` is not particularly beautiful. We can and should apply some changes to this plot to make it more readable and visually pleasing.
The map figure that emerged as the result of {doc}`A basic similarity search workflow <basic>` is not particularly beautiful. We can and should apply some changes to this plot to make it more readable and visually pleasing. The following code is also included in the [similarity_search.R](data/similarity_search.R) script.

1. **Increase the spatial resolution** of the prediction grid. `locate()` takes more time to compute with this change, but for individual samples and time slices it is generally very much affordable to go to higher resolutions. Here we go from the 50km grid above to a much finer 20km grid. The number of spatial prediction points increases from 4738 to 29583.
1. **Increase the spatial resolution** of the prediction grid. `locate()` takes more time to compute with this change, but for individual samples and time slices it is generally very much affordable to switch to higher resolutions. Here we go from the 50km grid above to a much finer 20km grid. The number of spatial prediction points increases from 4738 to 29583.

```r
spatial_pred_grid <- mobest::create_prediction_grid(
Expand All @@ -11,7 +11,7 @@ spatial_pred_grid <- mobest::create_prediction_grid(
)
```

2. **Change the colour scale.** We chose the highly readable and colourblind-safe viridis palette.
2. **Change the colour scale.** We choose the highly readable and colourblind-safe viridis palette.

```r
ggplot() +
Expand All @@ -23,7 +23,7 @@ ggplot() +
scale_fill_viridis_c()
```

3. **Add helpful elements** to the plot. We add the border of the research area, a marker for the spatial position of the search sample, a plot title and an annotation to indicate the search timeslice.
3. **Add helpful elements** to the plot. We add the border of the research area, a marker for the spatial position of the search sample, a plot title and an annotation to indicate the search time.

```r
research_area_3035 <- research_area_4326 %>% sf::st_transform(3035)
Expand Down

0 comments on commit a76581d

Please sign in to comment.