

{"id":22455,"date":"2018-07-26T03:05:56","date_gmt":"2018-07-26T03:05:56","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=22455"},"modified":"2026-04-29T13:01:38","modified_gmt":"2026-04-29T07:31:38","slug":"python-scatter-plot","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/python-scatter-plot\/","title":{"rendered":"Create Python Scatter Plot &amp; Python BoxPlot using Matplotlib"},"content":{"rendered":"<p>Data can be messy, but today we\u2019re learning how to clean it up visually.<\/p>\n<p>We have already explored 3D visuals, but today we\u2019re getting back to learning something interesting and important. We\u2019ll show you how to use Matplotlib to build clean, professional Scatter Plots and Box Plots. These are the most common charts you\u2019ll see in the real world because it makes them easy to read.<\/p>\n<p>In our Last tutorial, we discussed <a href=\"https:\/\/data-flair.training\/blogs\/python-charts\/\" target=\"_blank\" rel=\"noopener\"><strong>Python Charts &#8211; Bubble &amp; 3D Charts<\/strong><\/a>. Today, we will talk about Python Scatter Plot. In addition, we will learn how to draw a Scatter Plot in <a href=\"https:\/\/data-flair.training\/blogs\/python-tutorial-for-beginners\/\" target=\"_blank\" rel=\"noopener\"><strong>Python Programming<\/strong><\/a>. Moreover, we will cover how to create a Python Box Plot using <a href=\"https:\/\/data-flair.training\/blogs\/python-matplotlib-tutorial\/\" target=\"_blank\" rel=\"noopener\"><strong>Matplotlib<\/strong><\/a>.<\/p>\n<p>Let\u2019s begin the\u00a0Python Scatter Plot.<\/p>\n<h3>How to Create a Python Box Plot Using Matplotlib?<\/h3>\n<p>Python box plot tells us how distributed a dataset is. Another use is to analyze how distributed data is across datasets. Such a plot creates a box-and-whisker plot and summarizes many different numeric <strong><a href=\"https:\/\/data-flair.training\/blogs\/python-variables-and-data-types\/\" target=\"_blank\" rel=\"noopener\">variables<\/a><\/strong>. Let\u2019s first take an example so we can explain its structure better.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; import matplotlib.pyplot as plt\r\n&gt;&gt;&gt; np.random.seed(10)\r\n&gt;&gt;&gt; one=np.random.normal(100,10,200)\r\n&gt;&gt;&gt; two=np.random.normal(80, 30, 200)\r\n&gt;&gt;&gt; three=np.random.normal(90, 20, 200)\r\n&gt;&gt;&gt; four=np.random.normal(70, 25, 200)\r\n&gt;&gt;&gt; to_plot=[one,two,three,four]\r\n&gt;&gt;&gt; fig=plt.figure(1,figsize=(9,6))\r\n&gt;&gt;&gt; ax=fig.add_subplot(111)\r\n&gt;&gt;&gt; bp=ax.boxplot(to_plot)\r\n&gt;&gt;&gt; fig.savefig('boxplot.png',bbox_inches='tight')<\/pre>\n<p><strong><a href=\"https:\/\/data-flair.training\/blogs\/top-python-interview-questions-answer-2018\/\" target=\"_blank\" rel=\"noopener\">Top 35 Python Interview Questions and Answer<\/a><\/strong><br \/>\nThis saves the following figure-<\/p>\n<div id=\"attachment_22476\" style=\"width: 542px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/boxplot-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-22476\" class=\"wp-image-22476 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/boxplot-1.png\" alt=\"Draw Python Scatter Plot | Python BoxPlot (Using Matplotlib )\" width=\"532\" height=\"511\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/boxplot-1.png 532w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/boxplot-1-150x144.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/boxplot-1-300x288.png 300w\" sizes=\"auto, (max-width: 532px) 100vw, 532px\" \/><\/a><p id=\"caption-attachment-22476\" class=\"wp-caption-text\">Creating Python BoxPlot (Using Matplotlib)<\/p><\/div>\n<p><strong>Structure-<\/strong><\/p>\n<ul>\n<li>The box denotes the dataset\u2019s quartiles.<\/li>\n<li>The whiskers extend and denote the rest of the distribution.<\/li>\n<li>A function of the inter-quartile range determines the points that are outliers.<\/li>\n<\/ul>\n<p>The input to this can be a list, a <a href=\"https:\/\/data-flair.training\/blogs\/python-numpy-tutorial\/\" target=\"_blank\" rel=\"noopener\"><strong>NumPy array<\/strong><\/a>, a <a href=\"https:\/\/data-flair.training\/blogs\/pandas-tutorial\/\" target=\"_blank\" rel=\"noopener\"><strong>pandas<\/strong><\/a> Series object, an array, a list of vectors, a long-form DataFrame, or a wide-form DataFrame.<br \/>\nLet\u2019s take another example.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; ax = sn.boxplot(x=\"day\", y=\"total_bill\", hue=\"smoker\",data=tips, palette=\"Set3\")\r\n&gt;&gt;&gt; plt.show()<\/pre>\n<div id=\"attachment_22477\" style=\"width: 589px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/boxplot2.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-22477\" class=\"wp-image-22477 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/boxplot2.png\" alt=\"Draw Python Scatter Plot | Python BoxPlot (Using Matplotlib)\" width=\"579\" height=\"457\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/boxplot2.png 579w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/boxplot2-150x118.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/boxplot2-300x237.png 300w\" sizes=\"auto, (max-width: 579px) 100vw, 579px\" \/><\/a><p id=\"caption-attachment-22477\" class=\"wp-caption-text\">Creating Python BoxPlot (Using Matplotlib)<\/p><\/div>\n<h3 class=\"western\">How to Create a Python Scatter Plot?<\/h3>\n<p>Python Scatter Plot, let us denote how two or more objects are related to each other.<\/p>\n<div id=\"attachment_22474\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/How-to-Draw-Python-Scatter-Plots-01.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-22474\" class=\"wp-image-22474 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/How-to-Draw-Python-Scatter-Plots-01.jpg\" alt=\"Python Scatter Plot\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/How-to-Draw-Python-Scatter-Plots-01.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/How-to-Draw-Python-Scatter-Plots-01-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/How-to-Draw-Python-Scatter-Plots-01-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/How-to-Draw-Python-Scatter-Plots-01-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/How-to-Draw-Python-Scatter-Plots-01-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-22474\" class=\"wp-caption-text\">How to Create a Scatter Plot in Python?<\/p><\/div>\n<p>It also lets us identify outliers- values that stray from all others.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; np.random.seed(19680801)\r\n&gt;&gt;&gt; N=50\r\n&gt;&gt;&gt; x=y=colors=np.random.rand(N)\r\n&gt;&gt;&gt; area = (30 * np.random.rand(N))**2\r\n&gt;&gt;&gt; plt.scatter(x, y, s=area, c=colors, alpha=0.5)<\/pre>\n<p><strong>&lt;matplotlib.collections.PathCollection object at 0x095BB6D0&gt;<\/strong><br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/python-switch-case\/\" target=\"_blank\" rel=\"noopener\">Do you know how to implement a Python Switch Case Statement<\/a> <\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; plt.show()<\/pre>\n<div id=\"attachment_22478\" style=\"width: 566px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/scatter.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-22478\" class=\"size-full wp-image-22478\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/scatter.png\" alt=\"Draw Python Scatter Plot | Python BoxPlot (Using Matplotlib)\" width=\"556\" height=\"417\" \/><\/a><p id=\"caption-attachment-22478\" class=\"wp-caption-text\">Creating a Scatter Plot in Python using plt.plot<\/p><\/div>\n<h4 class=\"western\">a. Python Scatter Plot using plt.plot<\/h4>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; x=np.linspace(0,10,30)\r\n&gt;&gt;&gt; from scipy import sin\r\n&gt;&gt;&gt; y=np.sin(x)\r\n&gt;&gt;&gt; plt.plot(x,y,'o',color='purple')<\/pre>\n<p><strong>[&lt;matplotlib.lines.Line2D object at 0x080D3890&gt;]<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; plt.show()<\/pre>\n<div id=\"attachment_22479\" style=\"width: 591px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/plot-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-22479\" class=\"wp-image-22479 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/plot-1.png\" alt=\"Draw Python Scatter Plot Python BoxPlot \" width=\"581\" height=\"418\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/plot-1.png 581w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/plot-1-150x108.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/plot-1-300x216.png 300w\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" \/><\/a><p id=\"caption-attachment-22479\" class=\"wp-caption-text\">Creating Scatter Plot in\u00a0Python using plt.plot<\/p><\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; plt.plot(x,y,'-ok')<\/pre>\n<p><strong>[&lt;matplotlib.lines.Line2D object at 0x08094F30&gt;]<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; plt.show()<\/pre>\n<div id=\"attachment_22480\" style=\"width: 586px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/plot2-1.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-22480\" class=\"wp-image-22480 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/plot2-1.png\" alt=\"Draw Python Scatter Plot | Python BoxPlot (Using Matplotlib)\" width=\"576\" height=\"420\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/plot2-1.png 576w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/plot2-1-150x109.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/plot2-1-300x219.png 300w\" sizes=\"auto, (max-width: 576px) 100vw, 576px\" \/><\/a><p id=\"caption-attachment-22480\" class=\"wp-caption-text\">Python Scatter Plot using plt.plot<\/p><\/div>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; plt.plot(x,y,'-p',color='green',\r\n     markersize=15,linewidth=4,\r\n     markerfacecolor='white',\r\n     markeredgecolor='gray',\r\n     markeredgewidth=1)<\/pre>\n<p><strong>[&lt;matplotlib.lines.Line2D object at 0x0811A4B0&gt;]<\/strong><br \/>\n<strong><a href=\"https:\/\/data-flair.training\/blogs\/python-rename-file\/\" target=\"_blank\" rel=\"noopener\">Do you know how to Python Rename File \u2013 Single &amp; Multiple Files<\/a><\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; plt.show()<\/pre>\n<div id=\"attachment_22481\" style=\"width: 591px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/pentagons.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-22481\" class=\"wp-image-22481 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/pentagons.png\" alt=\"Draw Python Scatter Plot | Python BoxPlot (Using Matplotlib)\" width=\"581\" height=\"425\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/pentagons.png 581w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/pentagons-150x110.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/pentagons-300x219.png 300w\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" \/><\/a><p id=\"caption-attachment-22481\" class=\"wp-caption-text\">Draw Python Scatter Plots | Python BoxPlot (Using Matplotlib)<\/p><\/div>\n<h4 class=\"western\">b. More than one plot<\/h4>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; plt.plot(np.random.rand(20),'*')<\/pre>\n<p><strong>[&lt;matplotlib.lines.Line2D object at 0x08158A30&gt;]<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; plt.plot(np.random.rand(20),'o')\r\n<\/pre>\n<p><strong>[&lt;matplotlib.lines.Line2D object at 0x08158D90&gt;]D<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; plt.show()\r\n<\/pre>\n<div id=\"attachment_22482\" style=\"width: 572px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/plot3.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-22482\" class=\"wp-image-22482 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/plot3.png\" alt=\"\" width=\"562\" height=\"421\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/plot3.png 562w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/plot3-150x112.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/plot3-300x225.png 300w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><\/a><p id=\"caption-attachment-22482\" class=\"wp-caption-text\">Draw More than one Scatter Plot in Python<\/p><\/div>\n<p>So, this was all about Python Scatter Plot. Hope you like our explanation.<\/p>\n<h3>Conclusion<\/h3>\n<p>Hence, we learned how to create Python box plots and scatter plots with matplotlib. Stay tuned for more charts. Leave your opinions in the comments below.<\/p>\n<p>Combining box plots and scatter plots in your analysis can give a complete picture of your data. For example, while a box plot might show that a group has high variance, a scatter plot could reveal whether that variance is random or follows a pattern. Python makes it easy to build, customize, and save them as high-quality images for presentations or reports.<\/p>\n<p>Related Topic-\u00a0 <strong><a href=\"https:\/\/data-flair.training\/blogs\/python-stemming\/\" target=\"_blank\" rel=\"noopener\">Python Stemming and Lemmatization<\/a><\/strong><br \/>\n<strong><a href=\"https:\/\/matplotlib.org\/api\/_as_gen\/matplotlib.pyplot.scatter.html\">For reference<\/a><\/strong><span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:1864,&quot;href&quot;:&quot;https:\\\/\\\/matplotlib.org\\\/api\\\/_as_gen\\\/matplotlib.pyplot.scatter.html&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20241008041544\\\/https:\\\/\\\/matplotlib.org\\\/api\\\/_as_gen\\\/matplotlib.pyplot.scatter.html&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-10 05:44:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-15 15:35:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-16 17:41:09&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-22 10:12:40&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-02 13:03:52&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-09 08:59:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-12 12:36:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-05 16:43:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-21 22:34:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-25 11:26:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-31 22:38:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-17 12:09:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-21 17:42:38&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-29 05:07:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-12 06:05:24&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-29 12:07:44&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-05-29 12:07:44&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Data can be messy, but today we\u2019re learning how to clean it up visually. We have already explored 3D visuals, but today we\u2019re getting back to learning something interesting and important. We\u2019ll show you&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":22473,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[2172,6168,6170,8869,10393,10818,12615,12617],"class_list":["post-22455","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-boxplot-in-python","tag-how-to-draw-python-boxplot","tag-how-to-draw-python-scatter-plot","tag-more-than-one-plot","tag-python-boxplot","tag-python-scatter-plot","tag-scatter-plot-in-python","tag-scatter-plot-using-plt-plot"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Create Python Scatter Plot &amp; Python BoxPlot using Matplotlib - DataFlair<\/title>\n<meta name=\"description\" content=\"Let&#039;s learn how to create Python scatter plots and box plots with examples using the Python library matplotlib.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/python-scatter-plot\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create Python Scatter Plot &amp; Python BoxPlot using Matplotlib - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Let&#039;s learn how to create Python scatter plots and box plots with examples using the Python library matplotlib.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/python-scatter-plot\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-26T03:05:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-29T07:31:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-How-to-Draw-01.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create Python Scatter Plot &amp; Python BoxPlot using Matplotlib - DataFlair","description":"Let's learn how to create Python scatter plots and box plots with examples using the Python library matplotlib.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/python-scatter-plot\/","og_locale":"en_US","og_type":"article","og_title":"Create Python Scatter Plot &amp; Python BoxPlot using Matplotlib - DataFlair","og_description":"Let's learn how to create Python scatter plots and box plots with examples using the Python library matplotlib.","og_url":"https:\/\/data-flair.training\/blogs\/python-scatter-plot\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-07-26T03:05:56+00:00","article_modified_time":"2026-04-29T07:31:38+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-How-to-Draw-01.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/python-scatter-plot\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/python-scatter-plot\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Create Python Scatter Plot &amp; Python BoxPlot using Matplotlib","datePublished":"2018-07-26T03:05:56+00:00","dateModified":"2026-04-29T07:31:38+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-scatter-plot\/"},"wordCount":619,"commentCount":1,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-scatter-plot\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-How-to-Draw-01.jpg","keywords":["BoxPlot in Python","How to Draw Python BoxPlot","How to Draw Python Scatter Plot","More than one plot","Python BoxPlot","Python Scatter Plot","Scatter Plot in Python","Scatter plot using plt.plot"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/python-scatter-plot\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/python-scatter-plot\/","url":"https:\/\/data-flair.training\/blogs\/python-scatter-plot\/","name":"Create Python Scatter Plot &amp; Python BoxPlot using Matplotlib - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-scatter-plot\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-scatter-plot\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-How-to-Draw-01.jpg","datePublished":"2018-07-26T03:05:56+00:00","dateModified":"2026-04-29T07:31:38+00:00","description":"Let's learn how to create Python scatter plots and box plots with examples using the Python library matplotlib.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/python-scatter-plot\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/python-scatter-plot\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/python-scatter-plot\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-How-to-Draw-01.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/07\/Python-How-to-Draw-01.jpg","width":1200,"height":628,"caption":"Python Scatter Plot | Python BoxPlot"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/python-scatter-plot\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Python Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Create Python Scatter Plot &amp; Python BoxPlot using Matplotlib"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/22455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=22455"}],"version-history":[{"count":9,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/22455\/revisions"}],"predecessor-version":[{"id":148077,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/22455\/revisions\/148077"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/22473"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=22455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=22455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=22455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}