Home > other >  Seaborn swarmplot break into lines
Seaborn swarmplot break into lines

Time:01-02

I'm trying to make this swarmplot with seaborn

My problem is that the swarms are too wide. I want to be able to break them up into rows of maximum 3 dots per row

This is my code:

# Import modules
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
###

# Import and clead dataset
url = "https://raw.githubusercontent.com/amirnakar/scratchboard/master/Goodreads/goodreads_library_export.csv"
Books = pd.read_csv(url)
Books = Books[Books['Date Read'].notna()]   # Remove NA

Books['Year'] = pd.to_datetime(             # Convert to dates
    Books['Date Read'],
    format='%YYYY%mm           
  • Related