{"id":1918,"date":"2023-07-24T11:04:47","date_gmt":"2023-07-24T11:04:47","guid":{"rendered":"https:\/\/statorials.org\/de\/matplotlib-subplotgrosse\/"},"modified":"2023-07-24T11:04:47","modified_gmt":"2023-07-24T11:04:47","slug":"matplotlib-subplotgrosse","status":"publish","type":"post","link":"https:\/\/statorials.org\/de\/matplotlib-subplotgrosse\/","title":{"rendered":"So passen sie die unterplotgr\u00f6\u00dfe in matplotlib an"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">Sie k\u00f6nnen die folgende Syntax verwenden, um die Gr\u00f6\u00dfe von Unterplots in Matplotlib anzupassen:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#specify one size for all subplots\n<\/span>fig, ax = plt. <span style=\"color: #3366ff;\">subplots<\/span> (2, 2, figsize=(10,7))\n\n<span style=\"color: #008080;\">#specify individual sizes for subplots\n<\/span>fig, ax = plt. <span style=\"color: #3366ff;\">subplots<\/span> (1, 2, gridspec_kw={' <span style=\"color: #ff0000;\">width_ratios<\/span> ': [3, 1]})\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Die folgenden Beispiele zeigen, wie Sie diese Syntax in der Praxis anwenden k\u00f6nnen.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Beispiel 1: Geben Sie eine Gr\u00f6\u00dfe f\u00fcr alle Unterplots an<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Der folgende Code zeigt, wie man eine Gr\u00f6\u00dfe f\u00fcr alle Unterplots angibt:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #008000;\">as<\/span> plt\n\n<span style=\"color: #008080;\">#define subplots\n<\/span>fig, ax = plt. <span style=\"color: #3366ff;\">subplots<\/span> (2, 2, figsize=(10,7))\nfig. <span style=\"color: #3366ff;\">tight_layout<\/span> ()\n\n<span style=\"color: #008080;\">#define data\n<\/span>x = [1, 2, 3]\ny = [7, 13, 24]\n\n<span style=\"color: #008080;\">#create subplots\n<\/span>ax[0, 0]. <span style=\"color: #3366ff;\">plot<\/span> (x,y,color=' <span style=\"color: #ff0000;\">red<\/span> ')\nax[0, 1]. <span style=\"color: #3366ff;\">plot<\/span> (x,y,color=' <span style=\"color: #ff0000;\">blue<\/span> ')\nax[1, 0]. <span style=\"color: #3366ff;\">plot<\/span> (x,y,color=' <span style=\"color: #ff0000;\">green<\/span> ')\nax[1, 1]. <span style=\"color: #3366ff;\">plot<\/span> (x,y,color=' <span style=\"color: #ff0000;\">purple<\/span> ')<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-18329 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/sous-intrigue1.png\" alt=\"\" width=\"670\" height=\"466\" srcset=\"\" sizes=\"\"><\/p>\n<p> <span style=\"color: #000000;\">Wir k\u00f6nnen die Gr\u00f6\u00dfe der Subtraces leicht \u00e4ndern, indem wir die Werte des Arguments <strong>figsize<\/strong> \u00e4ndern:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #008000;\">as<\/span> plt\n\n<span style=\"color: #008080;\">#define subplots\n<\/span>fig, ax = plt. <span style=\"color: #3366ff;\">subplots<\/span> (2, 2, figsize=(5,5))\nfig. <span style=\"color: #3366ff;\">tight_layout<\/span> ()\n\n<span style=\"color: #008080;\">#define data\n<\/span>x = [1, 2, 3]\ny = [7, 13, 24]\n\n<span style=\"color: #008080;\">#create subplots\n<\/span>ax[0, 0]. <span style=\"color: #3366ff;\">plot<\/span> (x,y,color=' <span style=\"color: #ff0000;\">red<\/span> ')\nax[0, 1]. <span style=\"color: #3366ff;\">plot<\/span> (x,y,color=' <span style=\"color: #ff0000;\">blue<\/span> ')\nax[1, 0]. <span style=\"color: #3366ff;\">plot<\/span> (x,y,color=' <span style=\"color: #ff0000;\">green<\/span> ')\nax[1, 1]. <span style=\"color: #3366ff;\">plot<\/span> (x,y,color=' <span style=\"color: #ff0000;\">purple<\/span> ')<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-18330 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/sous-intrigue2.png\" alt=\"\" width=\"306\" height=\"310\" srcset=\"\" sizes=\"\"><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Beispiel 2: Geben Sie die Gr\u00f6\u00dfe der<\/strong><\/span> <span style=\"color: #000000;\"><strong>einzelnen<\/strong><\/span> <span style=\"color: #000000;\"><strong>Unterplots<\/strong><\/span> an<\/h3>\n<p> <span style=\"color: #000000;\">Der folgende Code zeigt, wie unterschiedliche Gr\u00f6\u00dfen f\u00fcr einzelne Unterplots angegeben werden:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #008000;\">as<\/span> plt\n\n<span style=\"color: #008080;\">#define subplots\n<\/span>fig, ax = plt. <span style=\"color: #3366ff;\">subplots<\/span> (1, 2, gridspec_kw={' <span style=\"color: #ff0000;\">width_ratios<\/span> ': [3, 1]})\nfig. <span style=\"color: #3366ff;\">tight_layout<\/span> ()\n\n<span style=\"color: #008080;\">#define data\n<\/span>x = [1, 2, 3]\ny = [7, 13, 24]\n\n<span style=\"color: #008080;\">#create subplots\n<\/span>ax[0]. <span style=\"color: #3366ff;\">plot<\/span> (x,y,color=' <span style=\"color: #ff0000;\">red<\/span> ')\nax[1]. <span style=\"color: #3366ff;\">plot<\/span> (x,y,color=' <span style=\"color: #ff0000;\">blue<\/span> ')<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-18333 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/sous-intrigue3.png\" alt=\"\" width=\"643\" height=\"387\" srcset=\"\" sizes=\"\"><\/p>\n<p> <span style=\"color: #000000;\">Wir k\u00f6nnen die Gr\u00f6\u00dfe der Subtraces leicht \u00e4ndern, indem wir die Werte im Argument <strong>width_ratios<\/strong> \u00e4ndern:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #008000;\">as<\/span> plt\n\n<span style=\"color: #008080;\">#define subplots\n<\/span>fig, ax = plt. <span style=\"color: #3366ff;\">subplots<\/span> (1, 2, gridspec_kw={' <span style=\"color: #ff0000;\">width_ratios<\/span> ': [1, 3]})\nfig. <span style=\"color: #3366ff;\">tight_layout<\/span> ()\n\n<span style=\"color: #008080;\">#define data\n<\/span>x = [1, 2, 3]\ny = [7, 13, 24]\n\n<span style=\"color: #008080;\">#create subplots\n<\/span>ax[0]. <span style=\"color: #3366ff;\">plot<\/span> (x,y,color=' <span style=\"color: #ff0000;\">red<\/span> ')\nax[1]. <span style=\"color: #3366ff;\">plot<\/span> (x,y,color=' <span style=\"color: #ff0000;\">blue<\/span> ')<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-18334 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/sous-intrigue4.png\" alt=\"\" width=\"647\" height=\"380\" srcset=\"\" sizes=\"\"><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Zus\u00e4tzliche Ressourcen<\/strong><\/span><\/h3>\n<p> <a href=\"https:\/\/statorials.org\/de\/matplotlib-titel-hinzufugen\/\" target=\"_blank\" rel=\"noopener\">So f\u00fcgen Sie Plots in Matplotlib Titel hinzu<\/a><br \/> <a href=\"https:\/\/statorials.org\/de\/matplotlib-legt-den-achsenbereich-fest\/\" target=\"_blank\" rel=\"noopener\">So legen Sie Achsenbereiche in Matplotlib fest<\/a><br \/> <a href=\"https:\/\/statorials.org\/de\/setze-die-x-achsenwerte-matplotlib\/\" target=\"_blank\" rel=\"noopener\">So legen Sie X-Achsenwerte in Matplotlib fest<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sie k\u00f6nnen die folgende Syntax verwenden, um die Gr\u00f6\u00dfe von Unterplots in Matplotlib anzupassen: #specify one size for all subplots fig, ax = plt. subplots (2, 2, figsize=(10,7)) #specify individual sizes for subplots fig, ax = plt. subplots (1, 2, gridspec_kw={&#8218; width_ratios &#8218;: [3, 1]}) Die folgenden Beispiele zeigen, wie Sie diese Syntax in der [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>So passen Sie die Unterplotgr\u00f6\u00dfe in Matplotlib \u2013 Statorials an<\/title>\n<meta name=\"description\" content=\"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Sie die Gr\u00f6\u00dfe von Unterplots in Matplotlib anpassen.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/statorials.org\/de\/matplotlib-subplotgrosse\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"So passen Sie die Unterplotgr\u00f6\u00dfe in Matplotlib \u2013 Statorials an\" \/>\n<meta property=\"og:description\" content=\"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Sie die Gr\u00f6\u00dfe von Unterplots in Matplotlib anpassen.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/de\/matplotlib-subplotgrosse\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-24T11:04:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/sous-intrigue1.png\" \/>\n<meta name=\"author\" content=\"Dr. Benjamin Anderson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dr. Benjamin Anderson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/de\/matplotlib-subplotgrosse\/\",\"url\":\"https:\/\/statorials.org\/de\/matplotlib-subplotgrosse\/\",\"name\":\"So passen Sie die Unterplotgr\u00f6\u00dfe in Matplotlib \u2013 Statorials an\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/de\/#website\"},\"datePublished\":\"2023-07-24T11:04:47+00:00\",\"dateModified\":\"2023-07-24T11:04:47+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0\"},\"description\":\"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Sie die Gr\u00f6\u00dfe von Unterplots in Matplotlib anpassen.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/de\/matplotlib-subplotgrosse\/#breadcrumb\"},\"inLanguage\":\"de-DE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/de\/matplotlib-subplotgrosse\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/de\/matplotlib-subplotgrosse\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Heim\",\"item\":\"https:\/\/statorials.org\/de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"So passen sie die unterplotgr\u00f6\u00dfe in matplotlib an\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/de\/#website\",\"url\":\"https:\/\/statorials.org\/de\/\",\"name\":\"Statorials\",\"description\":\"Ihr Leitfaden f\u00fcr statistische Kompetenz !\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/de\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"de-DE\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0\",\"name\":\"Dr. Benjamin Anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de-DE\",\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg\",\"caption\":\"Dr. Benjamin Anderson\"},\"description\":\"Hallo, ich bin Benjamin, ein pensionierter Statistikprofessor, der sich zum engagierten Statorials-Lehrer entwickelt hat. Mit umfassender Erfahrung und Fachwissen auf dem Gebiet der Statistik bin ich bestrebt, mein Wissen zu teilen, um Studenten durch Statorials zu bef\u00e4higen. Mehr wissen\",\"sameAs\":[\"https:\/\/statorials.org\/de\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"So passen Sie die Unterplotgr\u00f6\u00dfe in Matplotlib \u2013 Statorials an","description":"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Sie die Gr\u00f6\u00dfe von Unterplots in Matplotlib anpassen.","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:\/\/statorials.org\/de\/matplotlib-subplotgrosse\/","og_locale":"de_DE","og_type":"article","og_title":"So passen Sie die Unterplotgr\u00f6\u00dfe in Matplotlib \u2013 Statorials an","og_description":"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Sie die Gr\u00f6\u00dfe von Unterplots in Matplotlib anpassen.","og_url":"https:\/\/statorials.org\/de\/matplotlib-subplotgrosse\/","og_site_name":"Statorials","article_published_time":"2023-07-24T11:04:47+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/sous-intrigue1.png"}],"author":"Dr. Benjamin Anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr. Benjamin Anderson","Gesch\u00e4tzte Lesezeit":"2 Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/de\/matplotlib-subplotgrosse\/","url":"https:\/\/statorials.org\/de\/matplotlib-subplotgrosse\/","name":"So passen Sie die Unterplotgr\u00f6\u00dfe in Matplotlib \u2013 Statorials an","isPartOf":{"@id":"https:\/\/statorials.org\/de\/#website"},"datePublished":"2023-07-24T11:04:47+00:00","dateModified":"2023-07-24T11:04:47+00:00","author":{"@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0"},"description":"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Sie die Gr\u00f6\u00dfe von Unterplots in Matplotlib anpassen.","breadcrumb":{"@id":"https:\/\/statorials.org\/de\/matplotlib-subplotgrosse\/#breadcrumb"},"inLanguage":"de-DE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/de\/matplotlib-subplotgrosse\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/de\/matplotlib-subplotgrosse\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Heim","item":"https:\/\/statorials.org\/de\/"},{"@type":"ListItem","position":2,"name":"So passen sie die unterplotgr\u00f6\u00dfe in matplotlib an"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/de\/#website","url":"https:\/\/statorials.org\/de\/","name":"Statorials","description":"Ihr Leitfaden f\u00fcr statistische Kompetenz !","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/de\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"de-DE"},{"@type":"Person","@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0","name":"Dr. Benjamin Anderson","image":{"@type":"ImageObject","inLanguage":"de-DE","@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg","caption":"Dr. Benjamin Anderson"},"description":"Hallo, ich bin Benjamin, ein pensionierter Statistikprofessor, der sich zum engagierten Statorials-Lehrer entwickelt hat. Mit umfassender Erfahrung und Fachwissen auf dem Gebiet der Statistik bin ich bestrebt, mein Wissen zu teilen, um Studenten durch Statorials zu bef\u00e4higen. Mehr wissen","sameAs":["https:\/\/statorials.org\/de"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts\/1918"}],"collection":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/comments?post=1918"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts\/1918\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/media?parent=1918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/categories?post=1918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/tags?post=1918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}