Skip to content

Commit

Permalink
update matrix.Rmd
Browse files Browse the repository at this point in the history
  • Loading branch information
wanghui5801 committed Dec 16, 2024
1 parent 6565cbc commit 1c6c2d2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions R/classes.R
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@ plot.pc_matrix <- function(x, status,
ggplot2::element_text()
else
ggplot2::element_blank()
)
) +
ggplot2::coord_fixed(ratio = 1.1)

# Add text if requested
if(show_text) {
Expand Down Expand Up @@ -769,7 +770,8 @@ plot.pc_effect <- function(x, status = "positive", add_label = TRUE,
axis.line.x = ggplot2::element_line(),
axis.line.y = ggplot2::element_line(),
legend.key = ggplot2::element_blank()
)
) +
ggplot2::coord_fixed(ratio = 1.1)

# Add labels if requested
if (add_label) {
Expand Down
8 changes: 4 additions & 4 deletions vignettes/matrix.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,19 @@ Then we can visualize the result by `plotMatrix` function.
- positive status

```{r}
plot(result, "positive") + ggplot2::coord_fixed()
plot(result, "positive")
```

- negative status

```{r}
plot(result, "negative") + ggplot2::coord_fixed()
plot(result, "negative")
```

- dark status

```{r}
plot(result, "dark") + ggplot2::coord_fixed()
plot(result, "dark")
```

We could see that there is a obvious positive connection in this system.
Expand All @@ -112,5 +112,5 @@ print(effects)
Then we could observe the total effect in pattern causality.

```{r}
plot(effects, status="negative") + ggplot2::coord_fixed()
plot(effects, status="negative")
```

0 comments on commit 1c6c2d2

Please sign in to comment.