đŸ•ˇī¸ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 103 (from laksa117)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

â„šī¸ Skipped - page is already crawled

📄
INDEXABLE
✅
CRAWLED
5 days ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0.2 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://www.geeksforgeeks.org/machine-learning/plotting-graph-using-seaborn-python/
Last Crawled2026-04-05 20:00:02 (5 days ago)
First Indexed2025-06-19 18:35:39 (9 months ago)
HTTP Status Code200
Meta TitlePlotting graph using Seaborn | Python - GeeksforGeeks
Meta DescriptionYour All-in-One Learning Portal: GeeksforGeeks is a comprehensive educational platform that empowers learners across domains-spanning computer science and programming, school education, upskilling, commerce, software tools, competitive exams, and more., Your All-in-One Learning Portal. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
Meta Canonicalnull
Boilerpipe Text
Last Updated : 24 Feb, 2026 Seaborn is a Python data visualization library built on top of Matplotlib . It provides a high-level interface for drawing attractive, informative statistical graphics. Unlike Matplotlib, Seaborn works seamlessly with Pandas DataFrames , making it a preferred tool for quick exploratory data analysis and advanced statistical plotting. Comes with built-in datasets like iris , tips, etc. Provides statistical plots such as boxplots, violin plots, swarm plots, etc. Handles categorical data visualization better than Matplotlib. Supports aesthetic customization (themes, color palettes, styles). Simplifies working with DataFrames by auto-labeling axes. Different Plots in Seaborn Let's see the various types of plots in seaborn, 1. Strip Plot A strip plot is a categorical scatter plot where data points are plotted along one categorical axis. It is useful for visualizing the distribution of values but may suffer from overlapping points. Applications Used when we want to visualize raw distribution of numerical data across categories. Helpful for detecting clusters or general spread of values. Advantages Simple and easy to interpret. Shows individual data points clearly. Limitations Overlapping points may cause loss of clarity in dense datasets. import matplotlib.pyplot as plt import seaborn as sns x = [ 'sun' , 'mon' , 'fri' , 'sat' , 'tue' , 'wed' , 'thu' ] y = [ 5 , 6.7 , 4 , 6 , 2 , 4.9 , 1.8 ] ax = sns . stripplot ( x = x , y = y ) ax . set ( xlabel = 'Days' , ylabel = 'Amount Spent' ) plt . title ( 'Daily Spending (Custom Data)' ) plt . show () Output : Simple Plot 2. Swarm Plot A swarm plot is similar to a strip plot, but points are arranged to avoid overlap. This ensures all data points are visible, making it more informative. Applications Useful when dataset is small/medium and we want to show all observations. Comparing sub-groups clearly without stacking. Advantages Prevents overlap of data points. Provides clearer visual insight than strip plot. Limitations Can be slow for large datasets. May look cluttered when categories have thousands of points. sns . set ( style = "whitegrid" ) iris = sns . load_dataset ( "iris" ) sns . swarmplot ( x = "species" , y = "sepal_length" , data = iris ) plt . title ( "Swarm Plot of Sepal Length by Species" ) plt . show () Output : Swarm Plot 3. Bar Plot A bar plot shows the average (by default mean) of a numerical variable across categories. It can use different estimators (mean, median, std, etc.) for aggregation. Applications Comparing average values across categories. Displaying results of group-by operations visually. Advantages Easy to interpret and widely used. Flexible can use different statistical functions. Limitations Does not show individual data distribution. Can hide variability when using only mean. tips = sns . load_dataset ( "tips" ) sns . barplot ( x = "sex" , y = "total_bill" , data = tips , palette = "plasma" ) plt . title ( "Average Total Bill by Gender" ) plt . show () Output : Bar Plot 4. Count Plot A count plot simply counts the occurrences of each category. It is like a histogram for categorical variables. Applications Checking frequency distribution of categorical values. Understanding class imbalance in data. Advantages Very simple and quick to interpret. No need for numerical data, only categorical required. Limitations Cannot display numerical spread inside categories. tips = sns . load_dataset ( "tips" ) sns . countplot ( x = "sex" , data = tips ) plt . title ( "Count of Gender in Dataset" ) plt . show () Output : Count Plot 5. Box Plot A box plot (or whisker plot) summarizes numerical data using quartiles, median and outliers. It helps in detecting variability and spread. Applications Detecting outliers. Comparing spread of distributions across categories. Advantages Highlights summary statistics effectively. Useful for large datasets. Limitations Does not show exact data distribution shape. tips = sns . load_dataset ( "tips" ) sns . boxplot ( x = "day" , y = "total_bill" , data = tips , hue = "smoker" ) plt . title ( "Total Bill Distribution by Day & Smoking Status" ) plt . show () Output : Box Plot 6. Violin Plot A violin plot combines a box plot with a density plot, showing both summary stats and distribution shape. Applications Comparing distributions more deeply than boxplot. Helpful for detecting multimodal distributions. Advantages Shows both summary statistics and data distribution. Easier to see differences in distribution shapes. Limitations Can be harder to interpret for beginners. May be misleading if sample size is small. tips = sns . load_dataset ( "tips" ) sns . violinplot ( x = "day" , y = "total_bill" , data = tips , hue = "sex" , split = True ) plt . title ( "Violin Plot of Total Bill by Day and Gender" ) plt . show () Output : Violin Plot 7. Strip Plot with Hue This is an enhanced strip plot where categories are further divided using hue. It allows comparing multiple sub-groups within a category. Applications Comparing subgroups inside categories. Visualizing interaction between two categorical variables. Advantages Adds extra dimension to strip plot. Useful for multivariate visualization. Limitations Overlap issue exists. tips = sns . load_dataset ( "tips" ) sns . stripplot ( x = "day" , y = "total_bill" , data = tips , jitter = True , hue = "smoker" , dodge = True ) plt . title ( "Total Bill Distribution with Smoking Status" ) plt . show () Output : Strip Plot with Hue Applications Exploratory Data Analysis (EDA) : Identifying trends, outliers and patterns. Feature Analysis : Comparing numerical features across categories. Data Presentation : Creating professional, publication-ready plots. Model Preparation : Checking class imbalance or spread before training models.
Markdown
[![geeksforgeeks](https://media.geeksforgeeks.org/gfg-gg-logo.svg)](https://www.geeksforgeeks.org/) ![search icon](https://media.geeksforgeeks.org/auth-dashboard-uploads/Property=Light---Default.svg) - Sign In - [Courses]() - [Tutorials]() - [Interview Prep]() - [Python for Machine Learning](https://www.geeksforgeeks.org/machine-learning/python-for-machine-learning/) - [Machine Learning with R](https://www.geeksforgeeks.org/r-machine-learning/introduction-to-machine-learning-in-r/) - [Machine Learning Algorithms](https://www.geeksforgeeks.org/machine-learning/machine-learning-algorithms/) - [EDA](https://www.geeksforgeeks.org/data-analysis/what-is-exploratory-data-analysis/) - [Math for Machine Learning](https://www.geeksforgeeks.org/machine-learning/machine-learning-mathematics/) - [Machine Learning Interview Questions](https://www.geeksforgeeks.org/machine-learning/machine-learning-interview-questions/) - [ML Projects](https://www.geeksforgeeks.org/machine-learning/machine-learning-projects/) - [Deep Learning](https://www.geeksforgeeks.org/deep-learning/deep-learning-tutorial/) - [NLP](https://www.geeksforgeeks.org/nlp/natural-language-processing-nlp-tutorial/) - [Computer vision](https://www.geeksforgeeks.org/computer-vision/computer-vision/) # Plotting graph using Seaborn \| Python Last Updated : 24 Feb, 2026 Seaborn is a Python data visualization library built on top of [Matplotlib](https://www.geeksforgeeks.org/python/python-introduction-matplotlib/). It provides a high-level interface for drawing attractive, informative statistical graphics. Unlike Matplotlib, Seaborn works seamlessly with [Pandas](https://www.geeksforgeeks.org/pandas/introduction-to-pandas-in-python/) [DataFrames](https://www.geeksforgeeks.org/pandas/python-pandas-dataframe/), making it a preferred tool for quick exploratory data analysis and advanced statistical plotting. - Comes with built-in datasets like [iris](https://www.geeksforgeeks.org/machine-learning/iris-dataset/), tips, etc. - Provides statistical plots such as boxplots, violin plots, swarm plots, etc. - Handles categorical data visualization better than Matplotlib. - Supports aesthetic customization (themes, color palettes, styles). - Simplifies working with DataFrames by auto-labeling axes. ## Different Plots in Seaborn Let's see the various types of plots in seaborn, ### 1\. Strip Plot A [strip plot](https://www.geeksforgeeks.org/python/stripplot-using-seaborn-in-python/) is a categorical scatter plot where data points are plotted along one categorical axis. It is useful for visualizing the distribution of values but may suffer from overlapping points. ****Applications**** - Used when we want to visualize raw distribution of numerical data across categories. - Helpful for detecting clusters or general spread of values. ****Advantages**** - Simple and easy to interpret. - Shows individual data points clearly. ****Limitations**** - Overlapping points may cause loss of clarity in dense datasets. Python `` ****Output****: ![plot](https://media.geeksforgeeks.org/wp-content/uploads/20250917140233483241/plot.webp) Simple Plot ### 2\. Swarm Plot A [swarm plot](https://www.geeksforgeeks.org/python/swarmplot-using-seaborn-in-python/) is similar to a strip plot, but points are arranged to avoid overlap. This ensures all data points are visible, making it more informative. ****Applications**** - Useful when dataset is small/medium and we want to show all observations. - Comparing sub-groups clearly without stacking. ****Advantages**** - Prevents overlap of data points. - Provides clearer visual insight than strip plot. ****Limitations**** - Can be slow for large datasets. - May look cluttered when categories have thousands of points. Python `` ****Output****: ![swarn](https://media.geeksforgeeks.org/wp-content/uploads/20250917140322691455/swarn.webp) Swarm Plot ### 3\. Bar Plot A [bar plot](https://www.geeksforgeeks.org/python/barplot-using-seaborn-in-python/) shows the average (by default mean) of a numerical variable across categories. It can use different estimators (mean, median, std, etc.) for aggregation. ****Applications**** - Comparing average values across categories. - Displaying results of group-by operations visually. ****Advantages**** - Easy to interpret and widely used. - Flexible can use different statistical functions. ****Limitations**** - Does not show individual data distribution. - Can hide variability when using only mean. Python `` ****Output****: ![bar-plot](https://media.geeksforgeeks.org/wp-content/uploads/20250917140403443546/bar-plot.webp) Bar Plot ### 4\. Count Plot A [count plot](https://www.geeksforgeeks.org/python/countplot-using-seaborn-in-python/) simply counts the occurrences of each category. It is like a histogram for categorical variables. ****Applications**** - Checking frequency distribution of categorical values. - Understanding class imbalance in data. ****Advantages**** - Very simple and quick to interpret. - No need for numerical data, only categorical required. ****Limitations**** - Cannot display numerical spread inside categories. Python `` ****Output****: ![count-plot](https://media.geeksforgeeks.org/wp-content/uploads/20250917140437601652/count-plot.webp) Count Plot ### 5\. Box Plot A [box plot](https://www.geeksforgeeks.org/pandas/box-plot-visualization-with-pandas-and-seaborn/) (or whisker plot) summarizes numerical data using quartiles, median and outliers. It helps in detecting variability and spread. ****Applications**** - Detecting outliers. - Comparing spread of distributions across categories. ****Advantages**** - Highlights summary statistics effectively. - Useful for large datasets. ****Limitations**** - Does not show exact data distribution shape. Python `` ****Output****: ![boxplot](https://media.geeksforgeeks.org/wp-content/uploads/20250917140516579836/boxplot.webp) Box Plot ### 6\. Violin Plot A [violin plot](https://www.geeksforgeeks.org/python/violinplot-using-seaborn-in-python/) combines a box plot with a density plot, showing both summary stats and distribution shape. ****Applications**** - Comparing distributions more deeply than boxplot. - Helpful for detecting multimodal distributions. ****Advantages**** - Shows both summary statistics and data distribution. - Easier to see differences in distribution shapes. ****Limitations**** - Can be harder to interpret for beginners. - May be misleading if sample size is small. Python `` ****Output****: ![violin-plot](https://media.geeksforgeeks.org/wp-content/uploads/20250917140601627038/violin-plot.webp) Violin Plot ### 7\. Strip Plot with Hue This is an enhanced strip plot where categories are further divided using hue. It allows comparing multiple sub-groups within a category. ****Applications**** - Comparing subgroups inside categories. - Visualizing interaction between two categorical variables. ****Advantages**** - Adds extra dimension to strip plot. - Useful for multivariate visualization. ****Limitations**** - Overlap issue exists. Python `` ****Output****: ![strip-with-hue](https://media.geeksforgeeks.org/wp-content/uploads/20250917140748742184/strip-with-hue.webp) Strip Plot with Hue ## Applications - ****Exploratory Data Analysis (EDA)****: Identifying trends, outliers and patterns. - ****Feature Analysis****: Comparing numerical features across categories. - ****Data Presentation****: Creating professional, publication-ready plots. - ****Model Preparation****: Checking class imbalance or spread before training models. Comment [S](https://www.geeksforgeeks.org/user/saloni1297/) [saloni1297](https://www.geeksforgeeks.org/user/saloni1297/) 18 Article Tags: Article Tags: [Machine Learning](https://www.geeksforgeeks.org/category/ai-ml-ds/machine-learning/) [python](https://www.geeksforgeeks.org/tag/python/) ### Explore [![GeeksforGeeks](https://media.geeksforgeeks.org/auth-dashboard-uploads/gfgFooterLogo.png)](https://www.geeksforgeeks.org/) ![location](https://media.geeksforgeeks.org/img-practice/Location-1685004904.svg) Corporate & Communications Address: A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305) ![location](https://media.geeksforgeeks.org/img-practice/Location-1685004904.svg) Registered Address: K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305 [![GFG App on Play Store](https://media.geeksforgeeks.org/auth-dashboard-uploads/googleplay-%281%29.png)](https://geeksforgeeksapp.page.link/gfg-app)[![GFG App on App Store](https://media.geeksforgeeks.org/auth-dashboard-uploads/appstore-%281%29.png)](https://geeksforgeeksapp.page.link/gfg-app) - Company - [About Us](https://www.geeksforgeeks.org/about/) - [Legal](https://www.geeksforgeeks.org/legal/) - [Privacy Policy](https://www.geeksforgeeks.org/legal/privacy-policy/) - [Contact Us](https://www.geeksforgeeks.org/about/contact-us/) - [Advertise with us](https://www.geeksforgeeks.org/advertise-with-us/) - [GFG Corporate Solution](https://www.geeksforgeeks.org/gfg-corporate-solution/) - [Campus Training Program](https://www.geeksforgeeks.org/campus-training-program/) - Explore - [POTD](https://www.geeksforgeeks.org/problem-of-the-day) - [Job-A-Thon](https://practice.geeksforgeeks.org/events/rec/job-a-thon/) - [Blogs](https://www.geeksforgeeks.org/category/blogs/?type=recent) - [Nation Skill Up](https://www.geeksforgeeks.org/nation-skill-up/) - Tutorials - [Programming Languages](https://www.geeksforgeeks.org/computer-science-fundamentals/programming-language-tutorials/) - [DSA](https://www.geeksforgeeks.org/dsa/dsa-tutorial-learn-data-structures-and-algorithms/) - [Web Technology](https://www.geeksforgeeks.org/web-tech/web-technology/) - [AI, ML & Data Science](https://www.geeksforgeeks.org/machine-learning/ai-ml-and-data-science-tutorial-learn-ai-ml-and-data-science/) - [DevOps](https://www.geeksforgeeks.org/devops/devops-tutorial/) - [CS Core Subjects](https://www.geeksforgeeks.org/gate/gate-exam-tutorial/) - [Interview Preparation](https://www.geeksforgeeks.org/aptitude/interview-corner/) - [Software and Tools](https://www.geeksforgeeks.org/websites-apps/software-and-tools-a-to-z-list/) - Courses - [ML and Data Science](https://www.geeksforgeeks.org/courses/category/machine-learning-data-science) - [DSA and Placements](https://www.geeksforgeeks.org/courses/category/dsa-placements) - [Web Development](https://www.geeksforgeeks.org/courses/category/development-testing) - [Programming Languages](https://www.geeksforgeeks.org/courses/category/programming-languages) - [DevOps & Cloud](https://www.geeksforgeeks.org/courses/category/cloud-devops) - [GATE](https://www.geeksforgeeks.org/courses/category/gate) - [Trending Technologies](https://www.geeksforgeeks.org/courses/category/trending-technologies/) - Videos - [DSA](https://www.geeksforgeeks.org/videos/category/sde-sheet/) - [Python](https://www.geeksforgeeks.org/videos/category/python/) - [Java](https://www.geeksforgeeks.org/videos/category/java-w6y5f4/) - [C++](https://www.geeksforgeeks.org/videos/category/c/) - [Web Development](https://www.geeksforgeeks.org/videos/category/web-development/) - [Data Science](https://www.geeksforgeeks.org/videos/category/data-science/) - [CS Subjects](https://www.geeksforgeeks.org/videos/category/cs-subjects/) - Preparation Corner - [Interview Corner](https://www.geeksforgeeks.org/interview-prep/interview-corner/) - [Aptitude](https://www.geeksforgeeks.org/aptitude/aptitude-questions-and-answers/) - [Puzzles](https://www.geeksforgeeks.org/aptitude/puzzles/) - [GfG 160](https://www.geeksforgeeks.org/courses/gfg-160-series) - [System Design](https://www.geeksforgeeks.org/system-design/system-design-tutorial/) [@GeeksforGeeks, Sanchhaya Education Private Limited](https://www.geeksforgeeks.org/), [All rights reserved](https://www.geeksforgeeks.org/copyright-information/) ![]()
Readable Markdown
Last Updated : 24 Feb, 2026 Seaborn is a Python data visualization library built on top of [Matplotlib](https://www.geeksforgeeks.org/python/python-introduction-matplotlib/). It provides a high-level interface for drawing attractive, informative statistical graphics. Unlike Matplotlib, Seaborn works seamlessly with [Pandas](https://www.geeksforgeeks.org/pandas/introduction-to-pandas-in-python/) [DataFrames](https://www.geeksforgeeks.org/pandas/python-pandas-dataframe/), making it a preferred tool for quick exploratory data analysis and advanced statistical plotting. - Comes with built-in datasets like [iris](https://www.geeksforgeeks.org/machine-learning/iris-dataset/), tips, etc. - Provides statistical plots such as boxplots, violin plots, swarm plots, etc. - Handles categorical data visualization better than Matplotlib. - Supports aesthetic customization (themes, color palettes, styles). - Simplifies working with DataFrames by auto-labeling axes. ## Different Plots in Seaborn Let's see the various types of plots in seaborn, ### 1\. Strip Plot A [strip plot](https://www.geeksforgeeks.org/python/stripplot-using-seaborn-in-python/) is a categorical scatter plot where data points are plotted along one categorical axis. It is useful for visualizing the distribution of values but may suffer from overlapping points. ****Applications**** - Used when we want to visualize raw distribution of numerical data across categories. - Helpful for detecting clusters or general spread of values. ****Advantages**** - Simple and easy to interpret. - Shows individual data points clearly. ****Limitations**** - Overlapping points may cause loss of clarity in dense datasets. `` ****Output****: ![plot](https://media.geeksforgeeks.org/wp-content/uploads/20250917140233483241/plot.webp) Simple Plot ### 2\. Swarm Plot A [swarm plot](https://www.geeksforgeeks.org/python/swarmplot-using-seaborn-in-python/) is similar to a strip plot, but points are arranged to avoid overlap. This ensures all data points are visible, making it more informative. ****Applications**** - Useful when dataset is small/medium and we want to show all observations. - Comparing sub-groups clearly without stacking. ****Advantages**** - Prevents overlap of data points. - Provides clearer visual insight than strip plot. ****Limitations**** - Can be slow for large datasets. - May look cluttered when categories have thousands of points. `` ****Output****: ![swarn](https://media.geeksforgeeks.org/wp-content/uploads/20250917140322691455/swarn.webp) Swarm Plot ### 3\. Bar Plot A [bar plot](https://www.geeksforgeeks.org/python/barplot-using-seaborn-in-python/) shows the average (by default mean) of a numerical variable across categories. It can use different estimators (mean, median, std, etc.) for aggregation. ****Applications**** - Comparing average values across categories. - Displaying results of group-by operations visually. ****Advantages**** - Easy to interpret and widely used. - Flexible can use different statistical functions. ****Limitations**** - Does not show individual data distribution. - Can hide variability when using only mean. `` ****Output****: ![bar-plot](https://media.geeksforgeeks.org/wp-content/uploads/20250917140403443546/bar-plot.webp) Bar Plot ### 4\. Count Plot A [count plot](https://www.geeksforgeeks.org/python/countplot-using-seaborn-in-python/) simply counts the occurrences of each category. It is like a histogram for categorical variables. ****Applications**** - Checking frequency distribution of categorical values. - Understanding class imbalance in data. ****Advantages**** - Very simple and quick to interpret. - No need for numerical data, only categorical required. ****Limitations**** - Cannot display numerical spread inside categories. `` ****Output****: ![count-plot](https://media.geeksforgeeks.org/wp-content/uploads/20250917140437601652/count-plot.webp) Count Plot ### 5\. Box Plot A [box plot](https://www.geeksforgeeks.org/pandas/box-plot-visualization-with-pandas-and-seaborn/) (or whisker plot) summarizes numerical data using quartiles, median and outliers. It helps in detecting variability and spread. ****Applications**** - Detecting outliers. - Comparing spread of distributions across categories. ****Advantages**** - Highlights summary statistics effectively. - Useful for large datasets. ****Limitations**** - Does not show exact data distribution shape. `` ****Output****: ![boxplot](https://media.geeksforgeeks.org/wp-content/uploads/20250917140516579836/boxplot.webp) Box Plot ### 6\. Violin Plot A [violin plot](https://www.geeksforgeeks.org/python/violinplot-using-seaborn-in-python/) combines a box plot with a density plot, showing both summary stats and distribution shape. ****Applications**** - Comparing distributions more deeply than boxplot. - Helpful for detecting multimodal distributions. ****Advantages**** - Shows both summary statistics and data distribution. - Easier to see differences in distribution shapes. ****Limitations**** - Can be harder to interpret for beginners. - May be misleading if sample size is small. `` ****Output****: ![violin-plot](https://media.geeksforgeeks.org/wp-content/uploads/20250917140601627038/violin-plot.webp) Violin Plot ### 7\. Strip Plot with Hue This is an enhanced strip plot where categories are further divided using hue. It allows comparing multiple sub-groups within a category. ****Applications**** - Comparing subgroups inside categories. - Visualizing interaction between two categorical variables. ****Advantages**** - Adds extra dimension to strip plot. - Useful for multivariate visualization. ****Limitations**** - Overlap issue exists. `` ****Output****: ![strip-with-hue](https://media.geeksforgeeks.org/wp-content/uploads/20250917140748742184/strip-with-hue.webp) Strip Plot with Hue ## Applications - ****Exploratory Data Analysis (EDA)****: Identifying trends, outliers and patterns. - ****Feature Analysis****: Comparing numerical features across categories. - ****Data Presentation****: Creating professional, publication-ready plots. - ****Model Preparation****: Checking class imbalance or spread before training models.
Shard103 (laksa)
Root Hash12046344915360636903
Unparsed URLorg,geeksforgeeks!www,/machine-learning/plotting-graph-using-seaborn-python/ s443