Skip to content

Commit

Permalink
Update the readme and regenerate.
Browse files Browse the repository at this point in the history
  • Loading branch information
coatless committed Jan 17, 2024
1 parent db82f68 commit f12278a
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ library(drawr)
# Graphic of matrix data structure using base R graphics
draw_matrix(mat_3x5)
# Show the cell indices
draw_matrix(mat_3x5, show_cell_indices = TRUE)
# Show the row and column indices
draw_matrix(mat_3x5, show_row_indices = TRUE, show_column_indices = TRUE)
draw_matrix(mat_3x5, show_indices = "cell")
# Show all indices
draw_matrix(mat_3x5, show_indices = "all")
# Highlight cells over a specific value
draw_matrix(mat_3x5, highlight_area = mat_3x5 > 4)
```
Expand All @@ -85,7 +85,9 @@ We can achieve similar results with the `ggplot2` function.
# Graphic of matrix data structure using base R graphics
gdraw_matrix(mat_3x5)
# Highlight cells in specific columns
gdraw_matrix(mat_3x5, highlight_area = highlight_columns(mat_3x5, columns = 2:4))
gdraw_matrix(mat_3x5,
show_indices = c("row", "column"),
highlight_area = highlight_columns(mat_3x5, columns = 2:4))
```


Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ draw_matrix(mat_3x5)

``` r
# Show the cell indices
draw_matrix(mat_3x5, show_cell_indices = TRUE)
draw_matrix(mat_3x5, show_indices = "cell")
```

<img src="man/figures/README-base-example-2.png" width="100%" />

``` r
# Show the row and column indices
draw_matrix(mat_3x5, show_row_indices = TRUE, show_column_indices = TRUE)
# Show all indices
draw_matrix(mat_3x5, show_indices = "all")
```

<img src="man/figures/README-base-example-3.png" width="100%" />
Expand All @@ -94,7 +94,9 @@ gdraw_matrix(mat_3x5)

``` r
# Highlight cells in specific columns
gdraw_matrix(mat_3x5, highlight_area = highlight_columns(mat_3x5, columns = 2:4))
gdraw_matrix(mat_3x5,
show_indices = c("row", "column"),
highlight_area = highlight_columns(mat_3x5, columns = 2:4))
```

<img src="man/figures/README-ggplot2-example-2.png" width="100%" />
Binary file modified man/figures/README-base-example-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-base-example-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-base-example-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-base-example-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggplot2-example-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-ggplot2-example-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed man/figures/README-ggplot2-example-3.png
Binary file not shown.
Binary file removed man/figures/README-ggplot2-example-4.png
Binary file not shown.

0 comments on commit f12278a

Please sign in to comment.