Convert from beziers to line segments in pure #RStats.

Here's the tiger, once with false colour, once with real colours. Plotted with #ggplot geom_polygon()

Feeling pretty good for a bit of lazy #WeekendCoding

Make interactive ggplots with {ggiraph}: https://davidgohel.github.io/ggiraph/ #ggplot #dataviz #rstats #UI #UX
Make ggplot2 Graphics Interactive

Create interactive ggplot2 graphics using htmlwidgets.

#ggplot raw svg data

Stroke is coloured by the shape index within the SVG.

#RStats

Reconsidering shape of the returned data to make use with #ggplot easier.

#RStats

Enrich your ggplots with extra panels along the x and y axis: https://github.com/jtlandis/ggside #ggplot #dataviz #rstats
GitHub - jtlandis/ggside: ggplot2 extension allowing for plotting various geometries as side panels using the ggplot2 API

ggplot2 extension allowing for plotting various geometries as side panels using the ggplot2 API - jtlandis/ggside

GitHub
Using fonts in R graphics can be tricky at times. {showtext} aims to make it easier: https://cran.rstudio.com/web/packages/showtext/vignettes/introduction.html #rstats #dataviz #ggplot
showtext: Using Fonts More Easily in R Graphs

Find the best contrast between one color and a list of options, e.g. for labels in geom_tile: {prismatic::best_contrast()} https://emilhvitfeldt.github.io/prismatic/reference/best_contrast.html #rstats #dataviz #ggplot #colors
Find highest contrast color — best_contrast

best_contrast() finds the color in y with the highest contrast to the color x.

I did not know about ggplot_build() before. It can come in handy in situations where you want to access computed metrics of a #ggplot. https://ggplot2.tidyverse.org/reference/ggplot_build.html. Thanks @thedatainklab for sharing. #rstats #ci
Build ggplot for rendering. — ggplot_build

build_ggplot() takes the plot object, and performs all steps necessary to produce an object that can be rendered. This function outputs two pieces: a list of data frames (one for each layer), and a panel object, which contain all information about axis limits, breaks etc. The ggplot_build() function is vestigial and build_ggplot() should be used instead.

3D ggplot of parabolic great circle trajectories (i.e. ballistic-ish paths) on a non-linear Robinson projection: how do we ensure the 3D data is consistent with the underlying ggplot? Simple: we extract the coordinate transformation from the ggplot object itself!

#RStats #rayshader #ggplot

r-charts.com provides example code for a variety of chart types, both in base R and ggplot: https://r-charts.com/ #rstats #ggplot #design
R CHARTS | A collection of charts and graphs made with the R programming language

Over 1400 graphs with reproducible code divided in 8 big categories and over 50 chart types, in addition of tools to choose and create colors and color palettes

R CHARTS | A collection of charts and graphs made with the R programming language