{"id":23949,"date":"2021-03-25T19:59:34","date_gmt":"2021-03-25T19:59:34","guid":{"rendered":"https:\/\/holypython.com\/?page_id=23949"},"modified":"2021-04-04T16:32:11","modified_gmt":"2021-04-04T16:32:11","slug":"creating-hexbin-charts","status":"publish","type":"page","link":"https:\/\/holypython.com\/python-visualization-tutorial\/creating-hexbin-charts\/","title":{"rendered":"Creating Hexbin Charts"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"23949\" class=\"elementor elementor-23949\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-38819ef elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"38819ef\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-98d652e\" data-id=\"98d652e\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-096830f elementor-widget elementor-widget-text-editor\" data-id=\"096830f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t&lt;&lt;&lt; <a href=\"https:\/\/holypython.com\/python-visualization-tutorial\/\">Visualization Tutorials<\/a>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;\n<ol>\n \t<li><a style=\"background-color: #ffffff;\" href=\"https:\/\/holypython.com\/how-to-create-plotly-animations-the-ultimate-guide\/\">How to <span style=\"font-weight: bold;\">create Plotly<\/span> animations<\/a><\/li>\n \t<li><a href=\"https:\/\/holypython.com\/how-to-save-plotly-animations-the-ultimate-guide\/\">How to <span style=\"font-weight: bold;\">save Plotly<\/span> animations<\/a><\/li>\n \t<li><a href=\"https:\/\/holypython.com\/how-to-create-map-charts-in-python-w-plotly-mapbox\/\">How to <span style=\"font-weight: bold;\">create Mapcharts<\/span> &#8211; Plotly &amp; Mapbox<\/a><\/li>\n \t<li><a href=\"https:\/\/holypython.com\/how-to-create-matplotlib-animations-the-ultimate-guide\/\">How to <span style=\"font-weight: bold;\">create Matplotlib<\/span> animations<\/a><\/li>\n \t<li><a href=\"https:\/\/holypython.com\/how-to-save-matplotlib-animations-the-ultimate-guide\/\">How to <span style=\"font-weight: bold;\">save Matplotlib<\/span> animations<\/a><\/li>\n \t<li><a style=\"outline-width: 0px !important; user-select: auto !important;\" href=\"https:\/\/holypython.com\/python-visualization-tutorial\/python-chart-elements-title-axes-ticks-legend\/\"><span style=\"font-weight: bold;\">Titles, Axes, Ticks<\/span> &amp; Legend<\/a><\/li>\n \t<li><a href=\"https:\/\/holypython.com\/a-guide-to-matplotlibs-built-in-styles\/\">Matplotlib Built-in <span style=\"font-weight: bold;\">Styles<\/span><\/a><\/li>\n \t<li><a href=\"https:\/\/holypython.com\/python-visualization-tutorial\/guide-to-python-animations-animating-line-charts\/\"><span style=\"font-weight: bold;\">Animated Line<\/span> Charts<\/a><\/li>\n \t<li><a href=\"https:\/\/holypython.com\/python-visualization-tutorial\/guide-to-python-animations-animating-multiple-lines\/\"><span style=\"font-weight: bold;\">Multi-line<\/span> Animation<\/a><\/li>\n \t<li><a href=\"https:\/\/holypython.com\/python-visualization-tutorial\/creating-stacked-area-charts-with-python\/\"><span style=\"font-weight: bold;\">Stacked Area<\/span> Charts<\/a><\/li>\n \t<li><a href=\"https:\/\/holypython.com\/python-visualization-tutorial\/word-cloud-visualization\/\"><span style=\"font-weight: bold;\">Word Cloud<\/span> Visualization<\/a><\/li>\n \t<li><a href=\"https:\/\/holypython.com\/python-visualization-tutorial\/creating-bar-chart-animations\/\"><span style=\"font-weight: bold;\">Bar Chart<\/span> Animations<\/a><\/li>\n \t<li><a href=\"https:\/\/holypython.com\/python-visualization-tutorial\/colors-with-python\/\"><span style=\"font-weight: bold;\">Colors<\/span> with Python<\/a><\/li>\n \t<li><a href=\"https:\/\/holypython.com\/python-visualization-tutorial\/creating-multiple-charts\/\">Creating <span style=\"font-weight: bold;\">Multiple Charts<\/span><\/a><\/li>\n \t<li><a href=\"https:\/\/holypython.com\/python-visualization-tutorial\/creating-hexbin-charts\/\">Creating\u00a0<span style=\"font-weight: bold;\">Hexbin Charts<\/span><\/a><\/li>\n \t<li><a href=\"https:\/\/holypython.com\/python-visualization-tutorial\/pcolor-and-pcolormesh\/\">Creating\u00a0<span style=\"font-weight: bold;\">Pcolor Charts<\/span><\/a><\/li>\n<\/ol>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-top-column elementor-element elementor-element-820bd33\" data-id=\"820bd33\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-2eacc4c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2eacc4c\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-1d7add4\" data-id=\"1d7add4\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c9dba6c elementor-widget elementor-widget-heading\" data-id=\"c9dba6c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">Creating Hexbin Charts<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-3a3ccc8\" data-id=\"3a3ccc8\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-57329d4 elementor-widget elementor-widget-raven-image\" data-id=\"57329d4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"raven-image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"raven-image\">\n\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\n\t\t\n\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_1.png\" class=\"attachment-full size-full wp-image-24060\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_1.png 640w, https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_1-300x225.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Multi-plot Grid using Subplot<\/figcaption>\n\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<div class=\"elementor-element elementor-element-98a498b elementor-widget elementor-widget-text-editor\" data-id=\"98a498b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Contents<\/p><ul><li><a href=\"#intro\">Introduction<\/a><ol><li><a href=\"#hexbin\">Hexbin Charts<\/a>\u00a0(with Python)<\/li><li><a href=\"#example1\">Example 1: Basic Hexbin Plot<\/a><\/li><li><a href=\"#example2\">Example 2: Refined Hexbin Plots<\/a><\/li><li><a href=\"#save_hexbin\">How to save Hexbin Charts<\/a><\/li><\/ol><\/li><li><a style=\"background-color: #ffffff;\" href=\"#summary\">Summary<\/a><\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-eeece35 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"eeece35\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-883b749\" data-id=\"883b749\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b3f3750 elementor-widget elementor-widget-menu-anchor\" data-id=\"b3f3750\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"menu-anchor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-menu-anchor\" id=\"intro\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-49a0273 elementor-widget elementor-widget-heading\" data-id=\"49a0273\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Introduction<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4cbd9b7 elementor-widget elementor-widget-text-editor\" data-id=\"4cbd9b7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><b>Hexbin<\/b> function (of <b>Pyplot<\/b>) can be used to create <b>Hexagonal Bins<\/b>.&nbsp;This specific charting techniques is useful for visualizing distributions, distances, clusters and density functions.<\/p>\n<p>Hexbin Plot are used in a huge range of domains such as Machine Learning, Topography, Geography, City Management, Transportation, Science and Data Science.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a9c4458 elementor-widget elementor-widget-text-editor\" data-id=\"a9c4458\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>We will see &#8220;how to create an save hexbin plots&#8221; as well as a couple of cool hexbin plotting examples in this Python tutorial.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-e61fb19 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e61fb19\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-ed2d7cf\" data-id=\"ed2d7cf\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d67b7db elementor-widget elementor-widget-menu-anchor\" data-id=\"d67b7db\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"menu-anchor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-menu-anchor\" id=\"hexbin\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-668c9eb elementor-widget elementor-widget-heading\" data-id=\"668c9eb\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">1- Hexbin Charts<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3c265ee elementor-widget elementor-widget-text-editor\" data-id=\"3c265ee\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Hexbin charts consist of points that look like hexagon shapes. Hexbin works well with binned datasets.<\/p><p>Hexbin is a great alternative to Hist2d plots. And although they are different types of charts hexbin can be an alternative to scatter plots as well when suitable.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-34e6b46 elementor-widget elementor-widget-html\" data-id=\"34e6b46\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"Python\"><code>from matplotlib import animation\nimport matplotlib.pyplot as plt\nfrom matplotlib.animation import FuncAnimation\nimport seaborn as sns\n%matplotlib qt\n<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<div class=\"elementor-element elementor-element-fc25f11 elementor-widget elementor-widget-text-editor\" data-id=\"fc25f11\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>With this knowledge shared above, you can unlock a whole new world of multiplot grids and even multiplot animations of all types, colors and shapes.<\/p><p>All you need is some loop knowledge to iterate through the index of the <b>pyplot subplots<\/b>.\u00a0<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-0241d94 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0241d94\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-d5478fe\" data-id=\"d5478fe\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-80b30b3 elementor-widget elementor-widget-menu-anchor\" data-id=\"80b30b3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"menu-anchor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-menu-anchor\" id=\"example1\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e335f33 elementor-widget elementor-widget-heading\" data-id=\"e335f33\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">2- Basic Hexbin Example 1<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bd28d0d elementor-widget elementor-widget-text-editor\" data-id=\"bd28d0d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>You can create hexbin charts using <b>pyplot.hexbin<\/b> function like below:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a503ec2 elementor-widget elementor-widget-html\" data-id=\"a503ec2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"PYTHON\"><code>import numpy as np\nimport matplotlib.pyplot as plt\n\nx = np.random.normal(size=(1, 10000))\ny = np.random.normal(size=(1, 10000))\nplt.hexbin(x, y, gridsize=35, cmap=\"plasma\")\n<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0307c99 elementor-widget elementor-widget-image\" data-id=\"0307c99\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"800\" height=\"550\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_6.png\" class=\"attachment-full size-full wp-image-24134\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_6.png 800w, https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_6-300x206.png 300w, https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_6-768x528.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Simple hexbin chart created with plasma colormap<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bc00aca elementor-widget elementor-widget-text-editor\" data-id=\"bc00aca\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>HexBin Charts can be customized via its parameters shared below. Making the hexagons bigger or smaller, deciding the minimum amount of samples for a hexagon to be visualized as well as applying a <a href=\"https:\/\/holypython.com\/python-visualization-tutorial\/colors-with-python\/\">Python colormap<\/a> or defining edgecolors can greatly change the appearance of hexbin charts and make them more suitable for your work.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-220c949 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"220c949\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-b7dbd27\" data-id=\"b7dbd27\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-286d95a elementor-widget elementor-widget-heading\" data-id=\"286d95a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">What is Hexagon Bin Chart?<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4c91e97 elementor-widget elementor-widget-text-editor\" data-id=\"4c91e97\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Hexagon is a histogram like chart where each hexagon represents the density of samples (instead of bars in histogram).<\/p><p>It can be an alternative to <b>histogram visualization<\/b> but thanks to its elaborate use of x and y axes it can also be used as an alternative to <b>scatter plots<\/b> if data is suitable.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c09fa93 elementor-widget elementor-widget-image\" data-id=\"c09fa93\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"800\" height=\"550\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_3.png\" class=\"attachment-full size-full wp-image-24110\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_3.png 800w, https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_3-300x206.png 300w, https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_3-768x528.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0c090de elementor-widget elementor-widget-text-editor\" data-id=\"0c090de\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In the hexbin chart above with the points of the scatter plot overlaid you can see how outer hexagons correspond to less sample density (1 or 2 points) while as we go through inner hexagons point density is much higher. This image captures the idea of hexbin charts very as well as their inner workings well.<\/p><p>You can create similar charts just by using hexbin and scatter consecutively.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ddf55cf elementor-widget elementor-widget-html\" data-id=\"ddf55cf\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"PYTHON\"><code>plt.hexbin(x,y,gridsize=15, mincnt=1, edgecolors=\"none\", cmap=\"inferno\")\nplt.scatter(x,y, s=2, c=\"white\")\nplt.show()\n<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-97735e7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"97735e7\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-34a328d\" data-id=\"34a328d\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3962d2e elementor-widget elementor-widget-heading\" data-id=\"3962d2e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Mincnt Parameter<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-21e45fe elementor-widget elementor-widget-text-editor\" data-id=\"21e45fe\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Hexbin has a couple of very useful parameters that allows more control on the hexbin plot.<\/p><p><b>mincnt<\/b>: Stands for minimum count, this is the parameter that defines the amount of samples needed for each point to be visualized with a hexagon. If you don&#8217;t assign a value it&#8217;s 0 (or None) by default and every point will be visualized.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-b9765b3 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b9765b3\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-0fbff6d\" data-id=\"0fbff6d\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5ccce40 elementor-widget elementor-widget-image\" data-id=\"5ccce40\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_1.png\" class=\"attachment-full size-full wp-image-24060\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_1.png 640w, https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_1-300x225.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Hexbin w\/ mincnt=1<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-f13fba8\" data-id=\"f13fba8\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ec7a027 elementor-widget elementor-widget-image\" data-id=\"ec7a027\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_2.png\" class=\"attachment-full size-full wp-image-24061\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_2.png 640w, https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_2-300x225.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Hexbin w\/ mincnt=0<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<div class=\"elementor-element elementor-element-e3957d2 elementor-widget elementor-widget-heading\" data-id=\"e3957d2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Gridsize, Edgecolors and Cmap Parameters<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-093534f elementor-widget elementor-widget-text-editor\" data-id=\"093534f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><b>Gridsize<\/b>\u00a0is a very useful parameter that lets you adjust the <b>size of hexagons<\/b> in the hexbin chart. Gridsize is negatively correlated with the hexagon size since it concerns the whole grid. I.e.: A hexbin chart with gridsize 50 will have much smaller hexagons than a hexbin chart with gridsize of 10. If gridsize is 10 this mean graph can be covered with 10 hexagons from one side to the other.<\/p><p><b>Edgecolors<\/b>\u00a0can be used to define the <b>edge colors<\/b> of hexagons in that chart.<\/p><p><b>cmap<\/b> is a very useful parameter that can be used to apply Python colormaps to the whole distribution. This allows a very beautiful visual and high control over the color scheme of the chart in a very efficient and low effort way.<\/p><p>Check out the example below to see these hexbin parameters in action:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-5c72514 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"5c72514\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-b2abfb5\" data-id=\"b2abfb5\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5823556 elementor-widget elementor-widget-image\" data-id=\"5823556\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"550\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_4.png\" class=\"attachment-full size-full wp-image-24120\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_4.png 800w, https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_4-300x206.png 300w, https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_4-768x528.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Hexbin w\/ gridsize=20<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-50 elementor-inner-column elementor-element elementor-element-5279157\" data-id=\"5279157\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6c82a8c elementor-widget elementor-widget-image\" data-id=\"6c82a8c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"550\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_5.png\" class=\"attachment-full size-full wp-image-24121\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_5.png 800w, https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_5-300x206.png 300w, https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/hexbin_chart_5-768x528.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/>\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Hexbin w\/ gridsize=40<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-89b7454 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"89b7454\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-0c4332e\" data-id=\"0c4332e\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ca1438b elementor-widget elementor-widget-menu-anchor\" data-id=\"ca1438b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"menu-anchor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-menu-anchor\" id=\"example2\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2f9e0b6 elementor-widget elementor-widget-heading\" data-id=\"2f9e0b6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">3- Refined Hexbin Plot Example 2<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-45264c1 elementor-widget elementor-widget-text-editor\" data-id=\"45264c1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In this <a href=\"https:\/\/holypython.com\/python-visualization-tutorial\/\">Python Animation Tutorial<\/a> we have explored <b>animated bar charts<\/b>.<\/p><p>We learned the main components of Python animations, how to create bar chart animations and how to save them.<\/p><p>We also demonstrated this knowledge through multiple examples such as,<\/p><ul><li><a href=\"#example1\">Ex1<\/a>: Basic Hexbin Chart Example shared above<\/li><\/ul><div>\u00a0<\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ba0bcac elementor-widget elementor-widget-raven-image\" data-id=\"ba0bcac\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"raven-image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"raven-image\">\n\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\n\t\t\n\t\t<img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"750\" src=\"https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/multi_hex_plot_3-Custom.png\" class=\"attachment-full size-full wp-image-23912\" alt=\"\" srcset=\"https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/multi_hex_plot_3-Custom.png 750w, https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/multi_hex_plot_3-Custom-300x300.png 300w, https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/multi_hex_plot_3-Custom-150x150.png 150w, https:\/\/holypython.com\/wp-content\/uploads\/2021\/03\/multi_hex_plot_3-Custom-500x500.png 500w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/>\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">Hexbin Multi-Plot created with several popular colormaps<\/figcaption>\n\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bc8fc12 elementor-widget elementor-widget-html\" data-id=\"bc8fc12\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"Python\"><code>import matplotlib.pyplot as plt\r\nimport numpy as np\r\nimport seaborn as sns\r\nplt.style.use(\"seaborn-whitegrid\")\r\n%matplotlib qt\r\n\r\nplt.figure(figsize=(15,15))\r\n\r\ncmap = [\"viridis\", \"cividis\", \"inferno\", \"viridis_r\", \"autumn\", \"winter\", \r\n        \"gist_stern\", \"twilight\", \"gnuplot\", \"binary\", \"copper\"]\r\n\r\nn = 70\r\nfor i in range(0,9):\r\n    plt.subplot(3,3,i+1)\r\n\r\n    x = np.ceil(np.random.standard_normal((n,n))*n)\r\n    y = np.ceil(np.random.standard_normal((n,n))*n)\r\n    plt.hexbin(x.flatten(),y.flatten(),gridsize=30, mincnt=1, edgecolors=\"none\", cmap=cmap[i])\r\n    plt.title(\"Chart {}: {}\".format(i+1, cmap[i]), size=20)<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e7625a5 elementor-widget elementor-widget-text-editor\" data-id=\"e7625a5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Correct and proficient use of colors and colormaps can be a crucial component of creating beautiful charts and data visualization in general. To see a thorough tutorial on that:<\/p><ul><li><a href=\"https:\/\/holypython.com\/python-visualization-tutorial\/colors-with-python\/\">Colors and Colormaps in Python<\/a><\/li><\/ul><p>Also, if you&#8217;d like to see a tutorial about how to create multi-plot grids using Python:<\/p><ul><li><a href=\"https:\/\/holypython.com\/python-visualization-tutorial\/creating-multiple-charts\/\">Creating Multiple Charts in Python<\/a><\/li><\/ul><div>colorbar, bin2d<\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-73799a7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"73799a7\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-92184fe\" data-id=\"92184fe\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-0e32ed3 elementor-widget elementor-widget-menu-anchor\" data-id=\"0e32ed3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"menu-anchor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-menu-anchor\" id=\"save_hexbin\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-43dbaf4 elementor-widget elementor-widget-heading\" data-id=\"43dbaf4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">4- How to save hexbin charts<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0346614 elementor-widget elementor-widget-text-editor\" data-id=\"0346614\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>You can conveniently save hexbin charts using savefig.() method. Just put the file name and path inside the savefig method including the file type extension such as png or jpg and your chart will be saved accordingly.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1bc90da elementor-widget elementor-widget-html\" data-id=\"1bc90da\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"Python\"><code>plt.savefig(\"Desktop\/filename.png\")<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c837fb4 elementor-widget elementor-widget-text-editor\" data-id=\"c837fb4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>If you are using qt to view charts, you can also just use the qt GUI and click the save button on the top right. You can activate qt using the following Python magic command:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9034140 elementor-widget elementor-widget-html\" data-id=\"9034140\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre rel=\"Python\"><code>%matplotlib qt<\/code><\/pre>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-inner-section elementor-element elementor-element-c27a064 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"c27a064\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-inner-column elementor-element elementor-element-590b7a4\" data-id=\"590b7a4\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-acd0f14 elementor-widget elementor-widget-menu-anchor\" data-id=\"acd0f14\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"menu-anchor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-menu-anchor\" id=\"summary\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-461dc3b elementor-widget elementor-widget-heading\" data-id=\"461dc3b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Summary<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f4b53bd elementor-widget elementor-widget-text-editor\" data-id=\"f4b53bd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In this <a style=\"background-color: #ffffff;\" href=\"https:\/\/holypython.com\/python-visualization-tutorial\/\">Python Visualization Tutorial<\/a> we learned how to create and save Python hexbin charts using pyplot&#8217;s <b>hexbin<\/b> function.\u00a0<\/p><p>We learned the main hexbin parameters that can be significant on the visualization output if used effectively such as <b>mincnt<\/b>, <b>gridsize<\/b>, <b>edgecolors<\/b> and <b>cmap<\/b>.<\/p><p>We also demonstrated this knowledge through a few examples.<\/p><ul><li><a href=\"#example1\">Ex1<\/a>: Basic Hexbin Chart Example<\/li><li><a href=\"#example2\">Ex2<\/a>: Refined Hexbin Chart Example with more settings applied<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>&lt;&lt;&lt; Visualization Tutorials &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; How to create Plotly animations How to save Plotly animations How to create Mapcharts &#8211; Plotly &amp; Mapbox How to create Matplotlib animations How to save Matplotlib animations Titles, Axes, Ticks &amp; Legend Matplotlib Built-in Styles Animated Line Charts Multi-line Animation Stacked Area Charts Word Cloud Visualization Bar Chart Animations Colors [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":24110,"parent":16235,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"full-width.php","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-23949","page","type-page","status-publish","has-post-thumbnail","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/pages\/23949","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/comments?post=23949"}],"version-history":[{"count":0,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/pages\/23949\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/pages\/16235"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/media\/24110"}],"wp:attachment":[{"href":"https:\/\/holypython.com\/wp-json\/wp\/v2\/media?parent=23949"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}