Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ Imports:
dplyr,
stringr,
farver,
hunspell
Remotes:
wch/Rttf2pt1,
wch/extrafont
RoxygenNote: 7.2.3
hunspell,
Rttf2pt1,
extrafont
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.3
VignetteBuilder: knitr
18 changes: 7 additions & 11 deletions R/ktheme-package.R
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
#' Theme and Theme Components for 'ggplot2' for KTH's graphical profile
#' Theme and Theme Components for ggplot2 for KTH's graphical profile
#'
#' The core themes: `theme_kth_neo` uses Figtree and `theme_kth` uses Open Sans
#' The core themes: `theme_kth_neo` uses Figtree and `theme_kth` uses Open Sans.
#' There is an option `ktheme.loadfonts` which – if set to `TRUE` – will
#' call `extrafont::loadfonts()` to register non‑core fonts with R PDF &
#' PostScript devices. On Windows the same function registers the fonts
#' with the Windows graphics device.
#'
#' There is an option `ktheme.loadfonts` which -- if set to `TRUE` -- will
#' call `extrafont::loadfonts()` to register non-core fonts with R PDF & PostScript
#' devices. If you are running under Windows, the package calls the same function
#' to register non-core fonts with the Windows graphics device.
#'
#' @md
#' @name ktheme
#' @docType package
#' @keywords internal
#' @import ggplot2 grid scales extrafont grDevices
#' @importFrom magrittr %>%
#' @importFrom gdtools set_dummy_conf
#' @import rmarkdown knitr htmltools
#' @importFrom tools file_path_sans_ext
NULL
"_PACKAGE"

#' ktheme exported operators
#'
Expand Down
22 changes: 11 additions & 11 deletions R/theme-kth.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ theme_kth <- function(base_family="Open Sans", base_size = 11.5,

if (inherits(grid, "character") | grid == TRUE) {

ret <- ret + theme(panel.grid=element_line(color=grid_col, size=0.2))
ret <- ret + theme(panel.grid.major=element_line(color=grid_col, size=0.2))
ret <- ret + theme(panel.grid.minor=element_line(color=grid_col, size=0.15))
ret <- ret + theme(panel.grid=element_line(color=grid_col, linewidth=0.2))
ret <- ret + theme(panel.grid.major=element_line(color=grid_col, linewidth=0.2))
ret <- ret + theme(panel.grid.minor=element_line(color=grid_col, linewidth=0.15))

if (inherits(grid, "character")) {
if (regexpr("X", grid)[1] < 0) ret <- ret + theme(panel.grid.major.x=element_blank())
Expand All @@ -91,22 +91,22 @@ theme_kth <- function(base_family="Open Sans", base_size = 11.5,
}

if (inherits(axis, "character") | axis == TRUE) {
ret <- ret + theme(axis.line=element_line(color="#2b2b2b", size=0.15))
ret <- ret + theme(axis.line=element_line(color="#2b2b2b", linewidth=0.15))
if (inherits(axis, "character")) {
axis <- tolower(axis)
if (regexpr("x", axis)[1] < 0) {
ret <- ret + theme(axis.line.x=element_blank())
} else {
ret <- ret + theme(axis.line.x=element_line(color=axis_col, size=0.15))
ret <- ret + theme(axis.line.x=element_line(color=axis_col, linewidth=0.15))
}
if (regexpr("y", axis)[1] < 0) {
ret <- ret + theme(axis.line.y=element_blank())
} else {
ret <- ret + theme(axis.line.y=element_line(color=axis_col, size=0.15))
ret <- ret + theme(axis.line.y=element_line(color=axis_col, linewidth=0.15))
}
} else {
ret <- ret + theme(axis.line.x=element_line(color=axis_col, size=0.15))
ret <- ret + theme(axis.line.y=element_line(color=axis_col, size=0.15))
ret <- ret + theme(axis.line.x=element_line(color=axis_col, linewidth=0.15))
ret <- ret + theme(axis.line.y=element_line(color=axis_col, linewidth=0.15))
}
} else {
ret <- ret + theme(axis.line=element_blank())
Expand All @@ -117,9 +117,9 @@ theme_kth <- function(base_family="Open Sans", base_size = 11.5,
ret <- ret + theme(axis.ticks.x = element_blank())
ret <- ret + theme(axis.ticks.y = element_blank())
} else {
ret <- ret + theme(axis.ticks = element_line(size=0.15))
ret <- ret + theme(axis.ticks.x = element_line(size=0.15))
ret <- ret + theme(axis.ticks.y = element_line(size=0.15))
ret <- ret + theme(axis.ticks = element_line(linewidth=0.15))
ret <- ret + theme(axis.ticks.x = element_line(linewidth=0.15))
ret <- ret + theme(axis.ticks.y = element_line(linewidth=0.15))
ret <- ret + theme(axis.ticks.length = grid::unit(5, "pt"))
}

Expand Down
Binary file removed man/figures/README-unnamed-chunk-10-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-11-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-11-2.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-12-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-12-2.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-13-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-13-2.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-3-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-3-2.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-3-3.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-3-4.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-3-5.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-3-6.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-3-7.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-4-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-4-2.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-4-3.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-5-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-5-1.png.orig
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-5-2.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-6-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-6-2.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-7-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-7-1.png.orig
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-8-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-8-1.png.orig
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-9-1.png
Binary file not shown.
Binary file removed man/figures/README-unnamed-chunk-9-1.png.orig
Binary file not shown.
27 changes: 27 additions & 0 deletions man/ktheme-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions man/ktheme.Rd

This file was deleted.

25 changes: 20 additions & 5 deletions man/scale_kth.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/scale_x_percent.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions man/sdg_colors.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions man/theme_kth.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions man/theme_kth_neo.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions man/theme_kth_osc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/update_geom_font_defaults.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.