Data Visualization with Esquisse

Author
Affiliation
Jubayer Hossain
Published

December 28, 2022

Esquisse Package

# install.packages("esquisse")
library(esquisse)
Warning: package 'esquisse' was built under R version 4.2.2

Esquisse Package

The esquisse package is helpful for getting used to creating plots in R.

It is an interactive tool to help you in RStudio.

It’s super nifty!

starting a plot

Starting a plot

Using the esquisser() function you can start creating a plot for a data.frame or tibble. That’s it!

esquisser(mtcars)

starting a plot

Select Variables

To select variables you can drag and drop variables to the respective axis that you would like the variable to be plotted on.

select variables

Find code

To select variables you can drag and drop variables to the respective axis that you would like the variable to be plotted on.

select variables

Change plot type

esquisse automatically assumes a plot type, but you might want to change this.

change plot type

Add Facets

Facets create multiple plots based on the different values of a variable.

add facets

Add size

Sometimes it is useful to change the way points are plotted so that size represents a variable. This can especially be helpful if you need your plot to be black and white.

add color

Add color

For plots with points use the color region to change coloring according to a variable. (use “fill” for bar plots)

add color

Appearance

You can change the overall appearance with the appearance tab.

change overall appearance

Smooth Lines

Especially when you have a scatter plot, it can be helpful to add a smooth/trend line.

add smooth line

Change titles

To change titles on your plot, use the titles tab.

change titles

Summary

  • Use the esquisser() function on a dataset
  • Code from Esquisse can copied into code chunks to be generated in the “Plots” pane

Lab

🏠 Class Website

💻 Lab

The end!