Skip to content

Commit

Permalink
dpi
Browse files Browse the repository at this point in the history
  • Loading branch information
DominiqueMakowski committed Feb 10, 2021
1 parent d8d0ccd commit bee1e9d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions 1_descriptive.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ editor_options:

Here's a cool plot:

```{r 1_plot_scatter_basic, warning=FALSE, message=FALSE, fig.heiht=figheight, fig.width=figwidth}
```{r 1_plot_scatter_basic, warning=FALSE, message=FALSE, fig.heiht=figheight, fig.width=figwidth, dpi=150}
ggplot(df, aes(x=V1, y=V2, color=Participant)) +
geom_point() +
see::theme_modern()
Expand All @@ -21,7 +21,7 @@ ggplot(df, aes(x=V1, y=V2, color=Participant)) +
That's another great plot:


```{r 1_plot_density, warning=FALSE, message=FALSE, fig.heiht=figheight, fig.width=figwidth}
```{r 1_plot_density, warning=FALSE, message=FALSE, fig.heiht=figheight, fig.width=figwidth, dpi=150}
plot(bayestestR::estimate_density(df[c("V1", "V2")])) +
see::theme_blackboard()
```
Expand Down
2 changes: 1 addition & 1 deletion 2_inferential.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ editor_options:

Here is another analysis that is contained in a separate file. Let's check-out this linear regression model (note that, in the code chunk parameters, I multiplied `figheight` by 2 to have a taller plot):

```{r 2_plot_model, warning=FALSE, message=FALSE, fig.heiht=figheight * 2, fig.width=figwidth}
```{r 2_plot_model, warning=FALSE, message=FALSE, fig.heiht=figheight * 2, fig.width=figwidth, dpi=150}
model <- lm(Petal.Length ~ Sepal.Length, data=iris)
performance::check_model(model)
```
Binary file modified figures/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,16 @@ cat(paste("The data consists of",
age = "Age")))
```



Note that the chunks generating figures in the code below have some arguments specified in their header, such as `fig.width` and `fig.height`, which controls the figure size. These were filled with an eponym argument defined in [`utils/config.R`](https://github.com/RealityBending/TemplateResults/blob/main/utils/config.R#L26-L27). We also set the resolution, i.e., `dpi`, to a low value so that the resulting file is lighter. But **don't forget to crank this value up** (to 300-600) to get nice-looking results.


# Descriptive Stats {.tabset}

Notice the `{.tabset}` tag after the section name. This will show the subsections as different tabs (in the [html version](https://realitybending.github.io/TemplateResults/#Descriptive_Stats) only, because the other formats are static).


```{r child=if (fast == FALSE) '1_descriptive.Rmd'}
```

Expand Down

0 comments on commit bee1e9d

Please sign in to comment.