basetheme

Themes for base plotting system in R

https://github.com/karoliskoncevicius/basetheme

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.5%) to scientific vocabulary

Keywords

base graphics plot r themes
Last synced: 6 months ago · JSON representation

Repository

Themes for base plotting system in R

Basic Info
  • Host: GitHub
  • Owner: karoliskoncevicius
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 72.3 KB
Statistics
  • Stars: 137
  • Watchers: 11
  • Forks: 5
  • Open Issues: 2
  • Releases: 0
Topics
base graphics plot r themes
Created almost 7 years ago · Last pushed almost 3 years ago
Metadata Files
Readme Changelog Funding

README.md

CRAN version dependencies Monthly Downloads

basetheme

R package implementing a theming system for base plotting.

Description

The basetheme() function provides a persistent way to set and unset R plotting settings. All the user has to do is set the theme once and it will be consistently applied to all the subsequent plots even after the graphics device is closed. The function only works with base graphics system, so if you are exclusively working with ggplot2, boy, did you install the wrong package.

Usage

The persistent settings are controlled via the basetheme() function. To an extent this function mimics the behaviour and arguments of par() and has multiple modes of operation:

```r

Specifying the par() values directly:

basetheme(pch=19, mgp=c(2,.7,0), tck=-.01)

Choosing a theme by name:

basetheme("clean")

Using a mix of the above:

basetheme("minimal", bg="grey", pch=1)

Specifying a list with theme values:

theme <- basetheme("clean") theme$cex.main <- 2 basetheme(theme)

Obtaining a list of parameters for the current theme:

basetheme()

Removing the current theme:

basetheme(NULL) ```

In addition to basetheme() two additional functions are provided for colors manipulation within the plots: num2col() and lab2col(). See documentation: help(basetheme), help(num2col), help(lab2col) and examples: example(basetheme), example(num2col), example(lab2col) for more details.

Some Examples

A few examples using of how it all works together.

r basetheme("void") boxplot(split(iris$Sepal.Width, iris$Species))

r basetheme("clean") barplot(rivers, col=num2col(rivers))

r basetheme("brutal") plot(hclust(dist(USArrests), "ward.D2"), hang=-1)

r basetheme("royal") pairs(iris[-5], bg=lab2col(iris$Species), col=0)

r basetheme("deepblue") pairs(iris[-5], bg=num2col(iris[,1]), col=0)

```r x <- seq(-1.95, 1.95, length = 30) y <- seq(-1.95, 1.95, length = 35) z <- outer(x, y, function(a, b) a*b^2)

basetheme("dark") persp(x, y, z, theta=-45) ```

More Details

Additional details can be found in the Wiki pages:

  1. List of Available Themes
  2. Creating Custom Themes
  3. Installation Instructions
  4. Implementation Details

See Also

CRAN:

  1. prettyB

GitHub:

  1. styles

Owner

  • Name: Karolis Koncevičius
  • Login: karoliskoncevicius
  • Kind: user
  • Location: Vilnius, Lithuania

GitHub Events

Total
  • Issues event: 1
  • Watch event: 3
Last Year
  • Issues event: 1
  • Watch event: 3

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 103
  • Total Committers: 1
  • Avg Commits per committer: 103.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
KarolisKoncevicius k****s@g****m 103

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 5
  • Total pull requests: 0
  • Average time to close issues: 2 months
  • Average time to close pull requests: N/A
  • Total issue authors: 3
  • Total pull request authors: 0
  • Average comments per issue: 7.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • karoliskoncevicius (3)
  • druedin (1)
  • lunacookies (1)
Pull Request Authors
Top Labels
Issue Labels
tag: abandoned (2) new feature (2) meta (1) tag: completed (1) bug (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • cran 440 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 8
  • Total maintainers: 1
proxy.golang.org: github.com/karoliskoncevicius/basetheme
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
cran.r-project.org: basetheme

Themes for Base Graphics Plots

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 440 Last month
Rankings
Stargazers count: 3.3%
Forks count: 9.6%
Average: 17.7%
Downloads: 22.7%
Dependent repos count: 23.9%
Dependent packages count: 28.7%
Last synced: 6 months ago