Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion creating-scatter.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ subplot(
knitr::include_graphics("images/color-types.svg")
```

There are numerous ways to alter the default color scale via the `colors` argument. This argument excepts one of the following: (1) a color brewer palette name (see the row names of `RColorBrewer::brewer.pal.info` for valid names), (2) a vector of colors to interpolate, or (3) a color interpolation function like `colorRamp()` or `scales::colour_ramp()`. Although this grants a lot of flexibility, one should be conscious of using a sequential colorscale for numeric variables (and ordered factors) as shown in Figure \@ref(fig:color-numeric), and a qualitative colorscale for discrete variables as shown in Figure \@ref(fig:color-discrete).
There are numerous ways to alter the default color scale via the `colors` argument. This argument expects (or accepts) one of the following: (1) a color brewer palette name (see the row names of `RColorBrewer::brewer.pal.info` for valid names), (2) a vector of colors to interpolate, or (3) a color interpolation function like `colorRamp()` or `scales::colour_ramp()`. Although this grants a lot of flexibility, one should be conscious of using a sequential colorscale for numeric variables (and ordered factors) as shown in Figure \@ref(fig:color-numeric), and a qualitative colorscale for discrete variables as shown in Figure \@ref(fig:color-discrete).

```r
col1 <- c("#132B43", "#56B1F7")
Expand Down