{"id":3934,"date":"2020-08-24T15:18:32","date_gmt":"2020-08-24T09:48:32","guid":{"rendered":"http:\/\/www.pythonpool.com\/?p=3934"},"modified":"2024-01-01T14:45:10","modified_gmt":"2024-01-01T09:15:10","slug":"matplotlib-figsize","status":"publish","type":"post","link":"https:\/\/www.pythonpool.com\/matplotlib-figsize\/","title":{"rendered":"Matplotlib Figsize | Change the Size of Graph using Figsize"},"content":{"rendered":"\n<p>Have you recently started working on graphs and plots using the <strong>matplotlib <\/strong>library and don\u2019t know how to change the size of the figures according to your will? Don\u2019t worry. In this article, we will help you manage the size of the plots as you like. If you have not explored the world of matplotlib until now, you can start from <a href=\"http:\/\/www.pythonpool.com\/matplotlib-imshow\/\">here<\/a>. So, let us learn how to use the matplotlib figsize attribute to adjust the size of the graph.<\/p>\n\n\n\n<p><strong>Matplotlib Figsize is a method used to change the dimension of your matplotlib window. Currently, the window is generated of 6.4&#215;4.8 inches by default. Using this module, you can change it at any size.<\/strong><\/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-figsize\/#What_is_Figsize_in_Python\" >What is Figsize in Python?<\/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-figsize\/#Syntax_of_Matplotlib_Figsize\" >Syntax&nbsp;of Matplotlib Figsize<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#Parameters\" >Parameters-&nbsp;<\/a><\/li><\/ul><\/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-figsize\/#What_is_default_Figsize_Matplotlib\" >What is default Figsize Matplotlib?<\/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-figsize\/#What_is_rcParams_figure_Figsize\" >What is rcParams figure Figsize?<\/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-figsize\/#What_are_Matplotlib_Figsize_Units\" >What are Matplotlib Figsize Units?<\/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-figsize\/#Changing_the_Height_and_Width_of_the_Graph\" >Changing the Height and Width of the Graph<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#Graph_with_Default_Size\" >Graph with Default Size&nbsp;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#Changing_the_Height_using_Matplotlib_Figsize\" >Changing the Height using Matplotlib Figsize<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#Changing_the_Height_of_the_Graph_using_Matplotlib_Figsize\" >Changing the Height of the Graph using Matplotlib Figsize<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#Changing_the_figsize_of_the_Matplotlib_Subplots\" >Changing the figsize of the Matplotlib Subplots<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#Matplotlib_Figsize_Not_Working_Error\" >Matplotlib Figsize Not Working Error<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#How_to_Set_the_Figure_Size_in_Pixels\" >How to Set the Figure Size in Pixels<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#Must_Read\" >Must Read:<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-what-is-figsize-in-python\"><span class=\"ez-toc-section\" id=\"What_is_Figsize_in_Python\"><\/span>What is Figsize in Python?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><strong>Matplotlib Figsize is a method from the pyplot class which allows you to change the dimensions of the graph. As every dimension in generated graphs is adjusted by the library, it can be quite difficult to visualize data in a proper format. As a result, the figsize method is very useful to customize the dimensions as well as layouts of the graphs.<\/strong><\/p>\n\n\n\n<p>We can make the figure taller in size, broader by changing the size in inches.&nbsp;&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-syntax-of-matplotlib-figsize\"><span class=\"ez-toc-section\" id=\"Syntax_of_Matplotlib_Figsize\"><\/span>Syntax&nbsp;of Matplotlib Figsize<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To make a plot or a graph using matplotlib, we first have to install it in our system using <strong><a href=\"http:\/\/www.pythonpool.com\/pip-vs-pip3\/\" target=\"_blank\" rel=\"noreferrer noopener\"><em>pip<\/em><\/a><em> install matplotlib.&nbsp;<\/em><\/strong><\/p>\n\n\n\n<p>Also,<strong> figsize is an attribute of figure() class of pyplot submodule of matplotlib library<\/strong>. So, the syntax is something like this-&nbsp;<\/p>\n\n\n\n<p><strong><em>matplotlib.pyplot.figure(figsize=(float,float))&nbsp;<\/em><\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-parameters\"><span class=\"ez-toc-section\" id=\"Parameters\"><\/span>Parameters-&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Width<\/strong> \u2013 Here, we have to input the width in inches. The default width is 6. To broaden the plot, set the width greater than 1. And to make the graph less broad, set the width less than 6.&nbsp;<\/li>\n\n\n\n<li><strong>Height <\/strong>\u2013 Here, we have to input the height of the graph. The default value is 4. To increase the length, set the height greater than 4, and to decrease the height set the height less than 4.&nbsp;<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-default-figsize-matplotlib\"><span class=\"ez-toc-section\" id=\"What_is_default_Figsize_Matplotlib\"><\/span>What is default Figsize Matplotlib?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In Matplotlib all the diagrams are created at a default size of 6.4 x 4.8 inches. This size can be changed by using the Figsize method of the respective figure. This parameter is governed under the rcParams attribute of the figure. By using Figsize, you can change both of these values.<\/p>\n\n\n\n<p>The default figure size values are stored as a list of two float objects. For example, rcParams[&#8220;figure.&nbsp;figsize&#8221;] will be equal to [6.4, 4.8] in a programmatic way.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-rcparams-figure-figsize\"><span class=\"ez-toc-section\" id=\"What_is_rcParams_figure_Figsize\"><\/span>What is rcParams figure Figsize?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>rcParams is a dictionary attribute in Matplotlib figure class that allows you to customize the look of your graph. This attribute is responsible for carrying data of figure size, figure DPI, figure facecolor, and figure edgecolor. All of these are initialized to default values of [6.4, 4.8], 100, &#8216;w&#8217;, and &#8216;w&#8217; respectively.<\/p>\n\n\n\n<p>Figsize is a key in rcParams which changes the figure size of your data visualization. As of now, you cannot change the rcParams directly, but you can use different methods like figsize to do it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-are-matplotlib-figsize-units\"><span class=\"ez-toc-section\" id=\"What_are_Matplotlib_Figsize_Units\"><\/span>What are Matplotlib Figsize Units?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Matplotlib have general way of keeping all the distances in inches. For figsize too, the units are measured in inches by default. if you want a to use a different unit for the figsize, you can achieve it by creating a converting function. Following example explains a way to initialize the Figsize in centimeters (cm) &#8211;<\/p>\n\n\n\n<p><strong>Code &#8211;<\/strong><\/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\ndef cm_to_inch(value):\n    return value\/2.54\n\nx = np.arange(0, 10, 0.1)\ny = np.sin(x)\n\nplt.figure(figsize=(cm_to_inch(25), cm_to_inch(15)))\nplt.plot(x, y)\nplt.show()\n<\/pre><\/div>\n\n\n<p><strong>Output &#8211;<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"984\" height=\"590\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/02\/Matplotlib-figsize-output.png\" alt=\"Matplotlib Figsize Output\" class=\"wp-image-9481\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/02\/Matplotlib-figsize-output.png 984w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/02\/Matplotlib-figsize-output-300x180.png 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2021\/02\/Matplotlib-figsize-output-768x460.png 768w\" sizes=\"(max-width: 984px) 100vw, 984px\" \/><\/figure>\n\n\n\n<p><strong>Explanation &#8211;<\/strong><\/p>\n\n\n\n<p>We first start by importing the matplotlib library. Then we create an array of x-axis whose value ranges from 0 to 10 at 0.1 intervals. np.sin() function generates a sine wave function values. The function cm_to_inch() converts all the values of centimeters to inches and initializes the dimensions of the figure.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-changing-the-height-and-width-of-the-graph\"><span class=\"ez-toc-section\" id=\"Changing_the_Height_and_Width_of_the_Graph\"><\/span>Changing the Height and Width of the Graph<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Both height and width can be changed by the figure.figsize() method. Following example demonstrates the figures with default size and after them are the customized figures of different dimensions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-graph-with-default-size\"><span class=\"ez-toc-section\" id=\"Graph_with_Default_Size\"><\/span>Graph with Default Size&nbsp;<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Let us first know how to make a graph without setting any specific size and see if it is our desirable size or not.<\/p>\n\n\n\n<p>We will create a simple plot by<em> creating our own data.&nbsp;<\/em><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport matplotlib.pyplot as plt\nx=&#x5B;1,2,3,4,5,6,7,8,9]\ny=&#x5B;i**2 for i in x]\nplt.plot(x,y)\nplt.title(&quot;Plot of Default Size&quot;)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"368\" height=\"264\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plot1.png\" alt=\"matplotlib figsize\n\" class=\"wp-image-3935\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plot1.png 368w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plot1-300x215.png 300w\" sizes=\"(max-width: 368px) 100vw, 368px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-changing-the-height-using-matplotlib-figsize\"><span class=\"ez-toc-section\" id=\"Changing_the_Height_using_Matplotlib_Figsize\"><\/span>Changing the Height using Matplotlib Figsize<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Suppose we have a<strong> pandas data frame<\/strong> that contains information about some sports and how many people play those sports. Something like this-<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"341\" height=\"231\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/Screenshot-411.png\" alt=\"Changing the Height using Matplotlib Figsize\" class=\"wp-image-3939\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/Screenshot-411.png 341w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/Screenshot-411-300x203.png 300w\" sizes=\"(max-width: 341px) 100vw, 341px\" \/><\/figure>\n\n\n\n<p>We want to make a bar chart from it, let us first make a graph with the default size. I have made that data frame in the form of an array to make the task easy.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n# import the pyplot submodule of matplotlib library\n# and rename it as plt\nimport matplotlib.pyplot as plt\n\n# name of the sports\nsports_name=&#x5B;'Aquatics', 'Athletics', 'Rowing', 'Gymnastics', 'Fencing', 'Football','Hockey', 'Wrestling', 'Shooting', 'Sailing', 'Cycling','Canoe \/ Kayak', 'Basketball', 'Volleyball', 'Equestrian', 'Handball','Boxing', 'Weightlifting', 'Judo', 'Baseball', 'Archery', 'Tennis','Rugby', 'Softball', 'Modern Pentathlon', 'Table Tennis', 'Badminton','Tug of War', 'Taekwondo', 'Polo', 'Lacrosse', 'Golf', 'Ice Hockey','Skating', 'Cricket', 'Triathlon', 'Rackets', 'Croquet','Water Motorsports', 'Basque Pelota', 'Jeu de paume', 'Roque']\n\n# These are people which play the respective sport\npeople_playing_the_sports=&#x5B;3828, 3448, 2523, 2214, 1547, 1387, 1325,140,105,1061,1025,1002,940,910,894,886,842,548,435,335,305,272,192,180,174,120,120,94,80,66,59,30,27,27,24,18,10,8,5,4,3,3]\n\n# To create a bar graph use bar function of pyplot\nplt.bar(sports_name,people_playing_the_sports)\n# Rotate the name of sports by 90 degree in x-axis\nplt.xticks(rotation=90)\n# show the graph \nplt.show()\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"381\" height=\"336\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plot2.png\" alt=\"matplotlib figsize\" class=\"wp-image-3936\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plot2.png 381w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plot2-300x265.png 300w\" sizes=\"(max-width: 381px) 100vw, 381px\" \/><\/figure>\n\n\n\n<p>We can see that due to a lack of space, the graph is too untidy. For a better-looking graph, we need to change the width of the graph. Let us see how we will do that.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport matplotlib.pyplot as plt\npeople_playing_the_sports=&#x5B;3828, 3448, 2523, 2214, 1547, 1387, 1325,1140,105,1061,1025,1002,940,910,894,886,842,548,435,335,305,272,192,180,174,120,120,94,80,66,59,30,27,27,24,18,10,8,5,4,3,3]\n\nsports_name=&#x5B;'Aquatics', 'Athletics', 'Rowing', 'Gymnastics', 'Fencing', 'Football','Hockey', 'Wrestling', 'Shooting', 'Sailing', 'Cycling','Canoe \/ Kayak', 'Basketball', 'Volleyball', 'Equestrian', 'Handball','Boxing', 'Weightlifting', 'Judo', 'Baseball', 'Archery', 'Tennis','Rugby', 'Softball', 'Modern Pentathlon', 'Table Tennis', 'Badminton','Tug of War', 'Taekwondo', 'Polo', 'Lacrosse', 'Golf', 'Ice Hockey',\n'Skating', 'Cricket', 'Triathlon', 'Rackets', 'Croquet',\n'Water Motorsports', 'Basque Pelota', 'Jeu de paume', 'Roque']\n\n# Increase the width\nplt.figure(figsize=(15,4))\nplt.bar(Sports,people_playing_the_sports)\nplt.xticks(rotation=90)\nplt.show()\n<\/pre><\/div>\n\n\n<p>Isn&#8217;t it a lot better now? Just changing the size of the graph has made such a huge impact and now we can understand the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Graph\" target=\"_blank\" rel=\"noreferrer noopener\">graph<\/a> a lot better.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"883\" height=\"336\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plot3.png\" alt=\"matplotlib figsize\" class=\"wp-image-3937\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plot3.png 883w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plot3-300x114.png 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plot3-768x292.png 768w\" sizes=\"(max-width: 883px) 100vw, 883px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-changing-the-height-of-the-graph-using-matplotlib-figsize\"><span class=\"ez-toc-section\" id=\"Changing_the_Height_of_the_Graph_using_Matplotlib_Figsize\"><\/span>Changing the Height of the Graph using Matplotlib Figsize<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Suppose we have created the same bar chart horizontally, the default height would look untidy, right? Let us see how we can increase the height of the graph.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport matplotlib.pyplot as plt\n\npeople_playing_the_sports=&#x5B;3828, 3448, 2523, 2214, 1547, 1387, 1325,1140,1105,1061,1025,1002,940,910,894,886,842,548,435,335,305,272,192,180,174,120,120,94,80,66,59,30,27,\n27,24,18,10,8,5,4,3,3]\n\nsports_name=&#x5B;'Aquatics', 'Athletics', 'Rowing', 'Gymnastics', 'Fencing', 'Football','Hockey', 'Wrestling', 'Shooting', 'Sailing', 'Cycling','Canoe \/ Kayak', 'Basketball', 'Volleyball', 'Equestrian', 'Handball','Boxing', 'Weightlifting', 'Judo', 'Baseball', 'Archery', 'Tennis','Rugby', 'Softball', 'Modern Pentathlon', 'Table Tennis', 'Badminton','Tug of War', 'Taekwondo', 'Polo', 'Lacrosse', 'Golf', 'Ice Hockey',\n'Skating', 'Cricket', 'Triathlon', 'Rackets', 'Croquet',\n'Water Motorsports', 'Basque Pelota', 'Jeu de paume', 'Roque']\n\n# Increase the width and the height\nplt.figure(figsize=(15,10))\nplt.barh(Sports,people_playing_the_sports)\nplt.xticks(rotation=90)\nplt.show()\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"953\" height=\"590\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plot4.png\" alt=\"matplotlib figsize\" class=\"wp-image-3938\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plot4.png 953w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plot4-300x186.png 300w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plot4-768x475.png 768w\" sizes=\"(max-width: 953px) 100vw, 953px\" \/><\/figure>\n\n\n\n<p><strong>Explanation &#8211;<\/strong><\/p>\n\n\n\n<p>Firstly, we start by importing the matplotlib library. then we declared the players playing the sports and sports name in the list. Then by initializing the matplotlib figure by using a parameter of figsize, we can create a bigger-sized output. In our case, we&#8217;ve initialized it to 15 x 10 inches. As you can observe from the output, the data is widely spaced and it&#8217;s larger than the default dimensions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-changing-the-figsize-of-the-matplotlib-subplots\"><span class=\"ez-toc-section\" id=\"Changing_the_figsize_of_the_Matplotlib_Subplots\"><\/span>Changing the figsize of the Matplotlib Subplots<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>We can also create subplots using matplotlib. In subplots, we create multiple subplots in a single figure. The more the number of subplots in a figure, the size of the subplot keeps changing. We can change the size of the figure and whatever size we give will be divided into subplots.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport matplotlib.pyplot as plt\n# make subplots with 2 rows and 1 column.\n# We If there were 3 rows, we would have done-fig, (ax1,ax2,ax3)\nfig, (ax1,ax2) = plt.subplots(nrows=2,ncols=1,figsize=(6,8))\ny=&#x5B;i*i for i in range(10)]\n#plotting for 1st subplot\nax1.plot(range(10),y)\n#plotting for 2nd subplot\nax2.bar(range(10),y)\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"368\" height=\"466\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/subplot.png\" alt=\"Changing the figsize of the Matplotlib Subplots\" class=\"wp-image-3952\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/subplot.png 368w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/subplot-237x300.png 237w\" sizes=\"(max-width: 368px) 100vw, 368px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-matplotlib-figsize-not-working-error\"><span class=\"ez-toc-section\" id=\"Matplotlib_Figsize_Not_Working_Error\"><\/span>Matplotlib Figsize Not Working Error<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Sometimes, we may get an error- &#8216;matplotlib figsize not working&#8217;. This happens when we first plot the graph and then set the figsize. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport matplotlib.pyplot as plt\ntechnologies=&#x5B;'Data Science', 'Cyber Security', 'Web Development', 'Android Development', 'Data Analyst'] \nnumber_of_students=&#x5B;78,49,112,129,59]\n\n# Wrong way-\nplt.bar(technologies,number_of_students)\nplt.figure(figsize=(10,5))\nplt.xticks(rotation=90)\nplt.show()\n\n\n# Correct way\nplt.figure(figsize=(10,5))\nplt.bar(technologies,number_of_students)\nplt.xticks(rotation=90)\nplt.show()\n<\/pre><\/div>\n\n\n<p>This is the common mistake that new programmers can do in using this method. Always remember that you can only set the figsize before the initialization of the graph. If the graph is already initialized, you cannot change the dimensions of the figure. Make sure that you place plt.figure() before your plt.bar() to avoid this error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-set-the-figure-size-in-pixels\"><span class=\"ez-toc-section\" id=\"How_to_Set_the_Figure_Size_in_Pixels\"><\/span>How to Set the Figure Size in Pixels<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>We can also set the figure size of the graph or chart according to the monitor, we can use dpi of our monitor to do so. You can detect the dpi of your monitor by search on the internet. There are multiple tools to do so.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n# the dpi of my monitor is 120\nmy_dpi=120\n# make a figure with the follwing figsize\nplt.figure(figsize=(400\/my_dpi, 300\/my_dpi), dpi=my_dpi)\nplt.bar(&#x5B;1,2,3,4,5],&#x5B;5,4,3,2,1],align=&quot;center&quot;)\nplt.show()\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"356\" height=\"277\" src=\"http:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plotwithdpi.png\" alt=\"Set the Figure Size in Pixels\" class=\"wp-image-3953\" srcset=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plotwithdpi.png 356w, https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/plotwithdpi-300x233.png 300w\" sizes=\"(max-width: 356px) 100vw, 356px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading has-vivid-red-color has-text-color\" id=\"h-must-read\"><span class=\"ez-toc-section\" id=\"Must_Read\"><\/span>Must Read:<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"http:\/\/www.pythonpool.com\/python-lowercase\/\">How to Convert String to Lowercase in<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.pythonpool.com\/square-root-in-python\/\">How to Calculate Square Root<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.pythonpool.com\/python-user-input\/\">User Input | Input () Function | Keyboard Input<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/www.pythonpool.com\/python-book\/\">Best Book to Learn Python<\/a><\/li>\n<\/ul>\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>We have seen that how changing the width and height can result in making the graph a lot better to understand and create insights. We can do this using the <strong>matplotlib figsize<\/strong> attribute of figure() function of the matplotlib library.<\/p>\n\n\n\n<p>Try to run the programs on your side and let us know if you have any queries.<\/p>\n\n\n\n<p><strong><em>Happy Coding!<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Have you recently started working on graphs and plots using the matplotlib library and don\u2019t know how to change the size of the figures according &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Matplotlib Figsize | Change the Size of Graph using Figsize\" class=\"read-more button\" href=\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#more-3934\" aria-label=\"More on Matplotlib Figsize | Change the Size of Graph using Figsize\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":3963,"comment_status":"open","ping_status":"open","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":[2129,2145,2137,2136,2143,2128,2141,2140,2133,2127,2139,2131,2144,2134,2135,2130,2132,2138,2142],"class_list":["post-3934","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-matplotlib","tag-change-figsize-matplotlib","tag-default-figsize-matplotlib","tag-figsize-in-matplotlib","tag-figsize-matplotlib","tag-figsize-matplotlib-pixels","tag-jupyter-notebook-matplotlib-what-doew-figsize-mean","tag-matplotlib-fig-figsize","tag-matplotlib-figsize","tag-matplotlib-figsize-fonts-scaling-compressed-y-label-text-axis","tag-matplotlib-figsize-fullscreen","tag-matplotlib-figsize-gisaspect","tag-matplotlib-figsize-units","tag-matplotlib-plot-barh-figsize","tag-matplotlib-rcparams-figsize","tag-matplotlib-scatter-plot-figsize","tag-matplotlib-subplot-figsize","tag-matplotlib-subplots-figsize","tag-plt-plot-figsize-matplotlib","tag-python-matplotlib-subplots-figsize","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 Figsize | Change the Size of Graph using Figsize - Python Pool<\/title>\n<meta name=\"description\" content=\"To change the size of the plot or the graph we can use the matplotlib figsize attribute of matplotlib.pyplot.figure function.\" \/>\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-figsize\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Matplotlib Figsize | Change the Size of Graph using Figsize\" \/>\n<meta property=\"og:description\" content=\"Have you recently started working on graphs and plots using the matplotlib library and don\u2019t know how to change the size of the figures according to your\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/\" \/>\n<meta property=\"og:site_name\" content=\"Python Pool\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-24T09:48:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-01T09:15:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/Theatre-Actor-Portfolio-Website-4.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=\"Ashwini Mandani\" \/>\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=\"Ashwini Mandani\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/\"},\"author\":{\"name\":\"Ashwini Mandani\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/8a75fb48eb1f3dc952df65a8c28ac056\"},\"headline\":\"Matplotlib Figsize | Change the Size of Graph using Figsize\",\"datePublished\":\"2020-08-24T09:48:32+00:00\",\"dateModified\":\"2024-01-01T09:15:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/\"},\"wordCount\":1227,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.pythonpool.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/Theatre-Actor-Portfolio-Website-4.png\",\"keywords\":[\"change figsize matplotlib\",\"default figsize matplotlib\",\"figsize in matplotlib\",\"figsize matplotlib\",\"figsize matplotlib pixels\",\"jupyter notebook matplotlib what doew figsize mean\",\"matplotlib fig figsize\",\"matplotlib figsize\",\"matplotlib figsize fonts scaling compressed y label text axis\",\"matplotlib figsize fullscreen\",\"matplotlib figsize gisaspect\",\"matplotlib figsize units\",\"matplotlib plot barh figsize\",\"matplotlib rcparams figsize\",\"matplotlib scatter plot figsize\",\"matplotlib subplot figsize\",\"matplotlib subplots figsize\",\"plt.plot figsize matplotlib\",\"python matplotlib subplots &quot;figsize&quot;\"],\"articleSection\":[\"Matplotlib\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/\",\"url\":\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/\",\"name\":\"Matplotlib Figsize | Change the Size of Graph using Figsize - Python Pool\",\"isPartOf\":{\"@id\":\"https:\/\/www.pythonpool.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/Theatre-Actor-Portfolio-Website-4.png\",\"datePublished\":\"2020-08-24T09:48:32+00:00\",\"dateModified\":\"2024-01-01T09:15:10+00:00\",\"description\":\"To change the size of the plot or the graph we can use the matplotlib figsize attribute of matplotlib.pyplot.figure function.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#primaryimage\",\"url\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/Theatre-Actor-Portfolio-Website-4.png\",\"contentUrl\":\"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/Theatre-Actor-Portfolio-Website-4.png\",\"width\":1350,\"height\":650,\"caption\":\"matplotlib figsize\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.pythonpool.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Matplotlib Figsize | Change the Size of Graph using Figsize\"}]},{\"@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\/8a75fb48eb1f3dc952df65a8c28ac056\",\"name\":\"Ashwini Mandani\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g\",\"caption\":\"Ashwini Mandani\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Matplotlib Figsize | Change the Size of Graph using Figsize - Python Pool","description":"To change the size of the plot or the graph we can use the matplotlib figsize attribute of matplotlib.pyplot.figure function.","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-figsize\/","og_locale":"en_US","og_type":"article","og_title":"Matplotlib Figsize | Change the Size of Graph using Figsize","og_description":"Have you recently started working on graphs and plots using the matplotlib library and don\u2019t know how to change the size of the figures according to your","og_url":"https:\/\/www.pythonpool.com\/matplotlib-figsize\/","og_site_name":"Python Pool","article_published_time":"2020-08-24T09:48:32+00:00","article_modified_time":"2024-01-01T09:15:10+00:00","og_image":[{"width":1350,"height":650,"url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/Theatre-Actor-Portfolio-Website-4.png","type":"image\/png"}],"author":"Ashwini Mandani","twitter_card":"summary_large_image","twitter_creator":"@pythonpool","twitter_site":"@pythonpool","twitter_misc":{"Written by":"Ashwini Mandani","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#article","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/matplotlib-figsize\/"},"author":{"name":"Ashwini Mandani","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/8a75fb48eb1f3dc952df65a8c28ac056"},"headline":"Matplotlib Figsize | Change the Size of Graph using Figsize","datePublished":"2020-08-24T09:48:32+00:00","dateModified":"2024-01-01T09:15:10+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pythonpool.com\/matplotlib-figsize\/"},"wordCount":1227,"commentCount":1,"publisher":{"@id":"https:\/\/www.pythonpool.com\/#organization"},"image":{"@id":"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/Theatre-Actor-Portfolio-Website-4.png","keywords":["change figsize matplotlib","default figsize matplotlib","figsize in matplotlib","figsize matplotlib","figsize matplotlib pixels","jupyter notebook matplotlib what doew figsize mean","matplotlib fig figsize","matplotlib figsize","matplotlib figsize fonts scaling compressed y label text axis","matplotlib figsize fullscreen","matplotlib figsize gisaspect","matplotlib figsize units","matplotlib plot barh figsize","matplotlib rcparams figsize","matplotlib scatter plot figsize","matplotlib subplot figsize","matplotlib subplots figsize","plt.plot figsize matplotlib","python matplotlib subplots &quot;figsize&quot;"],"articleSection":["Matplotlib"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pythonpool.com\/matplotlib-figsize\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pythonpool.com\/matplotlib-figsize\/","url":"https:\/\/www.pythonpool.com\/matplotlib-figsize\/","name":"Matplotlib Figsize | Change the Size of Graph using Figsize - Python Pool","isPartOf":{"@id":"https:\/\/www.pythonpool.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#primaryimage"},"image":{"@id":"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/Theatre-Actor-Portfolio-Website-4.png","datePublished":"2020-08-24T09:48:32+00:00","dateModified":"2024-01-01T09:15:10+00:00","description":"To change the size of the plot or the graph we can use the matplotlib figsize attribute of matplotlib.pyplot.figure function.","breadcrumb":{"@id":"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pythonpool.com\/matplotlib-figsize\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#primaryimage","url":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/Theatre-Actor-Portfolio-Website-4.png","contentUrl":"https:\/\/www.pythonpool.com\/wp-content\/uploads\/2020\/08\/Theatre-Actor-Portfolio-Website-4.png","width":1350,"height":650,"caption":"matplotlib figsize"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pythonpool.com\/matplotlib-figsize\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pythonpool.com\/"},{"@type":"ListItem","position":2,"name":"Matplotlib Figsize | Change the Size of Graph using Figsize"}]},{"@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\/8a75fb48eb1f3dc952df65a8c28ac056","name":"Ashwini Mandani","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pythonpool.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f765ed1940ac0ae1d30ce4cb2f1452c1e83143b07354d25a42c1cd118980e269?s=96&d=wavatar&r=g","caption":"Ashwini Mandani"}}]}},"_links":{"self":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/3934","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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/comments?post=3934"}],"version-history":[{"count":11,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/3934\/revisions"}],"predecessor-version":[{"id":31551,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/posts\/3934\/revisions\/31551"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media\/3963"}],"wp:attachment":[{"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/media?parent=3934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/categories?post=3934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pythonpool.com\/wp-json\/wp\/v2\/tags?post=3934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}