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

Sinaplot vs Violin plot: Why Sinaplot is better than Violinplot

Sinaplot and Violinplot

In this post, we will learn how to make Sinaplot in R and show why it is a better way visualize numerical data from multiple categories. In an earlier post, we discussed the benefits of making Violinplot than making a boxplot. This is mainly due to the fact that Boxplot relies only five summary stats… Continue reading Sinaplot vs Violin plot: Why Sinaplot is better than Violinplot

How to Make Grouped/Stacked Barplot in R?

Grouped barplot: side by side ggplot2

When you have dataset with two categorical variables and one quantitative variable, a grouped barplot is a great way to see the relationship among the variable. In a simple barplot, we have categorical variable on x-axis and have bars showing the numerical value of the quantitative variable. In a grouped barplot, we add the third… Continue reading How to Make Grouped/Stacked Barplot in 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 Make Grouped Boxplot with Jittered Data Points in ggplot2

Grouped Boxplot with jittered points in ggplot2

Grouped boxplots help visualize three variables in comparison to two variables with a simple boxplot. In this post we will see how to make a grouped boxplot with jittered data points with position_jitterdodge() using ggplot2 in R. We can make grouped boxplot without datapoints easily by using the third “grouping” variable either for color or… Continue reading How to Make Grouped Boxplot with Jittered Data Points in ggplot2

Exit mobile version