{"id":1922,"date":"2023-07-24T10:51:59","date_gmt":"2023-07-24T10:51:59","guid":{"rendered":"https:\/\/statorials.org\/pt\/posicao-do-titulo-matplotlib\/"},"modified":"2023-07-24T10:51:59","modified_gmt":"2023-07-24T10:51:59","slug":"posicao-do-titulo-matplotlib","status":"publish","type":"post","link":"https:\/\/statorials.org\/pt\/posicao-do-titulo-matplotlib\/","title":{"rendered":"Como ajustar a posi\u00e7\u00e3o do t\u00edtulo no matplotlib"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">Voc\u00ea pode usar um dos seguintes m\u00e9todos para ajustar a posi\u00e7\u00e3o de um t\u00edtulo em um gr\u00e1fico Matplotlib:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#adjust title position using 'loc' argument (left, center, right)<\/span>\nplt. <span style=\"color: #3366ff;\">title<\/span> (' <span style=\"color: #ff0000;\">My Title<\/span> ', loc=' <span style=\"color: #ff0000;\">right<\/span> ')\n\n<span style=\"color: #008080;\">#adjust title position using x and y coordinates\n<\/span>plt. <span style=\"color: #3366ff;\">title<\/span> (' <span style=\"color: #ff0000;\">My Title<\/span> ', x= <span style=\"color: #008000;\">0.5<\/span> , y= <span style=\"color: #008000;\">1.1<\/span> ) \n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Os exemplos a seguir mostram como usar cada um desses m\u00e9todos na pr\u00e1tica.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>M\u00e9todo 1: ajuste a posi\u00e7\u00e3o do t\u00edtulo usando \u201cloc\u201d<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">O c\u00f3digo a seguir mostra como ajustar a posi\u00e7\u00e3o de um t\u00edtulo no Matplotlib usando o argumento <strong>loc<\/strong> .<\/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 x and y\n<\/span>x = [1, 4, 10]\ny = [5, 9, 27]\n\n<span style=\"color: #008080;\">#create plot of x and y\n<\/span>plt. <span style=\"color: #3366ff;\">plot<\/span> (x, y)\n\n<span style=\"color: #008080;\">#add title\n<\/span>plt. <span style=\"color: #3366ff;\">title<\/span> (' <span style=\"color: #ff0000;\">My Title<\/span> ', loc=' <span style=\"color: #ff0000;\">left<\/span> ')<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-18352 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/ajustertitre1.png\" alt=\"\" width=\"522\" height=\"361\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\"><strong>Nota:<\/strong> Voc\u00ea pode usar o argumento <strong>loc<\/strong> para especificar uma das tr\u00eas posi\u00e7\u00f5es: esquerda, centro ou direita. A posi\u00e7\u00e3o padr\u00e3o \u00e9 central.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>M\u00e9todo 2: ajuste a posi\u00e7\u00e3o do t\u00edtulo usando coordenadas (x,y)<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">O c\u00f3digo a seguir mostra como ajustar a posi\u00e7\u00e3o de um t\u00edtulo no Matplotlib usando <strong>as coordenadas xey<\/strong> <b>.<\/b><\/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 x and y\n<\/span>x = [1, 4, 10]\ny = [5, 9, 27]\n\n<span style=\"color: #008080;\">#create plot of x and y\n<\/span>plt. <span style=\"color: #3366ff;\">plot<\/span> (x, y)\n\n<span style=\"color: #008080;\">#add title\n<\/span>plt. <span style=\"color: #3366ff;\">title<\/span> (' <span style=\"color: #ff0000;\">My Title<\/span> ', x= <span style=\"color: #008000;\">0.5<\/span> , y= <span style=\"color: #008000;\">1.1<\/span> )<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-18353 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/ajustertitre2.png\" alt=\"\" width=\"518\" height=\"396\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Voc\u00ea tamb\u00e9m pode optar por simplesmente especificar uma das coordenadas. Por exemplo, voc\u00ea pode especificar apenas a coordenada y:<\/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 x and y\n<\/span>x = [1, 4, 10]\ny = [5, 9, 27]\n\n<span style=\"color: #008080;\">#create plot of x and y\n<\/span>plt. <span style=\"color: #3366ff;\">plot<\/span> (x, y)\n\n<span style=\"color: #008080;\">#add title\n<\/span>plt. <span style=\"color: #3366ff;\">title<\/span> (' <span style=\"color: #ff0000;\">My Title<\/span> ', y= <span style=\"color: #008000;\">1.3<\/span> )<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-18354 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/ajustertitre3.png\" alt=\"\" width=\"523\" height=\"461\" srcset=\"\" sizes=\"auto, \"><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Recursos adicionais<\/strong><\/span><\/h3>\n<p> <a href=\"https:\/\/statorials.org\/pt\/matplotlib-aumenta-o-tamanho-do-rastreamento\/\" target=\"_blank\" rel=\"noopener\">Como aumentar o tamanho do gr\u00e1fico no Matplotlib<\/a><br \/> <a href=\"https:\/\/statorials.org\/pt\/intervalo-de-eixo-definido-matplotlib\/\" target=\"_blank\" rel=\"noopener\">Como definir intervalos de eixos no Matplotlib<\/a><br \/> <a href=\"https:\/\/statorials.org\/pt\/definir-valores-do-eixo-x-matplotlib\/\" target=\"_blank\" rel=\"noopener\">Como definir valores do eixo X no Matplotlib<\/a><br \/> <a href=\"https:\/\/statorials.org\/pt\/numero-de-ticks-do-matplotlib\/\" target=\"_blank\" rel=\"noopener\">Como alterar o n\u00famero de ticks no Matplotlib<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Voc\u00ea pode usar um dos seguintes m\u00e9todos para ajustar a posi\u00e7\u00e3o de um t\u00edtulo em um gr\u00e1fico Matplotlib: #adjust title position using &#8216;loc&#8217; argument (left, center, right) plt. title (&#8216; My Title &#8216;, loc=&#8217; right &#8216;) #adjust title position using x and y coordinates plt. title (&#8216; My Title &#8216;, x= 0.5 , y= 1.1 [&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-1922","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 ajustar a posi\u00e7\u00e3o do t\u00edtulo no Matplotlib \u2013 Statorials<\/title>\n<meta name=\"description\" content=\"Este tutorial explica como ajustar a posi\u00e7\u00e3o de um t\u00edtulo em um gr\u00e1fico 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\/posicao-do-titulo-matplotlib\/\" \/>\n<meta property=\"og:locale\" content=\"pt_PT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Como ajustar a posi\u00e7\u00e3o do t\u00edtulo no Matplotlib \u2013 Statorials\" \/>\n<meta property=\"og:description\" content=\"Este tutorial explica como ajustar a posi\u00e7\u00e3o de um t\u00edtulo em um gr\u00e1fico Matplotlib, com v\u00e1rios exemplos.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/pt\/posicao-do-titulo-matplotlib\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-24T10:51:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/ajustertitre1.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\/posicao-do-titulo-matplotlib\/\",\"url\":\"https:\/\/statorials.org\/pt\/posicao-do-titulo-matplotlib\/\",\"name\":\"Como ajustar a posi\u00e7\u00e3o do t\u00edtulo no Matplotlib \u2013 Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/pt\/#website\"},\"datePublished\":\"2023-07-24T10:51:59+00:00\",\"dateModified\":\"2023-07-24T10:51:59+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666\"},\"description\":\"Este tutorial explica como ajustar a posi\u00e7\u00e3o de um t\u00edtulo em um gr\u00e1fico Matplotlib, com v\u00e1rios exemplos.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/pt\/posicao-do-titulo-matplotlib\/#breadcrumb\"},\"inLanguage\":\"pt-PT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/pt\/posicao-do-titulo-matplotlib\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/pt\/posicao-do-titulo-matplotlib\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Lar\",\"item\":\"https:\/\/statorials.org\/pt\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Como ajustar a posi\u00e7\u00e3o do t\u00edtulo 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 ajustar a posi\u00e7\u00e3o do t\u00edtulo no Matplotlib \u2013 Statorials","description":"Este tutorial explica como ajustar a posi\u00e7\u00e3o de um t\u00edtulo em um gr\u00e1fico 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\/posicao-do-titulo-matplotlib\/","og_locale":"pt_PT","og_type":"article","og_title":"Como ajustar a posi\u00e7\u00e3o do t\u00edtulo no Matplotlib \u2013 Statorials","og_description":"Este tutorial explica como ajustar a posi\u00e7\u00e3o de um t\u00edtulo em um gr\u00e1fico Matplotlib, com v\u00e1rios exemplos.","og_url":"https:\/\/statorials.org\/pt\/posicao-do-titulo-matplotlib\/","og_site_name":"Statorials","article_published_time":"2023-07-24T10:51:59+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/ajustertitre1.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\/posicao-do-titulo-matplotlib\/","url":"https:\/\/statorials.org\/pt\/posicao-do-titulo-matplotlib\/","name":"Como ajustar a posi\u00e7\u00e3o do t\u00edtulo no Matplotlib \u2013 Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/pt\/#website"},"datePublished":"2023-07-24T10:51:59+00:00","dateModified":"2023-07-24T10:51:59+00:00","author":{"@id":"https:\/\/statorials.org\/pt\/#\/schema\/person\/e08f98e8db95e0aa9c310e1b27c9c666"},"description":"Este tutorial explica como ajustar a posi\u00e7\u00e3o de um t\u00edtulo em um gr\u00e1fico Matplotlib, com v\u00e1rios exemplos.","breadcrumb":{"@id":"https:\/\/statorials.org\/pt\/posicao-do-titulo-matplotlib\/#breadcrumb"},"inLanguage":"pt-PT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/pt\/posicao-do-titulo-matplotlib\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/pt\/posicao-do-titulo-matplotlib\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Lar","item":"https:\/\/statorials.org\/pt\/"},{"@type":"ListItem","position":2,"name":"Como ajustar a posi\u00e7\u00e3o do t\u00edtulo 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\/1922","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=1922"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/posts\/1922\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/media?parent=1922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/categories?post=1922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/pt\/wp-json\/wp\/v2\/tags?post=1922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}