How to Increase Legend Key Size in ggplot2

How to Increase Color Legend's Point Size in ggplot2

In this tutorial, we will learn how to increase the color legend’s point (or legend key) size in ggplot2. Often when you make a plot with multiple groups and large number of data points, the legend key for the color variable are small and can be not legible in the plot. Here we will see… Continue reading How to Increase Legend Key Size in ggplot2

Lollipop plot with ggplot extension ggalt

Customizing lollipop. plot with geom_lollipop() in ggalt

In this tutorial, we will learn how to make lollipop plot using ggalt, one of the ggplot2 extension packages. A lollipop plot is a great alternative for bar plot as the amount ink used to make the lollipop plot is much smaller. ggalt, R package developed by @hrbrmstr, has a geom for making lollipop called… Continue reading Lollipop plot with ggplot extension ggalt

How to encircle a set of points in R with ggplot2

how to encircle select. points using ggalt's geom_circle()

In this post, we will learn how to encircle data points with ggplot2. In R, there are multiple ways to highlight/annotate data points. Here we will use, ggalt, one of the ggplot2 extension packages to encircle data points. ggalt‘s geom_encircle() function can automagically encircle points belonging to multiple groups. Setting data and packages First, let… Continue reading How to encircle a set of points in R with ggplot2

How to wrap long title in ggplot2

How to wrap a long ggplot title into multiple lines. using ggtext package

In this post, we will learn how to wrap a long title into multiple lines in ggplot2. When your title to a plot made. with ggplot2 is really long, you only see a part of it in the plot. Here we will see examples of dealing with long ggplot2 title in four different ways. We… Continue reading How to wrap long title in ggplot2

How to write a function make histograms with ggplot

Customising Histogram plotting function

In this tutorial, we will learn how to write a function to make a histograms using ggplot2 in R. Writing a function to create plots is useful, when you make a lot of plots, in this example, a lot of histograms. Thanks to the upcoming 2nd edition of R for Data Science by Hadley Wickham,… Continue reading How to write a function make histograms with ggplot

Exit mobile version