How to Annotate a plot with P-value in ggplot2

Annotate a plot with p-value from linear regression model in ggplot2: Example 2

In this tutorial, we will learn how to add statistical significance to a plot made with ggplot2. Let us we have scatterplot to help understand the relation between two numerical variables and we have done linear regression analysis to find the statisitical significance of the association. Here we will show with example how to annotate… Continue reading How to Annotate a plot with P-value in ggplot2

How to add color to axis tick labels: Hint – element_markdown() in ggtext

In this tutorial, we will learn about a nice ggplot2 trick/tip that enables colored text on axis tick labels. Thanks to new theme element element_markdown() in ggtext, R package developed by Claus Wilke, we can add colors to axis text labels. To get started, let us load the packages needed. Here we use ggtext version… Continue reading How to add color to axis tick labels: Hint – element_markdown() in ggtext

Exit mobile version