Skip to content

Commit

Permalink
minor adjustments to figures in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
giocomai committed Nov 2, 2024
1 parent 68df886 commit f5aeca1
Show file tree
Hide file tree
Showing 22 changed files with 67 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: riskviewer
Title: A modern implementation of the Risk Characterisation Theatre
Version: 0.0.0.9002
Version: 0.0.0.9003
Authors@R:
c(person(given = "Giorgio",
family = "Comai",
Expand Down
33 changes: 31 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,35 @@ More context in the package vignette.

The package has been created as a quick experimentation of how it would be possible to implement the risk characterisation theatre. At this stage, the codebase is still messy and poorly documented. Customisation of parameters is largely untested, so anything differing significantly from the examples documented in the README and vignette will likely not work.

### Common issues

The output really works only when exported at suitable sizes. For example, for a basic combination of two airplanes such as the first example in this readme, export with width set 12 and height set to 14 and you'll get the expected result. E.g. based on the example below:

```{r example_export, eval = FALSE}
plane_1 + plane_2
ggplot2::ggsave(filename = "plane_combo.png",
plot = plane_1 + plane_2,
width = 12,
height = 14,
bg = "white")
```


Beware of fonts: if you don't have either "Roboto Condensed" or "Roboto Mono" installed and available in R, the output will probably just look completely wrong. You can either try with other fonts, or use default fonts: defaults fonts should work (or at least, they do on my computer), even if the look less satisfying.

In order to check if a given font is available, try:

```{r font checks, eval = FALSE}
library("extrafont")
#extrafont::font_import()
"Roboto Condensed" %in% fonts()
"Roboto Mono" %in% fonts()
```

## Installation

You can install `riskviewer` from [GitHub](https://github.com/EDJNet/riskviewer) with:
Expand Down Expand Up @@ -227,11 +256,11 @@ graphs <- list(
rv_create_arena(ratio = 0.8, title = "Scenario B", ggplot = TRUE)
)
rv_img(plot = graphs, stack = TRUE)
rv_img(plot = graphs, stack = TRUE, quality = "medium")
```

```{r arena_combo_no_stack}
rv_img(plot = graphs, stack = FALSE)
rv_img(plot = graphs, stack = FALSE, quality = "medium")
```


Expand Down
37 changes: 35 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,39 @@ of parameters is largely untested, so anything differing significantly
from the examples documented in the README and vignette will likely not
work.

### Common issues

The output really works only when exported at suitable sizes. For
example, for a basic combination of two airplanes such as the first
example in this readme, export with width set 12 and height set to 14
and you’ll get the expected result. E.g. based on the example below:

``` r

plane_1 + plane_2

ggplot2::ggsave(filename = "plane_combo.png",
plot = plane_1 + plane_2,
width = 12,
height = 14,
bg = "white")
```

Beware of fonts: if you don’t have either “Roboto Condensed” or “Roboto
Mono” installed and available in R, the output will probably just look
completely wrong. You can either try with other fonts, or use default
fonts: defaults fonts should work (or at least, they do on my computer),
even if the look less satisfying.

In order to check if a given font is available, try:

``` r
library("extrafont")
#extrafont::font_import()
"Roboto Condensed" %in% fonts()
"Roboto Mono" %in% fonts()
```

## Installation

You can install `riskviewer` from
Expand Down Expand Up @@ -251,13 +284,13 @@ graphs <- list(
rv_create_arena(ratio = 0.8, title = "Scenario B", ggplot = TRUE)
)

rv_img(plot = graphs, stack = TRUE)
rv_img(plot = graphs, stack = TRUE, quality = "medium")
```

<img src="man/figures/README-arena_combo-1.png" width="100%" />

``` r
rv_img(plot = graphs, stack = FALSE)
rv_img(plot = graphs, stack = FALSE, quality = "medium")
```

<img src="man/figures/README-arena_combo_no_stack-1.png" width="100%" />
Expand Down
Binary file added man/figures/README-airplane_example_2-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 added man/figures/README-airplane_example_AB-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 added man/figures/README-airplane_example_combo-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 added man/figures/README-airplane_example_more-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 added man/figures/README-arena005-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 added man/figures/README-arena03-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 added man/figures/README-arena_combo-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 added man/figures/README-arena_combo_no_stack-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-compact_many-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-compact_one-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 removed man/figures/README-unnamed-chunk-10-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-2-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-3-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-4-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-5-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-7-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-8-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-9-1.png
Binary file not shown.
Binary file added plane_combo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f5aeca1

Please sign in to comment.