All Projects → thomasp85 → ggfx

thomasp85 / ggfx

Licence: other
Filters and Shaders for 'ggplot2'

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to ggfx

TuSDK-for-Android-demo
TuSDK Android 图像 SDK Demo
Stars: ✭ 93 (-38%)
Mutual labels:  filters
mapr
Map species occurrence data
Stars: ✭ 34 (-77.33%)
Mutual labels:  ggplot2
basemapR
Contains functions to add base maps to ggplot2 maps
Stars: ✭ 14 (-90.67%)
Mutual labels:  ggplot2
imprint
Create Customized 'ggplot2' and 'R Markdown' Themes for Your Organization
Stars: ✭ 24 (-84%)
Mutual labels:  ggplot2
ggdogs
The geom you always wished for adding dogs to ggplot2
Stars: ✭ 28 (-81.33%)
Mutual labels:  ggplot2
eleventy-plugin-blog-tools
A collection of shortcodes, filters and tags that make blogging on 11ty more fun
Stars: ✭ 41 (-72.67%)
Mutual labels:  filters
FunnelPlotR
Funnel plots for comparing institutional performance, with overdispersion adjustment
Stars: ✭ 39 (-74%)
Mutual labels:  ggplot2
ggquiver
R package for quiver plots in 'ggplot2'
Stars: ✭ 38 (-74.67%)
Mutual labels:  ggplot2
TDAstats
R pipeline for computing persistent homology in topological data analysis. See https://doi.org/10.21105/joss.00860 for more details.
Stars: ✭ 26 (-82.67%)
Mutual labels:  ggplot2
ggtrack
restlessdata.com.au/ggtrack
Stars: ✭ 39 (-74%)
Mutual labels:  ggplot2
filter-lists
Additional Filters for AdGuard on iOS and uBlock Origin on Google Chrome
Stars: ✭ 22 (-85.33%)
Mutual labels:  filters
svelte-commerce
Svelte ecommerce - Headless, Authentication, Cart & Checkout, TailwindCSS, Server Rendered, Proxy + API Integrated, Animations, Stores, Lazy Loading, Loading Indicators, Carousel, Instant Search, Faceted Filters, Typescript, Open Source, MIT license. 1 command deploy to your own server, 1 click deploy to netlify.
Stars: ✭ 695 (+363.33%)
Mutual labels:  filters
rockthemes
R colour palettes based on classic rock album covers.
Stars: ✭ 30 (-80%)
Mutual labels:  ggplot2
ggwaffle
Creating waffle charts in a ggplot friendly way
Stars: ✭ 45 (-70%)
Mutual labels:  ggplot2
Stata-schemes
Here you will find various ready-to-use Stata schemes.
Stars: ✭ 85 (-43.33%)
Mutual labels:  ggplot2
TidyTuesday
📊 Collection of #TidyTuesday Visualisations! 📈
Stars: ✭ 59 (-60.67%)
Mutual labels:  ggplot2
R4Econ
R Code Examples Multi-dimensional/Panel Data
Stars: ✭ 16 (-89.33%)
Mutual labels:  ggplot2
platetools
An R package for plotting microtitre plates
Stars: ✭ 45 (-70%)
Mutual labels:  ggplot2
AspNetCoreFilters
ASP.NET Core MVC Filters
Stars: ✭ 34 (-77.33%)
Mutual labels:  filters
django-graphql-geojson
GeoJSON support for Graphene Django
Stars: ✭ 61 (-59.33%)
Mutual labels:  filters

ggfx

Lifecycle: experimental Codecov test coverage R-CMD-check

ggfx is a (currently experimantal) package that allows the use of various filters and shaders on ggplot2 layers.

Installation

You can install ggfx from CRAN in the usual manner (install.packages('ggfx')) or you can grab the development version directly from github using the devtools package:

# install.packages('devtools')
devtools::install_github('thomasp85/ggfx')

Example

The basic API of ggfx is to provide a range of with_*() modifier functions instead of special versions of common geoms. This means that ggfx will work with any geom from ggplot2 and the extension packages (I think…). An example showing some of the different functionalities are given below. Note that the output is produced with regular geoms.

library(ggplot2)
library(ggfx)
ggplot() + 
  as_reference(
    geom_polygon(aes(c(0, 1, 1), c(0, 0, 1)), colour = NA, fill = 'magenta'), 
    id = "displace_map"
  ) + 
  with_displacement(
    geom_text(aes(0.5, 0.5, label = 'ggfx-ggfx'), size = 25, fontface = 'bold'), 
    x_map = ch_red("displace_map"), 
    y_map = ch_blue("displace_map"),
    x_scale = unit(0.025, 'npc'),
    id = "text"
  ) +
  with_blend(
    geom_density_2d_filled(aes(rnorm(1e4, 0.5, 0.2), rnorm(1e4, 0.5, 0.2)), 
                           show.legend = FALSE),
    bg_layer = "text",
    blend_type = "in",
    id = "blended"
  ) + 
  with_shadow("blended", sigma = 3) + 
  coord_cartesian(xlim = c(0, 1), ylim = c(0, 1), clip = 'off') + 
  labs(x = NULL, y = NULL)

Code of Conduct

Please note that the ggfx project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].