How To Make Simple Animation in R?

Animation in R with gganimate

In this post, we will learn to make simple animation in R using gganimate package. gganimate R package is a powerful package to make animation using R. gganimate extends the grammar of graphics as implemented by ggplot2 to include the description of animation. It does this by providing a range of new grammar classes that… Continue reading How To Make Simple Animation in R?

How To Make Scatter Plot with Regression Line with ggplot2 in R?

Scatter Plot with gam Regression line with ggplot2 in R

Adding regression line to scatter plot can help reveal the relationship or association between the two numerical variables in the scatter plot. With ggplot2, we can add regression line using geom_smooth() function as another layer to scatter plot. In this post, we will see examples of adding regression lines to scatterplot using ggplot2 in R.… Continue reading How To Make Scatter Plot with Regression Line with ggplot2 in R?

How To Make Facet Plot using facet_wrap() in ggplot2?

Faceting with ggplot2

When you have data for a variable corresponding to multiple groups, visualizing the data for each group can be useful. One of the techniques to use is to visualize data from multiple groups in a single plot. However, a better way visualize data from multiple groups is to use “facet” or small multiples. ggplot2 makes… Continue reading How To Make Facet Plot using facet_wrap() in ggplot2?

How To Adjust Title Position in ggplot2 ?

How to Align Title Position in ggplot2?

One of the annoying things while making a plot is fine tuning it the way you want. Sometimes ones of such pain points is placing the title on the plot. Till recently, ggplot2 placed title or subtitle such that it aligns with the plotting area. In this post we will learn how to use ggplot2… Continue reading How To Adjust Title Position in ggplot2 ?

How to Add Vertical Lines By a Variable in Multiple Density Plots with ggplot2

Add Vertical Lines Colored by Variable In Multiple Density Plot

Adding vertical line or lines at mean or median of density plot can help us understand the trend in the data. When you make multiple density plots adding vertical mean/median line for each group in the same color as the density plot is of great help. In this post, we will see an example of… Continue reading How to Add Vertical Lines By a Variable in Multiple Density Plots with ggplot2

Exit mobile version