{"id":13712552,"url":"https://github.com/thomasp85/ggfx","last_synced_at":"2025-04-07T14:14:10.865Z","repository":{"id":53597404,"uuid":"224822453","full_name":"thomasp85/ggfx","owner":"thomasp85","description":"Filters and Shaders for 'ggplot2'","archived":false,"fork":false,"pushed_at":"2022-10-21T03:59:41.000Z","size":42994,"stargazers_count":171,"open_issues_count":14,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T12:04:45.483Z","etag":null,"topics":["filters","ggplot2","graphics","rstats"],"latest_commit_sha":null,"homepage":"https://ggfx.data-imaginist.com","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/thomasp85.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"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}},"created_at":"2019-11-29T09:35:15.000Z","updated_at":"2025-03-19T04:13:14.000Z","dependencies_parsed_at":"2022-08-23T12:20:19.105Z","dependency_job_id":null,"html_url":"https://github.com/thomasp85/ggfx","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasp85%2Fggfx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasp85%2Fggfx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasp85%2Fggfx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasp85%2Fggfx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasp85","download_url":"https://codeload.github.com/thomasp85/ggfx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247666015,"owners_count":20975788,"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":["filters","ggplot2","graphics","rstats"],"created_at":"2024-08-02T23:01:19.759Z","updated_at":"2025-04-07T14:14:10.843Z","avatar_url":"https://github.com/thomasp85.png","language":"R","funding_links":[],"categories":["Themes and aesthetics","R","ggplot"],"sub_categories":["Miscellaneous"],"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}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# ggfx \u003ca href='https://ggfx.data-imaginist.com'\u003e\u003cimg src='man/figures/logo.png' align=\"right\" height=\"138\" /\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n[![Codecov test coverage](https://codecov.io/gh/thomasp85/ggfx/branch/main/graph/badge.svg)](https://app.codecov.io/gh/thomasp85/ggfx?branch=main)\n[![R-CMD-check](https://github.com/thomasp85/ggfx/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/thomasp85/ggfx/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\nggfx is a (currently experimantal) package that allows the use of various \nfilters and shaders on ggplot2 layers.\n\n## Installation\nYou can install ggfx from CRAN in the usual manner (`install.packages('ggfx')`)\nor you can grab the development version directly from github using the devtools\npackage:\n\n``` r\n# install.packages('devtools')\ndevtools::install_github('thomasp85/ggfx')\n```\n\n## Example\nThe basic API of ggfx is to provide a range of `with_*()` modifier functions \ninstead of special versions of common geoms. This means that ggfx will work with\nany geom from ggplot2 and the extension packages (I think...). An example \nshowing some of the different functionalities are given below. Note that the\noutput is produced with regular geoms.\n\n```{r example, message=FALSE, fig.asp=0.4, dev='ragg_png', dpi=300}\nlibrary(ggplot2)\nlibrary(ggfx)\nggplot() + \n  as_reference(\n    geom_polygon(aes(c(0, 1, 1), c(0, 0, 1)), colour = NA, fill = 'magenta'), \n    id = \"displace_map\"\n  ) + \n  with_displacement(\n    geom_text(aes(0.5, 0.5, label = 'ggfx-ggfx'), size = 25, fontface = 'bold'), \n    x_map = ch_red(\"displace_map\"), \n    y_map = ch_blue(\"displace_map\"),\n    x_scale = unit(0.025, 'npc'),\n    id = \"text\"\n  ) +\n  with_blend(\n    geom_density_2d_filled(aes(rnorm(1e4, 0.5, 0.2), rnorm(1e4, 0.5, 0.2)), \n                           show.legend = FALSE),\n    bg_layer = \"text\",\n    blend_type = \"in\",\n    id = \"blended\"\n  ) + \n  with_shadow(\"blended\", sigma = 3) + \n  coord_cartesian(xlim = c(0, 1), ylim = c(0, 1), clip = 'off') + \n  labs(x = NULL, y = NULL)\n```\n\n## Code of Conduct\nPlease note that the ggfx project is released with a [Contributor Code of Conduct](https://ggfx.data-imaginist.com/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasp85%2Fggfx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasp85%2Fggfx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasp85%2Fggfx/lists"}