Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning Lato font not found #81

Open
tschaffter opened this issue Jan 30, 2022 · 0 comments
Open

Fix warning Lato font not found #81

tschaffter opened this issue Jan 30, 2022 · 0 comments

Comments

@tschaffter
Copy link
Owner

The issue appeared first in #80.

> library("sagethemes")
> head(sage_colors, n = 3)
$royal
      200       300       400       500       600       700       800 
"#D5CFE3" "#B2A5D1" "#907FBA" "#5A478F" "#47337D" "#332069" "#251454" 

$powder
      200       300       400       500       600       700       800 
"#E1F4F5" "#C5EDF0" "#A6DDE0" "#7EC8CC" "#5BB0B5" "#2F8E94" "#0C656B" 

$coral
      200       300       400       500       600       700       800 
"#F7E2DF" "#FFC5BD" "#FCA79A" "#F47E6C" "#DA614F" "#BD422F" "#8F1D0B" 

> library("ggplot2")
> library("extrafont")
Registering fonts with R
> library("sagethemes")
> 
> # discrete
> ggplot(mpg, aes(displ, hwy, colour = class)) +
+   geom_point() +
+   scale_color_sage_d() +
+   theme_sage()
Warning: Lato font not found; falling back to ggplot2 default. Please install Lato on your system.
> ggplot(mpg, aes(x = factor(year), fill = class)) +
+   geom_bar() +
+   scale_fill_sage_d() +
+   theme_sage()
Warning: Lato font not found; falling back to ggplot2 default. Please install Lato on your system.
> # continuous
> ggplot(faithfuld, aes(waiting, eruptions, fill = density)) +
+   geom_tile() +
+   scale_fill_sage_c(option = "powder") +
+   theme_sage()
Warning: Lato font not found; falling back to ggplot2 default. Please install Lato on your system.
> # binned -- note this requires ggplot2 version 3.3.1.9000 or greater
> ggplot(faithfuld, aes(waiting, eruptions, fill = density)) +
+   geom_tile() +
+   scale_fill_sage_b(option = "powder") +
+   theme_sage()
Warning: Lato font not found; falling back to ggplot2 default. Please install Lato on your system.
> ggplot(mpg, aes(displ, hwy, colour = class)) +
+   geom_point() +
+   scale_color_sage_d() +
+   theme_sage() +
+   labs(
+     title = "Gas mileage",
+     subtitle = "Highway miles per gallon vs. engine displacement in liters"
+   ) +
+   logo_image() +
+   logo_layout()
Warning: Lato font not found; falling back to ggplot2 default. Please install Lato on your system.
@tschaffter tschaffter changed the title Fix Lato font not found Fix warning Lato font not found Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant