{"id":16896129,"url":"https://github.com/teunbrand/elementalist","last_synced_at":"2025-04-11T13:38:02.335Z","repository":{"id":103975767,"uuid":"275865766","full_name":"teunbrand/elementalist","owner":"teunbrand","description":"This repository provides extra theme elements as an extension of ggplot2.","archived":false,"fork":false,"pushed_at":"2024-10-03T17:34:43.000Z","size":3907,"stargazers_count":30,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T09:52:50.501Z","etag":null,"topics":["ggplot-extension","ggplot2","ggplot2-themes","visualization"],"latest_commit_sha":null,"homepage":"https://teunbrand.github.io/elementalist/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teunbrand.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-29T16:12:02.000Z","updated_at":"2025-03-14T15:53:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"28b7c7ac-1f09-4480-b89f-2e38801bcb45","html_url":"https://github.com/teunbrand/elementalist","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teunbrand%2Felementalist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teunbrand%2Felementalist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teunbrand%2Felementalist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teunbrand%2Felementalist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teunbrand","download_url":"https://codeload.github.com/teunbrand/elementalist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248410358,"owners_count":21098775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ggplot-extension","ggplot2","ggplot2-themes","visualization"],"created_at":"2024-10-13T17:28:16.575Z","updated_at":"2025-04-11T13:38:02.326Z","avatar_url":"https://github.com/teunbrand.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nragg_png = function(..., res = 192) {\n  ragg::agg_supertransparent(..., res = res, units = \"in\")\n}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\",\n  dev = \"ragg_png\",\n  fig.ext = \"png\"\n)\n```\n\n# elementalist \u003cimg src=\"man/figures/elementalist-logo.png\" align = \"right\" width = \"150\" /\u003e\n\n\u003c!-- badges: start --\u003e\n[![Travis build status](https://travis-ci.com/teunbrand/elementalist.svg?branch=master)](https://travis-ci.com/teunbrand/elementalist)\n[![Codecov test coverage](https://codecov.io/gh/teunbrand/elementalist/branch/master/graph/badge.svg)](https://codecov.io/gh/teunbrand/elementalist?branch=master)\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)\n\u003c!-- badges: end --\u003e\n\n*/ˌɛlɪˈmɛntlɪst/*\n\n## An element of whimsy\n\nelementalist extends the theme element options of [`ggplot2`](http://ggplot2.tidyverse.org). It provides variations on rectangular and line elements that go into ggplot2's `theme()` function, which tweaks the appearance of your plots. The package also has some geoms that are instructed to draw their lines and rectangles according to the theme. This is mostly a pet project that still needs some time to grow.\n\n### Installation\n\nYou can install the development version from [GitHub](https://github.com/) with:\n\n``` r\ndevtools::install_github(\"teunbrand/elementalist\")\n```\n\n### Examples\n\nAt the moment, the package has three 'styles' to choose from for lines. They are *'wiggle'*, *'multicolour'* and *'glow'*.\n\n#### Wiggle\n\n\u003e It reminded me of the retinal detachment I had last year. Cheers \u003cbr\u003e\n\u003e -*[Henrik (2020)](https://stackoverflow.com/questions/63061601/how-to-keep-linetype-spacing-constant-despite-line-size/63080260#comment111549473_63080260)*\n\nHere is an example how you can make your elements wiggle!\n\n```{r wiggle}\nlibrary(elementalist)\n\nx \u003c- seq(-3, 3, length.out = 20)\ndf \u003c- data.frame(\n  x = c(x, x),\n  y = c(dnorm(x, sd = 1), c(x)/20),\n  cat = rep(LETTERS[1:2], each = 20)\n)\n\nggplot(df, aes(x, y, colour = cat)) +\n  geom_line_theme(linewidth = 1) +\n  coord_cartesian(clip = \"off\") +\n  theme(\n    elementalist.geom_line = element_line_wiggle(6, n = 6),\n    legend.key       = element_rect_wiggle(1, colour = NA), \n    panel.background = element_rect_wiggle(sides = c(\"lb\"),\n                                           colour = \"black\"),\n    panel.grid.major = element_line_wiggle(3),\n    panel.grid.minor = element_line_wiggle(3)\n  )\n```\n\n#### Multicolour\n\nHere is how you can make them colour gradients. It defaults to rainbow colours, but you can set your own.\n\n```{r multicolour}\nggplot(economics, aes(date, unemploy)) +\n  geom_line_theme() +\n  theme(\n    elementalist.geom_line = element_line_multicolour(),\n    axis.line = element_line_multicolour(),\n    panel.grid.minor = element_line_multicolour(c(\"white\", \"transparent\", \"white\"))\n  )\n```\n\n#### Glow\n\nGlowing lines work well with a dark background. Elementalist has a theme that makes it easy to make a plot quite dark.\n\n```{r glow}\ndf \u003c- data.frame(\n  x = rep(c(2, 5, 7, 9, 12), 2),\n  y = rep(c(1, 2), each = 5),\n  z = factor(rep(1:5, each = 2)),\n  w = rep(diff(c(0, 4, 6, 8, 10, 14)), 2)\n)\n\nggplot(df, aes(xmin = x - w / 2, xmax = x + w / 2, ymin = y, ymax = y + 1)) +\n  geom_rect_theme(aes(colour = z), fill = NA) +\n  scale_colour_manual(\n    values =  c(\"#00E6FF\",\"#CF77F0\", \"#8F9FFF\", \n                \"#2ABEFF\", \"#FD006A\")\n  ) +\n  theme_black() +\n  theme(\n    panel.grid = element_line_glow(colour = \"grey10\"),\n    axis.line = element_line_glow(colour = alpha(\"#FD006A\", 0.5)),\n    axis.ticks = element_line_glow(colour = alpha(\"#FD006A\", 0.5)),\n    elementalist.geom_rect = element_rect_glow()\n  )\n```\n\n### Footnotes\n\nThis package is still in the experimental phase. Expect some bugs here and there and use at your own risk!\n\nThe logo is based on the  ['squared circle'](https://en.wikipedia.org/wiki/Alchemical_symbol#/media/File:Squaredcircle.svg) alchemical symbol representing the four elements of matter and the philosopher's stone. With an extra hexagon of course, because this is an R package, after all.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteunbrand%2Felementalist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteunbrand%2Felementalist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteunbrand%2Felementalist/lists"}