Showing groups on a scatter plot for an ordination using ggplot2 (CC079)
Riffomonas Project
View ChannelAbout
I'm Pat Schloss! I produce videos about how to use data science tools to answer questions about the world around me. I believe that anyone can answer their own questions. Do you?! I'd love to learn more about the world around you. Share the questions you would like to answer and we can take them on together!
Latest Posts
Video Description
Showing groups in a scatter plot to indicate the region covered by points from different groups can help your audience understand whether you see structure in your data. In this episode of Code Club, I'll show a variety of approaches you can take to show which points belong to different groups in a scatter plot. We'll cover plotting a centroid, adding rays out from the centroid, ellipses, and a 2 dimensional density plot (whoa!). Pat will use RStudio and functions from the ggplot2 package and other packages from the tidyverse. The accompanying blog post can be found at https://www.riffomonas.org/code_club/2021-03-11-ellipses. Do you have a figure that you would like to receive a critique or help improving? Let me know and I'd be happy to arrange a guest appearance! If you're interested in taking an upcoming 3 day R workshop, email me at [email protected]! R: https://r-project.org RStudio: https://rstudio.com Raw data: https://github.com/riffomonas/raw_data/releases/latest Workshops: https://www.mothur.org/wiki/workshops You can also find complete tutorials for learning R with the tidyverse using... Microbial ecology data: https://www.riffomonas.org/minimalR/ General data: https://www.riffomonas.org/generalR/ 0:00 Introduction 1:35 Pre-attentive attributes 3:03 Grouping as a pre-attentive attribute 5:50 Rant about Rstudio 8:06 Indicating the centroid 12:20 Star plot 18:35 Adding ellipses 24:38 2D Density plot 27:41 Conclusion
Upgrade Your Workspace
AI-recommended products based on this video

MOSISO Laptop Case 13 inch, 13 inch Laptop Sleeve Bag Compatible with MacBook Air 13 M4 M3 M2 M1 2025-2018 / Pro 13 M2 M1 2025-2016, Neoprene Computer Sleeve Bag with Small Case, Space Gray Global Recycled Standard

MOSISO 360 Protective Laptop Bag 15 inch, 15 inch Computer Shoulder Bag Compatible with MacBook Air 15 M4 M3 M2 2025-2023, Dell XPS 15, Side Open Messenger Case &4 Zipper Pockets&Handle, Black Global Recycled Standard

MOSISO 13-14 inch Laptop Case, 13.3 inch Puffy Laptop Sleeve Compatible with MacBook Air 13 13.6 M4 M3 M2 M1/Pro 13/Pro 14,HP,Dell,ASUS, Lenovo, Polyester Horizontal Bag with Small Case, Rose Red Global Recycled Standard

EooCoo Case Compatible with MacBook Air 13 inch M4 M3 M2 2025-2022 A3240 A3113 A2681, Plastic Hard Case & TPU Keyboard Skin & Screen Protector for Laptop Air 13.6 inch - Crystal Clear Global Recycled Standard

Apple 2025 MacBook Air 13-inch Laptop with M4 chip: Built for Apple Intelligence, 16GB Unified Memory, 256GB SSD Storage, Touch ID; Sky Blue - English Keyboard

HATALKIN Case Compatible with Apple AirTags Case Keychain Air tag Holder Air Tag Key Ring Cases Air Tags Protective Cover Airtag Key Chain Loop Holders Silicone for Luggage Dog Cat Pet Collar 4 Pack

JETech Silicone Case for iPhone 12/12 Pro 6.1-Inch, Silky-Soft Touch Full-Body Protective Phone Case, Shockproof Cover with Microfiber Lining (Black)

JETech Silicone Case for iPhone 13 6.1-Inch, Silky-Soft Touch Full-Body Protective Phone Case, Shockproof Cover with Microfiber Lining (Black)

TOCOL for iPhone 12/iPhone 12 Pro Case, Slim Silicone Case for 12/12 Pro 6.1 Inch, Precise Fit, Anti-Slip, Drop Protection, Black

Apple AirPods Pro 2 Wireless Earbuds, Bluetooth Headphones, Active Noise Cancellation, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

3 in 1 Charging Station for iPhone, Wireless Charger for iPhone 16 15 14 13 12 11 X Pro Max & Apple Watch - Charging Stand Dock for AirPods Global Recycled Standard

3 in 1 Charging Station for iPhone, Wireless Charger for iPhone 16 15 14 13 12 11 X Pro Max & Apple Watch - Charging Stand Dock for AirPods (Blue) Global Recycled Standard

Wireless Charger for iPhone- 3 in 1 Charging Station for iPhone 16/15/14/13/12/Pro Max/Pro/Mini/Plus, Apple Watch 10/9/8/7/SE/6/5/4/3/2/1/Ultra2/Ultra, AirPods pro/2/3/4

Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black

Logitech G305 LIGHTSPEED Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

Bose QuietComfort Wireless Noise Cancelling Headphones, Bluetooth Over Ear Headphones with Up to 24 Hours of Battery Life, Moonlight Grey - Limited Edition

UGREEN Revodok USB C Hub, 5-in-1 USB C Adapter with 4K HDMI, 100W Power Delivery, 3 USB A Data Ports, Multiport USB Hub for MacBook Pro/Air, iPad Pro, Surface, XPS, Thinkpad, Galaxy and More, Gray
![[Apple MFi Certified] Lightning to HDMI Adapter for iPhone, 1080P Digital AV Adapter iPhone HDMI Adapter Video HDMI Sync Screen Connector Compatible with iPhone 14/13/12/X/8 NO Need Power Supply](https://m.media-amazon.com/images/I/41FjGWUIKnL._AC_UL960_FMwebp_QL65_.jpg)
[Apple MFi Certified] Lightning to HDMI Adapter for iPhone, 1080P Digital AV Adapter iPhone HDMI Adapter Video HDMI Sync Screen Connector Compatible with iPhone 14/13/12/X/8 NO Need Power Supply

Mcbazel Wii to HDMI Converter Output Video Audio Adapter for Wii (NTSC 480I, 480P, PAL 576I) -Support All Display Modes

ABLEWE RCA to HDMI,AV to HDMI Converter, 1080P Mini RCA Composite CVBS Video Audio Converter Adapter Supporting PAL/NTSC for TV/PC/ PS3/ STB/Xbox VHS/VCR/Blue-Ray DVD Players
![Anker USB C Cable, [2-Pack, 6 ft] Type C Charger Premium Nylon USB Cable, USB A to Type C Charging Cable Fast Charge for Samsung Galaxy S10 S10+ / Note 8, LG V20 and Other USB C Charger (Black)](https://m.media-amazon.com/images/I/71N7xhCJnoL._AC_UL960_FMwebp_QL65_.jpg)
Anker USB C Cable, [2-Pack, 6 ft] Type C Charger Premium Nylon USB Cable, USB A to Type C Charging Cable Fast Charge for Samsung Galaxy S10 S10+ / Note 8, LG V20 and Other USB C Charger (Black)

2 Pack Magnetic Wireless Charger 15W Fast Mag-Safe Charger Stand Compatible with iPhone 16/15/14/13/12 Series Wireless Charging Pad for AirPods 3/2/Pro 2/Pro White Portable Mag Safe Kickstand

Magnetic Wireless Charger for iPhone: Fodable 3 in 1 Charging Station for Multiple Apple Devices - Travel Charging Pad Dock for Apple Watch iPhone 16 15 14 13 12 Pro Max Plus & Airpod Global Recycled Standard




