{"id":1784,"date":"2023-07-25T00:17:50","date_gmt":"2023-07-25T00:17:50","guid":{"rendered":"https:\/\/statorials.org\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/"},"modified":"2023-07-25T00:17:50","modified_gmt":"2023-07-25T00:17:50","slug":"matplotlib-aumenta-o-tamanho-do-rastreamento","status":"publish","type":"post","link":"https:\/\/statorials.org\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/","title":{"rendered":"Como aumentar o tamanho do gr\u00e1fico no matplotlib"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">Voc\u00ea pode usar a seguinte sintaxe para aumentar o tamanho de um \u00fanico gr\u00e1fico no Matplotlib:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #107d3f;\">as<\/span> plt\n\n<span style=\"color: #008080;\">#define figure size in (width, height) for a single plot<\/span>\nplt. <span style=\"color: #3366ff;\">figure<\/span> (figsize=(3,3))\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">E voc\u00ea pode usar a seguinte sintaxe para aumentar o tamanho de <em>todos os<\/em> gr\u00e1ficos Matplotlib em um notebook:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #107d3f;\">as<\/span> plt\n\n<span style=\"color: #008080;\">#define figure size in (width, height) for all plots<\/span>\nplt. <span style=\"color: #3366ff;\">rcParams<\/span> [' <span style=\"color: #ff0000;\">figure.figsize<\/span> '] = [10, 7]\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Os exemplos a seguir mostram como usar essa sintaxe na pr\u00e1tica.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Exemplo 1: Aumentar o tamanho de um \u00fanico gr\u00e1fico Matplotlib<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Suponha que criemos o seguinte gr\u00e1fico de linhas no Matplotlib:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #107d3f;\">as<\/span> plt\n\n<span style=\"color: #008080;\">#define x and y\n<\/span>x = [1, 6, 10]\ny = [5, 13, 27]\n\n<span style=\"color: #008080;\">#create plot of x and y\n<\/span>plt. <span style=\"color: #3366ff;\">plot<\/span> (x, y)\nplt. <span style=\"color: #3366ff;\">show<\/span> ()<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-17379 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/taille-du-trace1.png\" alt=\"\" width=\"397\" height=\"268\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Por padr\u00e3o, a (largura, altura) de um gr\u00e1fico Matplotlib \u00e9 (6,4, 4,8).<\/span><\/p>\n<p> <span style=\"color: #000000;\">No entanto, podemos usar a seguinte sintaxe para aumentar o tamanho do gr\u00e1fico para as dimens\u00f5es desejadas:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #107d3f;\">as<\/span> plt\n\n<span style=\"color: #008080;\">#define plot size<\/span>\nplt. <span style=\"color: #3366ff;\">figure<\/span> (figsize=(5,8))\n\n<span style=\"color: #008080;\">#define x and y\n<\/span>x = [1, 6, 10]\ny = [5, 13, 27]\n\n<span style=\"color: #008080;\">#create plot of x and y\n<\/span>plt. <span style=\"color: #3366ff;\">plot<\/span> (x, y)\nplt. <span style=\"color: #3366ff;\">show<\/span> ()<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-17380 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/taille-du-trace2.png\" alt=\"\" width=\"313\" height=\"456\" srcset=\"\" sizes=\"auto, \"><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Exemplo 2: Aumente o tamanho de todos os gr\u00e1ficos Matplotlib<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">O c\u00f3digo a seguir mostra como definir o tamanho do gr\u00e1fico para <em>todos<\/em> os gr\u00e1ficos Matplotlib em um notebook:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #107d3f;\">as<\/span> plt\n\n<span style=\"color: #008080;\">#define plot size for all plots<\/span>\nplt. <span style=\"color: #3366ff;\">rcParams<\/span> [' <span style=\"color: #ff0000;\">figure.figsize<\/span> '] = [10, 4]\n<span style=\"color: #008080;\">\n#define first dataset\n<\/span>x = [1, 6, 10]\ny = [5, 13, 27]\n\n<span style=\"color: #008080;\">#create first plot\n<\/span>plt. <span style=\"color: #3366ff;\">plot<\/span> (x, y)\nplt. <span style=\"color: #3366ff;\">show<\/span> ()\n\n<span style=\"color: #008080;\">#define second dataset\n<\/span>x2 = [1, 6, 10]\ny2 = [5, 19, 12]\n\n<span style=\"color: #008080;\">#create second plot\n<\/span>plt. <span style=\"color: #3366ff;\">plot<\/span> (x2, y2)\nplt. <span style=\"color: #3366ff;\">show<\/span> ()<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-17382 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/taille-du-trace3.png\" alt=\"\" width=\"576\" height=\"486\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Observe que ambos os gr\u00e1ficos t\u00eam largura e altura especificadas pelos argumentos <strong>rcParams<\/strong> .<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Recursos adicionais<\/strong><\/span><\/h3>\n<p> <a href=\"https:\/\/statorials.org\/pt\/tamanho-do-marcador-matplotlib\/\" target=\"_blank\" rel=\"noopener\">Como ajustar o tamanho do marcador no Matplotlib<\/a><br \/> <a href=\"https:\/\/statorials.org\/pt\/alterar-o-tamanho-da-fonte-matplotlib\/\" target=\"_blank\" rel=\"noopener\">Como alterar o tamanho da fonte no Matplotlib<\/a><br \/> <a href=\"https:\/\/statorials.org\/pt\/espessura-da-linha-matplotlib\/\" target=\"_blank\" rel=\"noopener\">Como ajustar a espessura da linha no Matplotlib<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Voc\u00ea pode usar a seguinte sintaxe para aumentar o tamanho de um \u00fanico gr\u00e1fico no Matplotlib: import matplotlib. pyplot as plt #define figure size in (width, height) for a single plot plt. figure (figsize=(3,3)) E voc\u00ea pode usar a seguinte sintaxe para aumentar o tamanho de todos os gr\u00e1ficos Matplotlib em um notebook: import matplotlib. [&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":[],"class_list":["post-1784","post","type-post","status-publish","format-standard","hentry","category-guia"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Como aumentar o tamanho do gr\u00e1fico no Matplotlib \u2013 Estatologia<\/title>\n<meta name=\"description\" content=\"Este tutorial explica como aumentar o tamanho do gr\u00e1fico no Matplotlib, com v\u00e1rios exemplos.\" \/>\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\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/\" \/>\n<meta property=\"og:locale\" content=\"pt_PT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Como aumentar o tamanho do gr\u00e1fico no Matplotlib \u2013 Estatologia\" \/>\n<meta property=\"og:description\" content=\"Este tutorial explica como aumentar o tamanho do gr\u00e1fico no Matplotlib, com v\u00e1rios exemplos.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-25T00:17:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/taille-du-trace1.png\" \/>\n<meta name=\"author\" content=\"Dr. benjamim anderson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dr. benjamim anderson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tempo estimado de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/\",\"url\":\"https:\/\/statorials.org\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/\",\"name\":\"Como aumentar o tamanho do gr\u00e1fico no Matplotlib \u2013 Estatologia\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/pt\/#website\"},\"datePublished\":\"2023-07-25T00:17:50+00:00\",\"dateModified\":\"2023-07-25T00:17:50+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666\"},\"description\":\"Este tutorial explica como aumentar o tamanho do gr\u00e1fico no Matplotlib, com v\u00e1rios exemplos.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/#breadcrumb\"},\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Lar\",\"item\":\"https:\/\/statorials.org\/pt\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Como aumentar o tamanho do gr\u00e1fico no matplotlib\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/pt\/#website\",\"url\":\"https:\/\/statorials.org\/pt\/\",\"name\":\"Statorials\",\"description\":\"O seu guia para a literacia estat\u00edstica!\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/pt\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"pt-PT\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666\",\"name\":\"Dr. benjamim anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-PT\",\"@id\":\"https:\/\/statorials.org\/pt\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/pt\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/pt\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"Dr. benjamim anderson\"},\"description\":\"Ol\u00e1, sou Benjamin, um professor aposentado de estat\u00edstica que se tornou professor dedicado na Statorials. Com vasta experi\u00eancia e conhecimento na \u00e1rea de estat\u00edstica, estou empenhado em compartilhar meu conhecimento para capacitar os alunos por meio de Statorials. Saber mais\",\"sameAs\":[\"https:\/\/statorials.org\/pt\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Como aumentar o tamanho do gr\u00e1fico no Matplotlib \u2013 Estatologia","description":"Este tutorial explica como aumentar o tamanho do gr\u00e1fico no Matplotlib, com v\u00e1rios exemplos.","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\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/","og_locale":"pt_PT","og_type":"article","og_title":"Como aumentar o tamanho do gr\u00e1fico no Matplotlib \u2013 Estatologia","og_description":"Este tutorial explica como aumentar o tamanho do gr\u00e1fico no Matplotlib, com v\u00e1rios exemplos.","og_url":"https:\/\/statorials.org\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/","og_site_name":"Statorials","article_published_time":"2023-07-25T00:17:50+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/taille-du-trace1.png"}],"author":"Dr. benjamim anderson","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"Dr. benjamim anderson","Tempo estimado de leitura":"2 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/","url":"https:\/\/statorials.org\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/","name":"Como aumentar o tamanho do gr\u00e1fico no Matplotlib \u2013 Estatologia","isPartOf":{"@id":"https:\/\/statorials.org\/pt\/#website"},"datePublished":"2023-07-25T00:17:50+00:00","dateModified":"2023-07-25T00:17:50+00:00","author":{"@id":"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666"},"description":"Este tutorial explica como aumentar o tamanho do gr\u00e1fico no Matplotlib, com v\u00e1rios exemplos.","breadcrumb":{"@id":"https:\/\/statorials.org\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/#breadcrumb"},"inLanguage":"pt-PT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Lar","item":"https:\/\/statorials.org\/pt\/"},{"@type":"ListItem","position":2,"name":"Como aumentar o tamanho do gr\u00e1fico no matplotlib"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/pt\/#website","url":"https:\/\/statorials.org\/pt\/","name":"Statorials","description":"O seu guia para a literacia estat\u00edstica!","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/pt\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"pt-PT"},{"@type":"Person","@id":"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666","name":"Dr. benjamim anderson","image":{"@type":"ImageObject","inLanguage":"pt-PT","@id":"https:\/\/statorials.org\/pt\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/pt\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/pt\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"Dr. benjamim anderson"},"description":"Ol\u00e1, sou Benjamin, um professor aposentado de estat\u00edstica que se tornou professor dedicado na Statorials. Com vasta experi\u00eancia e conhecimento na \u00e1rea de estat\u00edstica, estou empenhado em compartilhar meu conhecimento para capacitar os alunos por meio de Statorials. Saber mais","sameAs":["https:\/\/statorials.org\/pt"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/posts\/1784","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/comments?post=1784"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/posts\/1784\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/media?parent=1784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/categories?post=1784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/tags?post=1784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}