{"id":4008,"date":"2023-07-14T05:15:30","date_gmt":"2023-07-14T05:15:30","guid":{"rendered":"https:\/\/statorials.org\/nl\/matrozenlijnstijl\/"},"modified":"2023-07-14T05:15:30","modified_gmt":"2023-07-14T05:15:30","slug":"matrozenlijnstijl","status":"publish","type":"post","link":"https:\/\/statorials.org\/nl\/matrozenlijnstijl\/","title":{"rendered":"Hoe u de lijnstijl in een seaborn-plot kunt wijzigen"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">U kunt het argument <b>lijnstijl<\/b> in de functie <strong>lineplot()<\/strong> gebruiken om de stijl van een lijn in een maritiem plot aan te passen:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">import<\/span> seaborn <span style=\"color: #008000;\">as<\/span> sns\n\nsns. <span style=\"color: #3366ff;\">lineplot<\/span> (data=df, x=' <span style=\"color: #ff0000;\">x_var<\/span> ', y=' <span style=\"color: #ff0000;\">y_var<\/span> ', linestyle=' <span style=\"color: #ff0000;\">dashed<\/span> ')<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">De meest voorkomende stijlen die in het <strong>lijnstijlargument<\/strong> kunnen worden gebruikt, zijn onder meer:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\">effen (standaard)<\/span><\/li>\n<li> <span style=\"color: #000000;\">met stippen<\/span><\/li>\n<li> <span style=\"color: #000000;\">punt<\/span><\/li>\n<li> <span style=\"color: #000000;\">rand steek<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">Het volgende voorbeeld laat zien hoe u in de praktijk de lijnstijl in een maritiem plot kunt wijzigen.<\/span><\/p>\n<h2> <span style=\"color: #000000;\"><strong>Voorbeeld: lijnstijl wijzigen in Seaborn<\/strong><\/span><\/h2>\n<p> <span style=\"color: #000000;\">Stel dat we het volgende panda&#8217;s DataFrame hebben dat informatie bevat over de verkopen die elke dag in een winkel worden gedaan:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\"><span style=\"color: #000000;\">import pandas as pd\n\n<span style=\"color: #008080;\">#createDataFrame<\/span>\ndf = pd. <span style=\"color: #3366ff;\">DataFrame<\/span> ({' <span style=\"color: #ff0000;\">day<\/span> ': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],\n                   ' <span style=\"color: #ff0000;\">sales<\/span> ': [3, 3, 5, 4, 5, 6, 8, 9, 14, 18]})\n\n<span style=\"color: #008080;\">#view DataFrame\n<\/span>print(df)\n\n   day sales\n0 1 3\n1 2 3\n2 3 5\n3 4 4\n4 5 5\n5 6 6\n6 7 8\n7 8 9\n8 9 14\n9 10 18\n<\/span><\/span><\/strong><\/pre>\n<p> <span style=\"color: #000000;\">We kunnen de functie <strong>lineplot()<\/strong> in Seaborn gebruiken om een lineaire plot met een ononderbroken lijn te maken:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">import<\/span> seaborn <span style=\"color: #008000;\">as<\/span> sns\n\n<span style=\"color: #008080;\">#create line plot with default line width\n<\/span>sns. <span style=\"color: #3366ff;\">lineplot<\/span> (data=df, x=' <span style=\"color: #ff0000;\">day<\/span> ', y=' <span style=\"color: #ff0000;\">sales<\/span> ')\n<\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-32029 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/ligne1.jpg\" alt=\"\" width=\"516\" height=\"397\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">We kunnen ook het argument <strong>lijnstijl<\/strong> gebruiken om in plaats daarvan een <strong>stippellijn<\/strong> te gebruiken:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">import<\/span> seaborn <span style=\"color: #008000;\">as<\/span> sns\n\n<span style=\"color: #008080;\">#create line plot with dashed line\n<\/span>sns. <span style=\"color: #3366ff;\">lineplot<\/span> (data=df, x=' <span style=\"color: #ff0000;\">day<\/span> ', y=' <span style=\"color: #ff0000;\">sales<\/span> ', linestyle=' <span style=\"color: #ff0000;\">dashed<\/span> ')<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-32041 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/style-de-ligne1.jpg\" alt=\"\" width=\"528\" height=\"405\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Of we kunnen het <strong>lijnstijlargument<\/strong> gebruiken om in plaats daarvan een <b>stippellijn<\/b> te gebruiken:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">import<\/span> seaborn <span style=\"color: #008000;\">as<\/span> sns\n\n<span style=\"color: #008080;\">#create line plot with dotted line\n<\/span>sns. <span style=\"color: #3366ff;\">lineplot<\/span> (data=df, x=' <span style=\"color: #ff0000;\">day<\/span> ', y=' <span style=\"color: #ff0000;\">sales<\/span> ', linestyle=' <span style=\"color: #ff0000;\">dotted<\/span> ')<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-32042 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/style-de-ligne2.jpg\" alt=\"\" width=\"538\" height=\"413\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Of we kunnen het <strong>lijnstijlargument<\/strong> gebruiken om in plaats daarvan een <b>stippellijn<\/b> te gebruiken:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">import<\/span> seaborn <span style=\"color: #008000;\">as<\/span> sns\n\n<span style=\"color: #008080;\">#create line plot with dashdot line\n<\/span>sns. <span style=\"color: #3366ff;\">lineplot<\/span> (data=df, x=' <span style=\"color: #ff0000;\">day<\/span> ', y=' <span style=\"color: #ff0000;\">sales<\/span> ', linestyle=' <span style=\"color: #ff0000;\">dashdot<\/span> ')<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-32043 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/style-de-ligne3.jpg\" alt=\"\" width=\"537\" height=\"406\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">Houd er ook rekening mee dat als u een <a href=\"https:\/\/statorials.org\/nl\/seaborn-plot-verschillende-lijnen\/\" target=\"_blank\" rel=\"noopener\">zeediagram met meerdere lijnen<\/a> maakt, het <b>lijnstijlargument<\/b> van invloed is op de stijl van elke lijn in het diagram.<\/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\/mariene-spoorkleur\/\" target=\"_blank\" rel=\"noopener\">Kleuren wijzigen in een Seaborn-lijndiagram<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/zeegebonden-lijndikte\/\" target=\"_blank\" rel=\"noopener\">Lijndikte aanpassen in Seaborn<\/a><br \/> <a href=\"https:\/\/statorials.org\/nl\/seaborn-plot-verschillende-lijnen\/\" target=\"_blank\" rel=\"noopener\">Hoe meerdere lijnen te tekenen in Seaborn<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>U kunt het argument lijnstijl in de functie lineplot() gebruiken om de stijl van een lijn in een maritiem plot aan te passen: import seaborn as sns sns. lineplot (data=df, x=&#8216; x_var &#8218;, y=&#8216; y_var &#8218;, linestyle=&#8216; dashed &#8218;) De meest voorkomende stijlen die in het lijnstijlargument kunnen worden gebruikt, zijn onder meer: effen (standaard) [&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-4008","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 lijnstijl in een Seaborn lineaire plot kunt wijzigen - Statorials<\/title>\n<meta name=\"description\" content=\"In deze tutorial wordt uitgelegd hoe u de lijnstijl in een lineaire plot van Seaborn kunt wijzigen, met verschillende voorbeelden.\" \/>\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\/matrozenlijnstijl\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hoe u de lijnstijl in een Seaborn lineaire plot kunt wijzigen - Statorials\" \/>\n<meta property=\"og:description\" content=\"In deze tutorial wordt uitgelegd hoe u de lijnstijl in een lineaire plot van Seaborn kunt wijzigen, met verschillende voorbeelden.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/nl\/matrozenlijnstijl\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-14T05:15:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/ligne1.jpg\" \/>\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\/matrozenlijnstijl\/\",\"url\":\"https:\/\/statorials.org\/nl\/matrozenlijnstijl\/\",\"name\":\"Hoe u de lijnstijl in een Seaborn lineaire plot kunt wijzigen - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/nl\/#website\"},\"datePublished\":\"2023-07-14T05:15:30+00:00\",\"dateModified\":\"2023-07-14T05:15:30+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\"},\"description\":\"In deze tutorial wordt uitgelegd hoe u de lijnstijl in een lineaire plot van Seaborn kunt wijzigen, met verschillende voorbeelden.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/nl\/matrozenlijnstijl\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/nl\/matrozenlijnstijl\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/nl\/matrozenlijnstijl\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Thuis\",\"item\":\"https:\/\/statorials.org\/nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hoe u de lijnstijl 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 lijnstijl in een Seaborn lineaire plot kunt wijzigen - Statorials","description":"In deze tutorial wordt uitgelegd hoe u de lijnstijl in een lineaire plot van Seaborn kunt wijzigen, met verschillende voorbeelden.","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\/matrozenlijnstijl\/","og_locale":"de_DE","og_type":"article","og_title":"Hoe u de lijnstijl in een Seaborn lineaire plot kunt wijzigen - Statorials","og_description":"In deze tutorial wordt uitgelegd hoe u de lijnstijl in een lineaire plot van Seaborn kunt wijzigen, met verschillende voorbeelden.","og_url":"https:\/\/statorials.org\/nl\/matrozenlijnstijl\/","og_site_name":"Statorials","article_published_time":"2023-07-14T05:15:30+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/ligne1.jpg"}],"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\/matrozenlijnstijl\/","url":"https:\/\/statorials.org\/nl\/matrozenlijnstijl\/","name":"Hoe u de lijnstijl in een Seaborn lineaire plot kunt wijzigen - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/nl\/#website"},"datePublished":"2023-07-14T05:15:30+00:00","dateModified":"2023-07-14T05:15:30+00:00","author":{"@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219"},"description":"In deze tutorial wordt uitgelegd hoe u de lijnstijl in een lineaire plot van Seaborn kunt wijzigen, met verschillende voorbeelden.","breadcrumb":{"@id":"https:\/\/statorials.org\/nl\/matrozenlijnstijl\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/nl\/matrozenlijnstijl\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/nl\/matrozenlijnstijl\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Thuis","item":"https:\/\/statorials.org\/nl\/"},{"@type":"ListItem","position":2,"name":"Hoe u de lijnstijl 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\/4008","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=4008"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/4008\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/media?parent=4008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/categories?post=4008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/tags?post=4008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}