How to Annotate a Specific Cluster or Group in ggplot2

Annotate and Color a Select Group with Ellipse using ggforce

In this tutorial, we will learn how to annotate or highlight a specific cluster/group in R using ggplot2. We can use R package ggforce to annotate a select group as a circle or ellipse on a scatter plot. In this example, we will use geom_mark_ellipse() function to highlight a cluster on scatterplot. To annotate specific… Continue reading How to Annotate a Specific Cluster or Group in ggplot2

How To Annotate Clusters with Circle/Ellipse by a Variable in R

Annotate Clusters with Ellipse with Labels ggforce

In this tutorial, we will learn how to annotate a plot by circle or ellipse based on a categorical variable in the data. We will use ggforce package’s geom_mark_circle() and geom_mark_ellipse() functions to annotate with circles and ellipse. Unlike geom_circle() function to annotate a plot, geom_mark_* functions automatically computes the circle/ellipse radius to draw around… Continue reading How To Annotate Clusters with Circle/Ellipse by a Variable in R

How To Annotate a Plot with Circle in R

ggforce geom_circle(): Annotate with a circle

In this tutorial, we will learn how to annotate a plot with circle to highlight a select portion of a plot made with ggplot2 in R. There are a few options to add a circle on top of a plot with ggplot2. In this example, we will annotate a plot with a circle at a… Continue reading How To Annotate a Plot with Circle in R

How To Add Dollar Sign on Axis Ticks in Matplotlib

Barplot with dollar sign on axis ticks

In this tutorial, we will see examples of how to add dollar sign on axis ticks while making plots with Matplotlib in Python. While making plots to understand the relationship between currency like US dollars and other variables, it is better to show the Dollar symbol/sign on the axis ticks instead of numbers. Let us… Continue reading How To Add Dollar Sign on Axis Ticks in Matplotlib

How To Annotate Barplot with bar_label() in Matplotlib

Customize Label Size Matplotlib's bar_label()

Annotating barplots with labels like texts or numerical values can be helpful to make the plot look better. Till now, one of the options add annotations in Matplotlib is to use pyplot’s annotate() function. Starting from Matplotlib version 3.4.2 and above, we have a new function, axes.bar_label() that lets you annotate barplots with labels easily.… Continue reading How To Annotate Barplot with bar_label() in Matplotlib

Exit mobile version