How To Customize Border in facet in ggplot2

Remove Space Between Panels in Facet

ggplot2’s facet options are a great way make small multiples, i.e. multiple plots of the same type in a panel or grid. In this post, we will learn how to control the border line in a plot made with facet_wrap() function in ggplot2. First we will see how to remove the border lines in a… Continue reading How To Customize Border in facet in ggplot2

How To Make PCA Plot with R

PCA plot: PC1 vs PC2

Principal Component Analysis (PCA) is one of the commonly used methods used for unsupervised learning. Making plots using the results from PCA is one of the best ways understand the PCA results. Earlier, we saw how to make Scree plot that shows the percent of variation explained by each Principal Component. In this post we… Continue reading How To Make PCA Plot with R

How to Change X and Y Axis Values from Real to Integers in ggplot2

How to Change Y-axis Values to Integers?

When you make a plot with ggplot2, it automatically chooses appropriate range for x and y-axis values and it can be either floats or integers. In this post, we will see how to change X/Y-axis values to integers. In ggplot2, we can use scale_x_continuous() and scale_y_continuous() functions to change the axis values. Let us first… Continue reading How to Change X and Y Axis Values from Real to Integers in ggplot2

How To Join Multiple ggplot2 Plots with cowplot?

Combine plots with shared legend and title using cowplot in R

Combining or joining multiple plots made with ggplot2 into a single plot is often very useful in telling a story with data. Now we have multiple options in R, including patchwork, gridExtra, and cowplot to join multiple plots made by ggplot2. In this post, we will see how to use R package cowplot made by… Continue reading How To Join Multiple ggplot2 Plots with cowplot?

How To Make Dumbbell Plot in R with ggplot2?

Dumbbell plot with ggplot2: Customizing Colors

Dumbbell plots or connected dot plots are a great way to visualize change in something over time for multiple groups. Dumbbell plots are a great alternative to grouped barchart as dumbbell plot uses much less ink on the paper and is much simpler to understand. We can use ggplot2 extension packages to make a dumbbell… Continue reading How To Make Dumbbell Plot in R with ggplot2?

Exit mobile version