{"id":5620,"date":"2020-11-25T13:42:27","date_gmt":"2020-11-25T08:12:27","guid":{"rendered":"http:\/\/www.pythonpool.com\/?p=5620"},"modified":"2024-01-01T14:01:44","modified_gmt":"2024-01-01T08:31:44","slug":"matplotlib-contourf","status":"publish","type":"post","link":"https:\/\/www.pythonpool.com\/matplotlib-contourf\/","title":{"rendered":"Matplotlib Contourf() Including 3D Repesentation"},"content":{"rendered":"\n<p>Hello programmers, today&#8217;s article is all about the Matplotlib Contourf () function in Python.<\/p>\n\n\n\n<p><strong>The contourf () function in the pyplot module of the matplotlib library helps plot contours. Level plots are also termed Contour Plots. They are tools for doing multivariate analysis and visualizing 3-D plots in 2-D space.<\/strong><\/p>\n\n\n\n<p>We will look into examples and implementations of the Matplotlib contourf() function. But before that, let me just brief you about the syntax and parameters of the contourf() function.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_74 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #990303;color:#990303\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #990303;color:#990303\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#Syntax_of_contourf_function\" >Syntax of contourf() function:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#Parameters_of_Matplotlib_Contourf\" >Parameters of Matplotlib Contourf:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#Return_type\" >Return type:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#Example_of_Matplotlib_contourf\" >Example of Matplotlib contourf()<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#Setting_Colorbar_Range_with_Matplotlib_contourf_in_Python\" >Setting Colorbar Range with Matplotlib contourf() in Python<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#Plotting_3D_contour_with_Matplotlib_contourf_in_Python\" >Plotting 3D contour with Matplotlib contourf() in Python<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#Matplotlib_contourf_vs_contour\" >Matplotlib contourf() v\/s contour()<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#Conclusion\" >Conclusion:<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-syntax-of-contourf-function\"><span class=\"ez-toc-section\" id=\"Syntax_of_contourf_function\"><\/span>Syntax of contourf() function:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">matplotlib.pyplot.contourf(*args, data=None, **kwargs)<\/pre>\n\n\n\n<p><strong>Call Signature:<\/strong> contour([X, Y,] Z, [levels], **kwargs) <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-parameters-of-matplotlib-contourf\"><span class=\"ez-toc-section\" id=\"Parameters_of_Matplotlib_Contourf\"><\/span><strong>Parameters of Matplotlib Contourf:<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>X, Y:<\/strong>&nbsp;Both the parameters should have the same shape as Z. They must both be 1-D such that&nbsp;len(X) is the number of columns in&nbsp;Z&nbsp;and len(Y)&nbsp;&nbsp;is the number of rows in&nbsp;Z. <\/li>\n\n\n\n<li><strong>Z<\/strong>:&nbsp; Height values over which the contour is drawn. (Array-like)<\/li>\n\n\n\n<li><strong>levels<\/strong>:&nbsp;Determine the numbers and positions of the contour lines\/regions. For integer&nbsp;n, use&nbsp;n&nbsp;data intervals, i.e., draw&nbsp;n+1&nbsp;contour lines. For arrays, draw contour lines at the specified levels. The values must be in increasing order.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-return-type\"><span class=\"ez-toc-section\" id=\"Return_type\"><\/span>Return type:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Returns a contour plot based on the desired parameters passed as arguments to the contourf() function.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-example-of-matplotlib-contourf\"><span class=\"ez-toc-section\" id=\"Example_of_Matplotlib_contourf\"><\/span>Example of Matplotlib contourf() <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport matplotlib.pyplot as plt \nimport numpy as np \n  \nfeature_x = np.linspace(-5.0, 3.0, 70) \nfeature_y = np.linspace(-5.0, 3.0, 70) \n  \n# Creating 2-D grid of features \n&#x5B;X, Y] = np.meshgrid(feature_x, feature_y) \n  \nfig, ax = plt.subplots(1, 1) \n  \nZ = X ** 2 + Y ** 2\n  \n# plots filled contour plot \nax.contourf(X, Y, Z) \n  \nax.set_title('Filled Contour Plot') \nax.set_xlabel('feature_x') \nax.set_ylabel('feature_y') \n  \nplt.show() \n<\/pre><\/div>\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" width=\"422\" height=\"298\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/image-11.png\" alt=\"Example of contourf() \" class=\"wp-image-5622\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/image-11.png 422w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/image-11-300x212.png 300w\" sizes=\"(max-width: 422px) 100vw, 422px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-explanation\"><strong>Explanation:<\/strong><\/h3>\n\n\n\n<p>In the above example, the Numpy meshgrid() function creates a 2-dimensional grid containing the coordinates of the values in Z. X and Y have the same dimensions as Z. The Z array contains the height values on which the contour.<\/p>\n\n\n\n<p>Thus, passing X, Y, and Z as arguments to the contourf() function, we get a filled contour plot. The title of the contour plot &#8216;Filled Contour Plot.&#8217; The x-label and y &#8211; label is for the contour plot as &#8216;feature x&#8217; and &#8216;feature y&#8217;, respectively.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-setting-colorbar-range-with-matplotlib-contourf-in-python\"><span class=\"ez-toc-section\" id=\"Setting_Colorbar_Range_with_Matplotlib_contourf_in_Python\"><\/span>Setting Colorbar Range with Matplotlib contourf() in Python<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport numpy as np\nimport matplotlib.pyplot as plt\nx = np.arange(20)\ny = np.arange(20)\ndata = x&#x5B;:,None]+y&#x5B;None,:]\n\nX,Y = np.meshgrid(x,y)\nvmin = 0\nvmax = 15\n\nfig,ax = plt.subplots()\ncontourf_ = ax.contourf(X,Y,data, 400, vmin=vmin, vmax=vmax)\ncbar = fig.colorbar(contourf_)\ncbar.set_clim( vmin, vmax )\n<\/pre><\/div>\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" width=\"551\" height=\"441\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/image-13.png\" alt=\"Setting Colorbar Range with Matplotlib contourf()\" class=\"wp-image-5624\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/image-13.png 551w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/image-13-300x240.png 300w\" sizes=\"(max-width: 551px) 100vw, 551px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-explanation-1\"><strong>Explanation:<\/strong><\/h3>\n\n\n\n<p>In the above example, the color bounds from the graphs are set with &#8220;vmin&#8221; and &#8220;vmax&#8221;, but the colorbar bounds are not modified. Passing contourf as an argument to the colorbar() method, we get to set the colorbar range for the contour created. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-plotting-3d-contour-with-matplotlib-contourf-in-python\"><span class=\"ez-toc-section\" id=\"Plotting_3D_contour_with_Matplotlib_contourf_in_Python\"><\/span>Plotting 3D contour with Matplotlib contourf() in Python<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom mpl_toolkits.mplot3d import Axes3D\nimport matplotlib.pyplot as plt\nimport numpy as np\na=np.array(&#x5B;-3,-2,-1,0,1,2,3])\nb=a\na,b=np.meshgrid(a,b)\nfig = plt.figure()\naxes = fig.gca(projection=&quot;3d&quot;)\naxes.plot_surface(a,b,a**2+b**2,cmap=&quot;rainbow&quot;)\nplt.contour(a,b,a**2+b**2,cmap=&quot;rainbow&quot;)\nplt.show()\n<\/pre><\/div>\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" width=\"589\" height=\"436\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/image-14.png\" alt=\"Plotting 3D contour with Matplotlib contourf() in Python\" class=\"wp-image-5625\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/image-14.png 589w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/image-14-300x222.png 300w\" sizes=\"(max-width: 589px) 100vw, 589px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-explanation-2\"><strong>Explanation:<\/strong><\/h3>\n\n\n\n<p>In this example, <strong>numpy<\/strong>&nbsp;and&nbsp;<strong>matplotlib&nbsp;<\/strong>library are imported. A numpy array is created to store A and B. After that,  the meshgrid function is used, and A and B are passed inside it. The contour is then plotted to bypass 3 arguments:&nbsp;A, B, A**2+B**2.&nbsp;For three-dimensional contour plotting, module&nbsp;<strong>Axes3D&nbsp;<\/strong>from&nbsp;<strong>mpl_toolkits.mplot3d<\/strong>&nbsp;needs to be imported specifically.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-matplotlib-contourf-v-s-contour\"><span class=\"ez-toc-section\" id=\"Matplotlib_contourf_vs_contour\"><\/span>Matplotlib contourf() v\/s contour()<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Both contourf() and contour() functions of the Matplotlib library are used for contour plotting in Python. The only difference between them is that the contourf() is used to plot filled contours while contour() only plots the contour lines. Below is an example to demonstrate Python&#8217;s Matplotlib contour() function.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport matplotlib.pyplot as plt \nimport numpy as np \n  \nfeature_x = np.arange(0, 50, 2) \nfeature_y = np.arange(0, 50, 3) \n  \n# Creating 2-D grid of features \n&#x5B;X, Y] = np.meshgrid(feature_x, feature_y) \n  \nfig, ax = plt.subplots(1, 1) \n  \nZ = np.cos(X \/ 2) + np.sin(Y \/ 4) \n  \n# plots contour lines \nax.contour(X, Y, Z) \n  \nax.set_title('Contour Plot') \nax.set_xlabel('feature_x') \nax.set_ylabel('feature_y') \n  \nplt.show() \n<\/pre><\/div>\n\n\n<p><strong>Output:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" width=\"628\" height=\"440\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/image-12.png\" alt=\"Matplotlib contourf() v\/s contour()\" class=\"wp-image-5623\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/image-12.png 628w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/image-12-300x210.png 300w\" sizes=\"(max-width: 628px) 100vw, 628px\" \/><\/figure>\n\n\n\n<p class=\"has-vivid-red-color has-text-color\">Also Read:&nbsp;<a href=\"http:\/\/www.pythonpool.com\/matplotlib-quiver\/\" rel=\"noreferrer noopener\" target=\"_blank\">Matplotlib Quiver Plot<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this article, we discussed contour plots with examples and implementations. Contour plots are widely used to visualize the mountain&#8217;s density, altitudes, or heights by representing its three-dimensional surface in a two-dimensional plane.  Unlike the MATLAB version, contourf() cannot draw polygon edges. The contourf() function&nbsp;fills intervals that are closed at the top(i.e., includes the lowest values). You can refer to this article for clear and concise knowledge of Matplotlib contourf() in Python.<\/p>\n\n\n\n<p>However, if you have any doubts or questions, do let me know in the comment section below. I will try to help you as soon as possible.<\/p>\n\n\n\n<p><strong><em>Happy Pythoning!<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello programmers, today&#8217;s article is all about the Matplotlib Contourf () function in Python. The contourf () function in the pyplot module of the matplotlib &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Matplotlib Contourf() Including 3D Repesentation\" class=\"read-more button\" href=\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#more-5620\" aria-label=\"More on Matplotlib Contourf() Including 3D Repesentation\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":5660,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[2071],"tags":[2559,2558,2557,2560],"class_list":["post-5620","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-matplotlib","tag-bilinear-contourf-matplotlib","tag-contourf-matplotlib","tag-matplotlib-contourf","tag-matplotlib-contourf-no-interpolation","infinite-scroll-item"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.1 (Yoast SEO v25.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Matplotlib Contourf() Including 3D Repesentation - Python Pool<\/title>\n<meta name=\"description\" content=\"Everything you need to know about Matplotlib contourf() in Python along with examples and ways to represent in 3D and set color bar range.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Matplotlib Contourf() Including 3D Repesentation\" \/>\n<meta property=\"og:description\" content=\"Hello programmers, today&#039;s article is all about the Matplotlib Contourf () function in Python. The contourf () function in the pyplot module of the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/\" \/>\n<meta property=\"og:site_name\" content=\"Python Pool\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-25T08:12:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-01T08:31:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/Theatre-Actor-Portfolio-Website-21.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1350\" \/>\n\t<meta property=\"og:image:height\" content=\"650\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Python Pool\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:site\" content=\"@pythonpool\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Python Pool\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/\"},\"author\":{\"name\":\"Python Pool\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/f87448ee54c0ffd2889fbf2408c18998\"},\"headline\":\"Matplotlib Contourf() Including 3D Repesentation\",\"datePublished\":\"2020-11-25T08:12:27+00:00\",\"dateModified\":\"2024-01-01T08:31:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/\"},\"wordCount\":611,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/Theatre-Actor-Portfolio-Website-21.png\",\"keywords\":[\"bilinear contourf matplotlib\",\"contourf matplotlib\",\"matplotlib contourf\",\"matplotlib contourf no interpolation\"],\"articleSection\":[\"Matplotlib\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/\",\"url\":\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/\",\"name\":\"Matplotlib Contourf() Including 3D Repesentation - Python Pool\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/Theatre-Actor-Portfolio-Website-21.png\",\"datePublished\":\"2020-11-25T08:12:27+00:00\",\"dateModified\":\"2024-01-01T08:31:44+00:00\",\"description\":\"Everything you need to know about Matplotlib contourf() in Python along with examples and ways to represent in 3D and set color bar range.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#primaryimage\",\"url\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/Theatre-Actor-Portfolio-Website-21.png\",\"contentUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/Theatre-Actor-Portfolio-Website-21.png\",\"width\":1350,\"height\":650,\"caption\":\"Matplotlib Contourf\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pythonpool.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Matplotlib Contourf() Including 3D Repesentation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.pythonpool.com\/#website\",\"url\":\"https:\/\/www.pythonpool.com\/\",\"name\":\"Python Pool\",\"description\":\"Your One-Stop Python Learning Destination\",\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.pythonpool.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.pythonpool.com\/#organization\",\"name\":\"Python Pool\",\"url\":\"https:\/\/www.pythonpool.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png\",\"contentUrl\":\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png\",\"width\":452,\"height\":185,\"caption\":\"Python Pool\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/pythonpool\",\"https:\/\/www.youtube.com\/c\/pythonpool\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/f87448ee54c0ffd2889fbf2408c18998\",\"name\":\"Python Pool\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fdd3cb9ad7f560324dfd481989550aa8ffce84388fd253c42beca35c999d3108?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fdd3cb9ad7f560324dfd481989550aa8ffce84388fd253c42beca35c999d3108?s=96&d=wavatar&r=g\",\"caption\":\"Python Pool\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Matplotlib Contourf() Including 3D Repesentation - Python Pool","description":"Everything you need to know about Matplotlib contourf() in Python along with examples and ways to represent in 3D and set color bar range.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pythonpool.com\/matplotlib-contourf\/","og_locale":"en_US","og_type":"article","og_title":"Matplotlib Contourf() Including 3D Repesentation","og_description":"Hello programmers, today's article is all about the Matplotlib Contourf () function in Python. The contourf () function in the pyplot module of the","og_url":"https:\/\/www.pythonpool.com\/matplotlib-contourf\/","og_site_name":"Python Pool","article_published_time":"2020-11-25T08:12:27+00:00","article_modified_time":"2024-01-01T08:31:44+00:00","og_image":[{"width":1350,"height":650,"url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/Theatre-Actor-Portfolio-Website-21.png","type":"image\/png"}],"author":"Python Pool","twitter_card":"summary_large_image","twitter_creator":"@pythonpool","twitter_site":"@pythonpool","twitter_misc":{"Written by":"Python Pool","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#article","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/matplotlib-contourf\/"},"author":{"name":"Python Pool","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/f87448ee54c0ffd2889fbf2408c18998"},"headline":"Matplotlib Contourf() Including 3D Repesentation","datePublished":"2020-11-25T08:12:27+00:00","dateModified":"2024-01-01T08:31:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pythonpool.com\/matplotlib-contourf\/"},"wordCount":611,"commentCount":0,"publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"image":{"@id":"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/Theatre-Actor-Portfolio-Website-21.png","keywords":["bilinear contourf matplotlib","contourf matplotlib","matplotlib contourf","matplotlib contourf no interpolation"],"articleSection":["Matplotlib"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pythonpool.com\/matplotlib-contourf\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pythonpool.com\/matplotlib-contourf\/","url":"https:\/\/www.pythonpool.com\/matplotlib-contourf\/","name":"Matplotlib Contourf() Including 3D Repesentation - Python Pool","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#primaryimage"},"image":{"@id":"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/Theatre-Actor-Portfolio-Website-21.png","datePublished":"2020-11-25T08:12:27+00:00","dateModified":"2024-01-01T08:31:44+00:00","description":"Everything you need to know about Matplotlib contourf() in Python along with examples and ways to represent in 3D and set color bar range.","breadcrumb":{"@id":"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pythonpool.com\/matplotlib-contourf\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#primaryimage","url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/Theatre-Actor-Portfolio-Website-21.png","contentUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/11\/Theatre-Actor-Portfolio-Website-21.png","width":1350,"height":650,"caption":"Matplotlib Contourf"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pythonpool.com\/matplotlib-contourf\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pythonpool.com\/"},{"@type":"ListItem","position":2,"name":"Matplotlib Contourf() Including 3D Repesentation"}]},{"@type":"WebSite","@id":"https:\/\/www.pythonpool.com\/#website","url":"https:\/\/www.pythonpool.com\/","name":"Python Pool","description":"Your One-Stop Python Learning Destination","publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pythonpool.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.pythonpool.com\/#organization","name":"Python Pool","url":"https:\/\/www.pythonpool.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","contentUrl":"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/aa.png","width":452,"height":185,"caption":"Python Pool"},"image":{"@id":"https:\/\/www.pythonpool.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/pythonpool","https:\/\/www.youtube.com\/c\/pythonpool"]},{"@type":"Person","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/f87448ee54c0ffd2889fbf2408c18998","name":"Python Pool","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fdd3cb9ad7f560324dfd481989550aa8ffce84388fd253c42beca35c999d3108?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fdd3cb9ad7f560324dfd481989550aa8ffce84388fd253c42beca35c999d3108?s=96&d=wavatar&r=g","caption":"Python Pool"}}]}},"_links":{"self":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/5620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/comments?post=5620"}],"version-history":[{"count":10,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/5620\/revisions"}],"predecessor-version":[{"id":31494,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/5620\/revisions\/31494"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media\/5660"}],"wp:attachment":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media?parent=5620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/categories?post=5620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/tags?post=5620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}