{"id":1592,"date":"2023-07-25T18:02:15","date_gmt":"2023-07-25T18:02:15","guid":{"rendered":"https:\/\/statorials.org\/nl\/zeegeboren-legendarische-grootte\/"},"modified":"2023-07-25T18:02:15","modified_gmt":"2023-07-25T18:02:15","slug":"zeegeboren-legendarische-grootte","status":"publish","type":"post","link":"https:\/\/statorials.org\/nl\/zeegeboren-legendarische-grootte\/","title":{"rendered":"Hoe u de lettergrootte van de legenda in een seaborn-plot kunt wijzigen"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">U kunt de volgende syntaxis gebruiken om de lettergrootte in een mariene plotlegenda te wijzigen:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong>plt. <span style=\"color: #3366ff;\">legend<\/span> (title=' <span style=\"color: #ff0000;\">Team<\/span> ', fontsize= <span style=\"color: #ff0000;\">'10<\/span> ', title_fontsize= <span style=\"color: #ff0000;\">'14<\/span> ')\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Het argument <strong>fontsize<\/strong> specificeert de lettergrootte van de labels in het bijschrift, en <strong>title_fontsize<\/strong> specificeert de lettergrootte van de titel van het bijschrift.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Het volgende voorbeeld laat zien hoe u deze functie in de praktijk kunt gebruiken.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Voorbeeld: Het wijzigen van de lettergrootte van de legenda in een Seaborn-plot<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">De volgende code laat zien hoe u een spreidingsdiagram maakt in Seaborn en de lettergrootte voor de labels en titel in de legenda specificeert:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">import<\/span> pandas <span style=\"color: #008000;\">as<\/span> pd\n<span style=\"color: #008000;\">import<\/span> seaborn <span style=\"color: #008000;\">as<\/span> sns\n<span style=\"color: #008000;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #008000;\">as<\/span> plt\nsns. <span style=\"color: #3366ff;\">set_style<\/span> (' <span style=\"color: #ff0000;\">whitegrid<\/span> ')\n\n<span style=\"color: #008080;\">#create data\n<\/span>df = pd. <span style=\"color: #3366ff;\">DataFrame<\/span> ({' <span style=\"color: #ff0000;\">points<\/span> ': [25, 12, 15, 14, 19, 23, 25, 29],\n                   ' <span style=\"color: #ff0000;\">assists<\/span> ': [5, 7, 7, 9, 12, 9, 9, 4],\n                   ' <span style=\"color: #ff0000;\">team<\/span> ': ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'B']})\n\n<span style=\"color: #008080;\">#create scatterplot\n<\/span>sns. <span style=\"color: #3366ff;\">scatterplot<\/span> (data=df, x=' <span style=\"color: #ff0000;\">points<\/span> ', y=' <span style=\"color: #ff0000;\">assists<\/span> ', hue=' <span style=\"color: #ff0000;\">team<\/span> ')\n\n<span style=\"color: #008080;\">#add legend\n<\/span>plt. <span style=\"color: #3366ff;\">legend<\/span> (title=' <span style=\"color: #ff0000;\">Team<\/span> ', fontsize= <span style=\"color: #ff0000;\">'10<\/span> ', title_fontsize= <span style=\"color: #ff0000;\">'14<\/span> ')<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-15833 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/seabornlegendtaille1.png\" alt=\"\" width=\"441\" height=\"333\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Argumenten voor de lettergrootte kunnen ook de volgende waarden aannemen:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">xx-klein<\/span><\/li>\n<li> <span style=\"color: #000000;\">x-klein<\/span><\/li>\n<li> <span style=\"color: #000000;\">klein<\/span><\/li>\n<li> <span style=\"color: #000000;\">GEMIDDELD<\/span><\/li>\n<li> <span style=\"color: #000000;\">groot<\/span><\/li>\n<li> <span style=\"color: #000000;\">x-groot<\/span><\/li>\n<li> <span style=\"color: #000000;\">xx-groot<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">Het volgende voorbeeld laat zien hoe u deze argumenten in de praktijk kunt gebruiken:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">import<\/span> pandas <span style=\"color: #008000;\">as<\/span> pd\n<span style=\"color: #008000;\">import<\/span> seaborn <span style=\"color: #008000;\">as<\/span> sns\n<span style=\"color: #008000;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #008000;\">as<\/span> plt\nsns. <span style=\"color: #3366ff;\">set_style<\/span> (' <span style=\"color: #ff0000;\">whitegrid<\/span> ')\n\n<span style=\"color: #008080;\">#create fake data\n<\/span>df = pd. <span style=\"color: #3366ff;\">DataFrame<\/span> ({' <span style=\"color: #ff0000;\">points<\/span> ': [25, 12, 15, 14, 19, 23, 25, 29],\n                   ' <span style=\"color: #ff0000;\">assists<\/span> ': [5, 7, 7, 9, 12, 9, 9, 4],\n                   ' <span style=\"color: #ff0000;\">team<\/span> ': ['A', 'A', 'A', 'A', 'B', 'B', 'B', 'B']})\n\n<span style=\"color: #008080;\">#create scatterplot\n<\/span>sns. <span style=\"color: #3366ff;\">scatterplot<\/span> (data=df, x=' <span style=\"color: #ff0000;\">points<\/span> ', y=' <span style=\"color: #ff0000;\">assists<\/span> ', hue=' <span style=\"color: #ff0000;\">team<\/span> ')\n\n<span style=\"color: #008080;\">#add legend\n<\/span>plt. <span style=\"color: #3366ff;\">legend<\/span> (title=' <span style=\"color: #ff0000;\">Team<\/span> ', fontsize=' <span style=\"color: #ff0000;\">medium<\/span> ', title_fontsize=' <span style=\"color: #ff0000;\">x-large<\/span> ')<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-15834 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/seabornlegendtaille2.png\" alt=\"\" width=\"434\" height=\"328\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Raadpleeg de <a href=\"https:\/\/matplotlib.org\/stable\/api\/_as_gen\/matplotlib.pyplot.legend.html\" target=\"_blank\" rel=\"noopener\">matplotlib-documentatie<\/a> voor een gedetailleerde uitleg van de functie <strong>plt.legend()<\/strong> .<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Aanvullende bronnen<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">In de volgende tutorials wordt uitgelegd hoe u andere veelvoorkomende taken in Seaborn kunt uitvoeren:<\/span><\/p>\n<p> <a href=\"https:\/\/statorials.org\/nl\/grootte-van-een-zeefiguur\/\" target=\"_blank\" rel=\"noopener\">Hoe u de figuurgrootte van een Seaborn-plot kunt aanpassen<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/mariene-aslabels\/\" target=\"_blank\" rel=\"noopener\">Hoe u aslabels op een Seaborn-plot kunt wijzigen<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/positie-van-de-zeelegende\/\" target=\"_blank\" rel=\"noopener\">Hoe de positie van een legende in Seaborn te veranderen<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/legende-van-de-zee-buiten\/\">Hoe plaats je een legende buiten een Seaborn-plot?<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>U kunt de volgende syntaxis gebruiken om de lettergrootte in een mariene plotlegenda te wijzigen: plt. legend (title=&#8216; Team &#8218;, fontsize= &#8217;10 &#8218;, title_fontsize= &#8217;14 &#8218;) Het argument fontsize specificeert de lettergrootte van de labels in het bijschrift, en title_fontsize specificeert de lettergrootte van de titel van het bijschrift. Het volgende voorbeeld laat zien hoe [&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-1592","post","type-post","status-publish","format-standard","hentry","category-gids"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Hoe u de lettergrootte van de legenda in een Seaborn-plot kunt wijzigen<\/title>\n<meta name=\"description\" content=\"In deze tutorial wordt aan de hand van diverse voorbeelden uitgelegd hoe u de lettergrootte in de legenda van een maritiem plot kunt wijzigen.\" \/>\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\/nl\/zeegeboren-legendarische-grootte\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hoe u de lettergrootte van de legenda in een Seaborn-plot kunt wijzigen\" \/>\n<meta property=\"og:description\" content=\"In deze tutorial wordt aan de hand van diverse voorbeelden uitgelegd hoe u de lettergrootte in de legenda van een maritiem plot kunt wijzigen.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/nl\/zeegeboren-legendarische-grootte\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-25T18:02:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/seabornlegendtaille1.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\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/nl\/zeegeboren-legendarische-grootte\/\",\"url\":\"https:\/\/statorials.org\/nl\/zeegeboren-legendarische-grootte\/\",\"name\":\"Hoe u de lettergrootte van de legenda in een Seaborn-plot kunt wijzigen\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/nl\/#website\"},\"datePublished\":\"2023-07-25T18:02:15+00:00\",\"dateModified\":\"2023-07-25T18:02:15+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\"},\"description\":\"In deze tutorial wordt aan de hand van diverse voorbeelden uitgelegd hoe u de lettergrootte in de legenda van een maritiem plot kunt wijzigen.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/nl\/zeegeboren-legendarische-grootte\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/nl\/zeegeboren-legendarische-grootte\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/nl\/zeegeboren-legendarische-grootte\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Thuis\",\"item\":\"https:\/\/statorials.org\/nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hoe u de lettergrootte van de legenda in een seaborn-plot kunt wijzigen\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/nl\/#website\",\"url\":\"https:\/\/statorials.org\/nl\/\",\"name\":\"Statorials\",\"description\":\"Uw gids voor statistische competentie\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/nl\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"de\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\",\"name\":\"Dr.benjamin anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"Dr.benjamin anderson\"},\"description\":\"Ik ben Benjamin, een gepensioneerde hoogleraar statistiek die nu een toegewijde Statorials-lesgever is. Ik heb uitgebreide ervaring en expertise op het gebied van statistiek en ik ben vastbesloten om mijn kennis te delen met studenten via Statorials. Lees verder\",\"sameAs\":[\"http:\/\/statorials.org\/nl\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Hoe u de lettergrootte van de legenda in een Seaborn-plot kunt wijzigen","description":"In deze tutorial wordt aan de hand van diverse voorbeelden uitgelegd hoe u de lettergrootte in de legenda van een maritiem plot kunt wijzigen.","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\/nl\/zeegeboren-legendarische-grootte\/","og_locale":"de_DE","og_type":"article","og_title":"Hoe u de lettergrootte van de legenda in een Seaborn-plot kunt wijzigen","og_description":"In deze tutorial wordt aan de hand van diverse voorbeelden uitgelegd hoe u de lettergrootte in de legenda van een maritiem plot kunt wijzigen.","og_url":"https:\/\/statorials.org\/nl\/zeegeboren-legendarische-grootte\/","og_site_name":"Statorials","article_published_time":"2023-07-25T18:02:15+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/seabornlegendtaille1.png"}],"author":"Dr.benjamin anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr.benjamin anderson","Gesch\u00e4tzte Lesezeit":"2\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/nl\/zeegeboren-legendarische-grootte\/","url":"https:\/\/statorials.org\/nl\/zeegeboren-legendarische-grootte\/","name":"Hoe u de lettergrootte van de legenda in een Seaborn-plot kunt wijzigen","isPartOf":{"@id":"https:\/\/statorials.org\/nl\/#website"},"datePublished":"2023-07-25T18:02:15+00:00","dateModified":"2023-07-25T18:02:15+00:00","author":{"@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219"},"description":"In deze tutorial wordt aan de hand van diverse voorbeelden uitgelegd hoe u de lettergrootte in de legenda van een maritiem plot kunt wijzigen.","breadcrumb":{"@id":"https:\/\/statorials.org\/nl\/zeegeboren-legendarische-grootte\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/nl\/zeegeboren-legendarische-grootte\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/nl\/zeegeboren-legendarische-grootte\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Thuis","item":"https:\/\/statorials.org\/nl\/"},{"@type":"ListItem","position":2,"name":"Hoe u de lettergrootte van de legenda in een seaborn-plot kunt wijzigen"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/nl\/#website","url":"https:\/\/statorials.org\/nl\/","name":"Statorials","description":"Uw gids voor statistische competentie","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/nl\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"de"},{"@type":"Person","@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219","name":"Dr.benjamin anderson","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/image\/","url":"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"http:\/\/statorials.org\/nl\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"Dr.benjamin anderson"},"description":"Ik ben Benjamin, een gepensioneerde hoogleraar statistiek die nu een toegewijde Statorials-lesgever is. Ik heb uitgebreide ervaring en expertise op het gebied van statistiek en ik ben vastbesloten om mijn kennis te delen met studenten via Statorials. Lees verder","sameAs":["http:\/\/statorials.org\/nl"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/1592","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/comments?post=1592"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/1592\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/media?parent=1592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/categories?post=1592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/tags?post=1592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}