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
Additions to theme_tufte(). And more actively suggesting the use of extrafont #33
Comments
Regarding the font choice, if I recall, the plots in all the books use serif labels (Bembo), and Gill Sans is reserved for section headings? Making extrafont a requirement is a good idea. I'd rather handle dependencies in the package requirements than conditional statements within the code. Originally my thinking was that fonts are so heavily dependent on what the user has available it wasn't worth it to handle those cases, and it is easy to just set it with However, I don't think I'll add axes to the theme. The combination of Looking at the bar chart example reminded me that there is something that is missing: a geom based off of |
Speaking of fonts, did you see https://github.com/yixuan/showtext/ ? It looks like it might be a good alternative to extrafont. |
|
This issues be dormant for a while, and I don't see myself implementing it in the near future. I'll largely leave it to users to choose the appropriate font with |
Wish you'd implement both suggestions |
Proposed changes
I realize #1 is the most problematic. Given that extrafont is a fairly stable library at this point, and is a suggested requirement for ggthemes, maybe it's worth it to include a helper function that throws a warning/suggestion if extrafont isn't installed. And if it is installed, then use the
choose_font()
functionality. The assumption here is that many users of ggthemes are already looking for convenience of packaged design, and typography is an essential enough component that it's worth actively suggesting the dependency of extrafont.The main drawback, besides the extra dependency, is the user having to then run
font_import()
. Perhaps that could be implemented as a helper function too, to wrap up the library install and font import at some point during the first use of ggthemes...Set up the data and libraries
This is setup just to run my example, not necessarily for the end-user:
Credit: Data and examples modified from Zevross's excellent ggplot2 cheat sheet
Set up the plot
Current
theme_tufte()
Adding
extrafont
library checkDefining
theme_tufte_revised()
References
The Visual Display of Quantitative Information:
"Redesign of the Bar Chart/Histogram", p.128
What's your font? (RIP aaronsw):
Also: Chartjunk
The text was updated successfully, but these errors were encountered: