Easy ggplot2 Theme Customization with {ggeasy} | Data Visualization in R
Key Takeaways
This video teaches how to customize ggplot2 themes using the ggeasy package in R
Full Transcript
hey friends welcome to one little coder in this video we are going to look at an R package that helps you customize ggplot plot in an easier way so as the name goes the plot packages name is Dec thanks to the author and maintainer Jonathan Carroll who has made this package and made it open source for us so as you can see in this joke it's quite always a tedious task at least for a lot of people who do not understand ggplot seaming well to make any customization with GG plots and GG plot being like the golden standard for making plots in R it is it is so it is somewhat important for us to have something that is easier and something that we can learn further to improve to make customization with GG plot so this is this is the package for that it's straight away go ahead and install the package install dot package GGC another thing that you might notice is that the the author has mentioned only installing from Gator but the package is actually available on cran so you can install it directly from chrome and if your organization has any firewall restriction or anything such as so while this package is getting installed ok it's been successfully installed so the data that we are going to use for this particular tutorial is going to come from another package called fakir so we have already had one tutorial explaining what is forked so [ __ ] is a package that gives you fake dataset but that can resemble industry data set so it's not like IRAs or empty cars for you to play with a toy problem so you can have a data set that resembles some industry problem so we going to use 4k and we are going to use tidy verse and we are going to use lettuce GGC GG easy okay so we have loaded our datasets sorry libraries so in 4k we are going to use the data set called client [ __ ] you fake base client ticket lands let's take ticket lines and it will take 100 volumes so 100 so if you do not understand this step please look at that video where we have done the [ __ ] tutorial and I'll link that video in the comment section so you can see that we have got a lot of columns so we have got one column called state so let's count state stay I'm sorry clients count of state so we have got now four values and another counted value so let's make a plot of a GG plot giome call a yes state n so you can actually see that um these labels have overlapped and it is it is a problem that now to remove this war lap we can either flip the coordinates that's what mostly we do or we can change the label or rotate the label right so let's see how easy it is to do with easy so the API is quite consistent so anything you want to do it with GGC it starts with the easy underscore so then after that you can ask or look for something that you want to so you want to rotate so rotate X labels and you can see that it has been rotated so now with just one command or one function that you got to know how to do this thing so that is one thing so the other thing let's say now in this case let's let's look at this flip plot let's say I've got N and you've got state you've got a plot like this and you want to change the color of the text so again on you might have struggled to do with this theme GZ plots default theme but with easy it is quite easy to say okay color text color and you want to say okay I want orange color you can see everything has become arranged and you can say fill is equal to arranged so that the plot also becomes range again so this is done just for the sake of aesthetics we'll make it mini theme anyone yeah this is it so next let's say you want to have legends and change the position of legend okay so in that case what you can do is let's change the code a bit and we'll say okay we'll copy this entire thing and say it's just instead of state will say state and source called okay state and source called so when you look state and source called this is how it looks say what state what source called so now you take this and then say you know fill so call okay state is not fun okay it is okay so now you can see that the source call is there as a legend here so depending upon the situation you might want to even remove the legend sometime you might want to let's say move the legend so let's first see how to move the legend easy move legend so where do you want to move right or none or left or top or bottom so let's say none so your legend is gone so no you don't have legend yet you know you want the legend at the bottom so you can simply say position at the bottom so again this is quite easy very intuitive English function that you can simply use now let's say that you have done all these things but at the same time you want to not just used easy easy you want to start learning how it is should be actually done on ggplot a theme function so the author has been very kind to add another argument that says teach teach is equal to true so when you say teach is equal to true it actually tells you what you can do using team that will help you with this change so instead of GG this move legend so you can say um theme sorry you can say theme underscore sorry theme legend position bottom and then it would do the same thing okay so this this teach can be added in any plot so to see what this plot is doing let's say we have added easy color and then we can say easy font text size okay so let's say the sticks eyes that we want is 20 now you can see how much of the easy easy text all text size and then see 20 ish maybe this is the same size let's see 30 that size is not changing that's doing working easily doable easy text okay it's for the foreigners because we have got themed minimal 25 let's say 25 so you can see the size has changed right you have see you can see that the size has changed now if you want to know how to do that you can simply say teach is equal to true and then you can see okay so these are the three things that you have to do where to change the text all the texts like title if you are title if we access text and then the other text so this function as much as it is easier for you to learn something in English and then customize the ggplot theme it is also helping you learn how to do it with the theme function so once you keep on doing it it will be slightly easier for you to know more look on stack or floor google for that matter so yeah you can look at the documentation you have a lot of the author has added a lot of other details to show you what other customization you can look or do with the GTEC and if you have any issues or you can easily go here and then trace an issue and then the author would help you fix that issue and if you if you are using this package and then you want to help this authors open-source contribution the author has got a sponsor page so you can go ahead and then support this author or support jonathan Keller with this sponsoring and that's it I hope this video was helpful for you to customize ggplot or theme in an easier way using GCC if you have any comments please let me know in the comment section and until that's you in the next video take care bye bye
Original Description
Learn about the R package {ggeasy} for easy ggplot2 theme Customization with simple API / Functions like -rotating axis labels, changing legend position. This is a simple way to improve your R Data Visualization.
code https://www.programmingwithr.com/easy-ggplot2-theme-customization-with-ggeasy/
ggeasy github: https://github.com/jonocarroll/ggeasy
{fakir} Tutorial - https://www.youtube.com/watch?v=EhhljL5zaWs
Share your feedback on Twitter: https://twitter.com/1littlecoder
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from 1littlecoder · 1littlecoder · 20 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
▶
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
How to create your Free Data Science Blog on Github with Fastpages from Fastai
1littlecoder
Making Interactive Matplotlib Plots for Data Science Visualizations on Jupyter (Python)
1littlecoder
Create your first Data Science Web App using R Shiny
1littlecoder
How to create a Reproducible Example in R using reprex
1littlecoder
No Code Visualization using esquisse with Tableau-like Drag and Drop GUI in R
1littlecoder
Scrape HTML Table using rvest and Process them for insights using tidyverse in R
1littlecoder
Google Teachable Machine Learning Build No Code AI solution
1littlecoder
Create meaningful fake tidy datasets in R using fakir [#rstats Package]
1littlecoder
How to enable using R Programming with Visual Studio VS Code
1littlecoder
Python, Community, Books - with Abhiram R - Bangpypers Co-organizers | 1littlecoder podcast
1littlecoder
Growing a Tech Community across India - Anubha Maneshwar, Founder Girlscript | 1littlecoder Podcast
1littlecoder
Intro to Google Colab - How to use Colab
1littlecoder
Intro to Plotly Express - Complex Interactive Charts with One-Line of Python Code
1littlecoder
Indic NLP Python Toolkit Open Source Development - iNLTK Creator Gaurav Arora | 1littlecoder Podcast
1littlecoder
Do you want a career in Data Science - Tamil Webinar
1littlecoder
Android Smartphone Analysis in R [Live Coding Screencast]
1littlecoder
Programmatically create Images, Memes, Watermarks using Python with imgmaker
1littlecoder
Kaggle Walkthrough to get you started with Data Science - Webinar
1littlecoder
Community, Corporate Job, Coding - Gnana Lakshmi T C aka Gyan, WomenWhoCode Leadership Fellow
1littlecoder
Easy ggplot2 Theme Customization with {ggeasy} | Data Visualization in R
1littlecoder
Excel to R - Pivot + Bar Chart in Excel & R using tidyverse [Live Coding]
1littlecoder
Excel to R #2 - VLOOKUP in Excel to LEFT_JOIN, MERGE in R
1littlecoder
5 websites to get Free Real-World Datasets for Data Science/ML Projects
1littlecoder
Excel to R #3 - APPROXIMATE VLOOKUP in Excel to FUZZY LEFT_JOIN in R
1littlecoder
Correlation-alternative PPS (Predictive Power Score) Python Package Demo
1littlecoder
Automated Website Screenshots in R using {webshot}
1littlecoder
Installing Custom RStudio Theme (Synthwave85)
1littlecoder
Analyse Google Trends Search Data in R using {gtrendsR}
1littlecoder
3 Tips to ask question on Stack Overflow the right way to get answers
1littlecoder
Learn Data Science with R - Mini Projects - Web Scraping Zomato
1littlecoder
Easily make Dumbbell Chart using {ggcharts} | Data Visualization in R
1littlecoder
GET Hackernews Front Page Results using REST API in R
1littlecoder
Quickly deploy ML WebApps from Google Colab using ngrok
1littlecoder
Use Jupyter Notebooks within VSCode (Visual Studio Code) in 2020
1littlecoder
Plotly Interactive Plots as Pandas Plotting Backend df.plot()
1littlecoder
Stack Overflow Developer Survey 2020 Highlights for New Programmers
1littlecoder
Matplotlib Animation Charts in Python using Celluloid
1littlecoder
Coding, Postwoman, Passion Project Book - Liyas Thomas Open Source Developer - 1littlecoder podcast
1littlecoder
Aspiring Data Scientist, Tips on How to learn Business Domain Knowledge
1littlecoder
Bokeh Interactive Charts as Pandas Plotting Backend df.plot_bokeh()
1littlecoder
Easy Fast Python Pandas Summary with Sidetable | Pandas Tips & Tricks
1littlecoder
Inception, Content Ideas, Consistency - Srivatsan Srinivasan AIEngineering YouTube Content Creator
1littlecoder
ggplot2 Text Customization with ggtext | Data Visualization in R
1littlecoder
Penguins Dataset Overview - iris alternative | EDA Data Visualization in R
1littlecoder
YouTube Growth Tips, Content Creation - Bhavesh Bhatt, YouTuber (Data Science & Machine Learning) #7
1littlecoder
Matplotlib Animated Bar Chart Race in Python | Data Visualization
1littlecoder
Simple Python GUI Development using {guietta}
1littlecoder
#8 Niche, Growth, Monetization - David Langer - YouTuber Dave on Data
1littlecoder
Simple Fast 3-step Python OCR using Deep Learning 40+ Languages
1littlecoder
Github New Feature Profile Summary/Mini-Resume - Profile Views
1littlecoder
Otto ML Assistant, GPT-3 on Philosophers, Nvidia-ARM - 3 ML Tech News
1littlecoder
What is OpenAI GPT-3 - Hype, Examples, Worries
1littlecoder
Julia 1.5, Datamuse API, Live HDR+ Pixel 4a - Machine Learning Tech News
1littlecoder
Self-driving Car Engineer sentenced, arXiv Dataset, AI/ML Startup Idea - Machine Learning Tech News
1littlecoder
GPT-3 Explorer, Ciphey (Automated Decryption), Py-Sudoku - ML Tech News
1littlecoder
How to use Advanced Google Search to extract Email Ids from Linkedin
1littlecoder
Cartoonizer Toon-IT (AI Web App), GPT-3 Advice, Android Earthquake Detection - ML Tech News
1littlecoder
Flow - R Package to visualize code logic, functions as a Flow Diagram
1littlecoder
Build GPT-3-like Language Model on Google Colab with minGPT [PyTorch]
1littlecoder
Create a Pencil Sketch Portrait with Python OpenCV
1littlecoder
Related Reads
📰
📰
📰
📰
Three Token-2022 Mints in One Week: Fees, Yield, and Soulbound
Dev.to · atharv shukla
Maximize Google Workspace AI Power: Safeguard Data and Boost Performance in 2026
Dev.to AI
What is Gemini Spark, and what can it actually do for you?
TechCabal
How I use python to save hours every week
Dev.to AI
🎓
Tutor Explanation
DeepCamp AI