{"id":1748,"date":"2019-06-10T04:56:03","date_gmt":"2019-06-10T04:56:03","guid":{"rendered":"http:\/\/kusuaks7\/?p=1353"},"modified":"2023-08-23T08:56:42","modified_gmt":"2023-08-23T08:56:42","slug":"visualizing-data-with-matplotlib","status":"publish","type":"post","link":"https:\/\/www.experfy.com\/blog\/ai-ml\/visualizing-data-with-matplotlib\/","title":{"rendered":"Visualizing data with Matplotlib"},"content":{"rendered":"<p>Data visualization is the process of understanding data better and gaining insights from it by placing it in a visual context. Data visualization has become one of the most sought after skills.&nbsp; If you understand your data well, you will know what you have to do with it, to build a cutting edge machine learning model.&nbsp; Because&nbsp;Data visualization presents analytics visually, it enables you to identify correlations, patterns, and trends that would be undetected without it. Data Science and Visualization are certain to change the corporate landscape over the next few years. Since Matplotlib is one of the most used python libraries for data visualization, we will explore in this post how you can use it to get the most out of your data.&nbsp;<\/p>\n<p><strong>Table of contents:<\/strong><\/p>\n<ul>\n<li>What is Data Visualization?<\/li>\n<li>Why do we need Data Visualization?<\/li>\n<li>How does it work?<\/li>\n<li>What is Matplotlib?<\/li>\n<li>How to use it<\/li>\n<\/ul>\n<h3><b>What is Data Visualization?<\/b><\/h3>\n<p>Data visualization is the presentation of data in a pictorial or graphical format. It describes an effort to help people understand their data better by placing it in a visual context. Patterns, trends, and correlations that would go undetected without it, can be recognized easier with data visualization. Data visualization presents analytics visually and enables you to grasp difficult concepts or identify new patterns. There is also&nbsp;<b>interactive visualization<\/b>, that enables you to drill down into charts and graphs for more detail, by interactively changing what you see.<\/p>\n<h3><b>Why do we need Data Visualization?<\/b><\/h3>\n<p>The human brain can process information a lot better when it is in a graphical form. A graphical representation of your data gives you a very good understanding of your dataset in general and what features are useful for your machine learning model and which ones not. One of the primary goals of data visualization is to communicate information clearly and efficiently with statistical graphics,&nbsp;plots&nbsp;and&nbsp;information graphics. For example, if you are working at a company and have to present your Data Analysis to your boss, he won&rsquo;t understand why you made certain assumptions if you don&rsquo;t show it to him in an easily understandable graphical form. So in order to understand your data in an efficient and quick way, you need Data Visualization.<\/p>\n<h3><b>How does it work?<\/b><\/h3>\n<p>First, you visualize a dataset to understand what the data actually is telling you. The next step is to make some more detailed analysis. Then you document your assumptions from the two previous steps. Thirdly, you may want to transform your dataset because your assumptions about the data make some features unnecessary, so you want to remove them. Then you visualize your data again and repeat the whole process until you are satisfied.&nbsp;<\/p>\n<h3><b>What is Matplotlib?<\/b><\/h3>\n<p>Matplotlib is one of the most used python libraries to visualize and explore data. It enables you to draw different types of graphs, like line, scattered, bar, and so on. You could say that it is the de-facto standard library for plotting data with python. Matplotlib can be used in Python scripts, Python and&nbsp;<a href=\"http:\/\/ipython.org\/\" rel=\"noopener\">IPython<\/a>&nbsp;shell&rsquo;s,&nbsp;<a href=\"http:\/\/jupyter.org\/index.html\" rel=\"noopener\">Jupiter<\/a>&nbsp;notebook&rsquo;s, web application servers, and four graphical user interface toolkits. It enables you to generate a visual representation of data with just a few lines of code.<\/p>\n<h3><b>How to use it<\/b><\/h3>\n<p>There are various types of plots available within Matplotlib. Today we will go through the following:<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 10.28.03.png\" data-attachment-id=\"235\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 10.28.03\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-28-031.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-28-031.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-28-031.png\" data-orig-size=\"1866,1250\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-10-28-03-2\/\" sizes=\"(max-width: 736px) 100vw, 736px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-28-031.png?w=736\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-28-031.png?w=736 736w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-28-031.png?w=1472 1472w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-28-031.png?w=150 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-28-031.png?w=300 300w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-28-031.png?w=768 768w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-28-031.png?w=1024 1024w\" style=\"width: 700px; height: 469px;\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3><b>How to plot a simple graph<\/b><\/h3>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 10.57.03.png\" data-attachment-id=\"236\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 10.57.03\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-03.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-03.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-03.png\" data-orig-size=\"1004,576\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-10-57-03\/\" sizes=\"(max-width: 345px) 100vw, 345px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-03.png?w=345&amp;h=198\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-03.png?w=345&amp;h=198 345w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-03.png?w=690&amp;h=396 690w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-03.png?w=150&amp;h=86 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-03.png?w=300&amp;h=172 300w\" style=\"width: 645px; height: 370px;\" \/><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 10.57.16.png\" data-attachment-id=\"237\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 10.57.16\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-16.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-16.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-16.png\" data-orig-size=\"1146,760\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-10-57-16\/\" sizes=\"(max-width: 323px) 100vw, 323px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-16.png?w=323&amp;h=214\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-16.png?w=323&amp;h=214 323w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-16.png?w=646&amp;h=428 646w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-16.png?w=150&amp;h=99 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-16.png?w=300&amp;h=199 300w\" style=\"width: 623px; height: 413px;\" \/><\/p>\n<p>Now we will plot the same graph again but now we will label our axes and add a title to our graph.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 10.57.52.png\" data-attachment-id=\"238\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 10.57.52\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-52.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-52.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-52.png\" data-orig-size=\"1322,620\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-10-57-52\/\" sizes=\"(max-width: 428px) 100vw, 428px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-52.png?w=428&amp;h=201\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-52.png?w=428&amp;h=201 428w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-52.png?w=856&amp;h=402 856w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-52.png?w=150&amp;h=70 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-52.png?w=300&amp;h=141 300w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-57-52.png?w=768&amp;h=360 768w\" style=\"width: 628px; height: 295px;\" \/><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 10.58.04.png\" data-attachment-id=\"239\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 10.58.04\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-58-04.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-58-04.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-58-04.png\" data-orig-size=\"1202,834\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-10-58-04\/\" sizes=\"(max-width: 349px) 100vw, 349px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-58-04.png?w=349&amp;h=242\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-58-04.png?w=349&amp;h=242 349w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-58-04.png?w=698&amp;h=484 698w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-58-04.png?w=150&amp;h=104 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-10-58-04.png?w=300&amp;h=208 300w\" style=\"width: 649px; height: 450px;\" \/><\/p>\n<h3><b>How to style your graph<\/b><\/h3>\n<p>This time we will plot 2 lines on a graph and style them.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 11.00.34.png\" data-attachment-id=\"241\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 11.00.34\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-34.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-34.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-34.png\" data-orig-size=\"1552,1366\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-11-00-34\/\" sizes=\"(max-width: 513px) 100vw, 513px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-34.png?w=513&amp;h=452\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-34.png?w=513&amp;h=452 513w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-34.png?w=1026&amp;h=904 1026w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-34.png?w=150&amp;h=132 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-34.png?w=300&amp;h=264 300w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-34.png?w=768&amp;h=676 768w\" style=\"width: 613px; height: 540px;\" \/><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 11.00.50.png\" data-attachment-id=\"240\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 11.00.50\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-50.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-50.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-50.png\" data-orig-size=\"1226,824\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-11-00-50\/\" sizes=\"(max-width: 375px) 100vw, 375px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-50.png?w=375&amp;h=252\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-50.png?w=375&amp;h=252 375w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-50.png?w=750&amp;h=504 750w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-50.png?w=150&amp;h=101 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-00-50.png?w=300&amp;h=202 300w\" style=\"width: 675px; height: 454px;\" \/><\/p>\n<h3><b>1. Bar Graph<\/b><\/h3>\n<p>A Bar Graph is used to compare things between different groups. They work very good if you try to measure the change of these relationships over time when these changes are relatively large.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 11.03.10.png\" data-attachment-id=\"242\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 11.03.10\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-10.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-10.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-10.png\" data-orig-size=\"1384,914\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-11-03-10\/\" sizes=\"(max-width: 462px) 100vw, 462px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-10.png?w=462&amp;h=305\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-10.png?w=462&amp;h=305 462w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-10.png?w=924&amp;h=610 924w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-10.png?w=150&amp;h=99 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-10.png?w=300&amp;h=198 300w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-10.png?w=768&amp;h=507 768w\" style=\"width: 662px; height: 437px;\" \/><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 11.03.17.png\" data-attachment-id=\"243\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 11.03.17\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-17.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-17.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-17.png\" data-orig-size=\"1204,836\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-11-03-17\/\" sizes=\"(max-width: 386px) 100vw, 386px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-17.png?w=386&amp;h=268\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-17.png?w=386&amp;h=268 386w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-17.png?w=772&amp;h=536 772w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-17.png?w=150&amp;h=104 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-17.png?w=300&amp;h=208 300w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-03-17.png?w=768&amp;h=533 768w\" style=\"width: 686px; height: 476px;\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3><b>2. Histogram<\/b><\/h3>\n<p>Histograms have quantitative variables and bar graphs have categorical variables.<\/p>\n<p>For example, if you want to plot the population for different countries, you should use a bar graph because it is categorical and the countries names would, therefore, be the categories.<\/p>\n<p>An example where you should plot histograms would be if you have a dataset of people with varying ages and you want to visualize how much an age group is contributing to the GDP of a country.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 11.09.22.png\" data-attachment-id=\"244\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 11.09.22\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-22.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-22.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-22.png\" data-orig-size=\"1466,1064\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-11-09-22\/\" sizes=\"(max-width: 464px) 100vw, 464px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-22.png?w=464&amp;h=337\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-22.png?w=464&amp;h=337 464w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-22.png?w=928&amp;h=674 928w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-22.png?w=150&amp;h=109 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-22.png?w=300&amp;h=218 300w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-22.png?w=768&amp;h=557 768w\" style=\"width: 664px; height: 482px;\" \/><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 11.09.27.png\" data-attachment-id=\"245\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 11.09.27\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-27.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-27.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-27.png\" data-orig-size=\"1212,820\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-11-09-27\/\" sizes=\"(max-width: 371px) 100vw, 371px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-27.png?w=371&amp;h=252\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-27.png?w=371&amp;h=252 371w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-27.png?w=742&amp;h=502 742w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-27.png?w=150&amp;h=101 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-09-27.png?w=300&amp;h=203 300w\" style=\"width: 671px; height: 252px;\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3><b>3. Scatterplot<\/b><\/h3>\n<p>We use scatterplots to find out how much 2 variables (for 2 dimensions) or 3 variables (for 3 dimensions) are related to each other (e.g the correlation).<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 11.10.47.png\" data-attachment-id=\"247\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 11.10.47\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-47.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-47.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-47.png\" data-orig-size=\"1378,674\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-11-10-47\/\" sizes=\"(max-width: 501px) 100vw, 501px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-47.png?w=1002\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-47.png?w=1002 1002w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-47.png?w=501 501w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-47.png?w=150 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-47.png?w=300 300w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-47.png?w=768 768w\" style=\"width: 601px; height: 294px;\" \/><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 11.10.53.png\" data-attachment-id=\"246\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 11.10.53\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-53.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-53.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-53.png\" data-orig-size=\"1252,818\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-11-10-53\/\" sizes=\"(max-width: 371px) 100vw, 371px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-53.png?w=742\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-53.png?w=742 742w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-53.png?w=371 371w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-53.png?w=150 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-10-53.png?w=300 300w\" style=\"width: 671px; height: 242px;\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3><b>4. Stack Plot<\/b><\/h3>\n<p>Stack plots are used to identify changes over time for several groups or categories. They are very similar to the line graphs we discussed earlier in this post. You could, for example, display the stock market value over the last years and could easily spot the points where the market value started to decline or to rise.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 11.13.10.png\" data-attachment-id=\"249\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 11.13.10\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-10.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-10.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-10.png\" data-orig-size=\"1654,1374\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-11-13-10\/\" sizes=\"(max-width: 491px) 100vw, 491px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-10.png?w=982\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-10.png?w=982 982w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-10.png?w=491 491w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-10.png?w=150 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-10.png?w=300 300w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-10.png?w=768 768w\" style=\"width: 691px; height: 574px;\" \/><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 11.13.32.png\" data-attachment-id=\"248\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 11.13.32\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-32.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-32.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-32.png\" data-orig-size=\"1270,828\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-11-13-32\/\" sizes=\"(max-width: 333px) 100vw, 333px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-32.png?w=666\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-32.png?w=666 666w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-32.png?w=333 333w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-32.png?w=150 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-13-32.png?w=300 300w\" style=\"width: 633px; height: 412px;\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3><b>5. Pie Chart<\/b><\/h3>\n<p>Pie Charts are very good for example to display things like market share of companies.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 11.15.06.png\" data-attachment-id=\"251\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 11.15.06\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-06.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-06.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-06.png\" data-orig-size=\"1608,1076\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-11-15-06\/\" sizes=\"(max-width: 590px) 100vw, 590px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-06.png?w=1180\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-06.png?w=1180 1180w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-06.png?w=590 590w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-06.png?w=150 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-06.png?w=300 300w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-06.png?w=768 768w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-06.png?w=1024 1024w\" style=\"width: 690px; height: 462px;\" \/><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 11.15.11.png\" data-attachment-id=\"250\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 11.15.11\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-11.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-11.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-11.png\" data-orig-size=\"1158,636\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-11-15-11\/\" sizes=\"(max-width: 391px) 100vw, 391px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-11.png?w=782\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-11.png?w=782 782w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-11.png?w=391 391w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-11.png?w=150 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-11.png?w=300 300w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-15-11.png?w=768 768w\" style=\"width: 691px; height: 215px;\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><b>How to deal with multiple plots<\/b><\/h3>\n<p>The following code samples will explain to you how can plot multiple plots in different ways. First of all, we need numpy to do this, since we have to use numpy arrays.<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 11.16.05.png\" data-attachment-id=\"252\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 11.16.05\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-05.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-05.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-05.png\" data-orig-size=\"1744,1164\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-11-16-05\/\" sizes=\"(max-width: 562px) 100vw, 562px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-05.png?w=562&amp;h=374\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-05.png?w=560&amp;h=374 560w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-05.png?w=1121&amp;h=748 1121w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-05.png?w=150&amp;h=100 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-05.png?w=300&amp;h=200 300w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-05.png?w=768&amp;h=513 768w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-05.png?w=1024&amp;h=683 1024w\" style=\"width: 662px; height: 374px;\" \/><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 11.16.17.png\" data-attachment-id=\"253\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 11.16.17\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-17.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-17.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-17.png\" data-orig-size=\"1302,780\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-11-16-17\/\" sizes=\"(max-width: 353px) 100vw, 353px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-17.png?w=353&amp;h=211\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-17.png?w=353&amp;h=211 353w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-17.png?w=704&amp;h=422 704w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-17.png?w=150&amp;h=90 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-17.png?w=300&amp;h=180 300w\" style=\"width: 653px; height: 390px;\" \/><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 11.16.37.png\" data-attachment-id=\"254\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 11.16.37\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-37.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-37.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-37.png\" data-orig-size=\"1488,518\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-11-16-37\/\" sizes=\"(max-width: 534px) 100vw, 534px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-37.png?w=534&amp;h=186\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-37.png?w=534&amp;h=186 534w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-37.png?w=1068&amp;h=372 1068w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-37.png?w=150&amp;h=52 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-37.png?w=300&amp;h=104 300w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-37.png?w=768&amp;h=267 768w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-37.png?w=1024&amp;h=356 1024w\" style=\"width: 634px; height: 221px;\" \/><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" alt=\"Bildschirmfoto 2017-12-18 um 11.16.43.png\" data-attachment-id=\"255\" data-comments-opened=\"1\" data-image-description=\"\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bildschirmfoto 2017-12-18 um 11.16.43\" data-large-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-43.png?w=736\" data-medium-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-43.png?w=300\" data-orig-file=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-43.png\" data-orig-size=\"1204,408\" data-permalink=\"https:\/\/machinelearning-blog.com\/2017\/12\/18\/visualizing-data-with-matplotli\/bildschirmfoto-2017-12-18-um-11-16-43\/\" sizes=\"(max-width: 446px) 100vw, 446px\" src=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-43.png?w=446&amp;h=151\" srcset=\"https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-43.png?w=446&amp;h=151 446w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-43.png?w=892&amp;h=302 892w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-43.png?w=150&amp;h=51 150w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-43.png?w=300&amp;h=102 300w, https:\/\/machinelearningblogcom.files.wordpress.com\/2017\/12\/bildschirmfoto-2017-12-18-um-11-16-43.png?w=768&amp;h=260 768w\" style=\"width: 646px; height: 219px;\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Matplotlib is one of the most used python libraries to visualize and explore data. It enables you to draw different types of graphs, like line, scattered, bar, and so on. You could say that it is the de-facto standard library for plotting data with python. Matplotlib can be used in Python scripts, Python and&nbsp;IPython&nbsp;shell&rsquo;s,&nbsp;Jupiter&nbsp;notebook&rsquo;s, web application servers, and four graphical user interface toolkits. It enables you to generate a visual representation of data with just a few lines of code.<\/p>\n","protected":false},"author":413,"featured_media":2979,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[183],"tags":[92],"ppma_author":[2327],"class_list":["post-1748","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-ml","tag-machine-learning"],"authors":[{"term_id":2327,"user_id":413,"is_guest":0,"slug":"niklas-donges","display_name":"Niklas Donges","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","user_url":"","last_name":"Donges","first_name":"Niklas","job_title":"","description":"<a href=\"https:\/\/www.linkedin.com\/in\/niklas-donges\/\">Niklas Donges<\/a>&nbsp;is Machine Learning Engineer at SAP. He is a Technical Blogger for the &#039;Towards Data Science&#039; publication"}],"_links":{"self":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/1748","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/users\/413"}],"replies":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/comments?post=1748"}],"version-history":[{"count":1,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/1748\/revisions"}],"predecessor-version":[{"id":7093,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/1748\/revisions\/7093"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media\/2979"}],"wp:attachment":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media?parent=1748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/categories?post=1748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/tags?post=1748"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=1748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}