{"id":993,"date":"2023-07-28T01:45:39","date_gmt":"2023-07-28T01:45:39","guid":{"rendered":"https:\/\/statorials.org\/nl\/matplotlib-verwijdert-teken\/"},"modified":"2023-07-28T01:45:39","modified_gmt":"2023-07-28T01:45:39","slug":"matplotlib-verwijdert-teken","status":"publish","type":"post","link":"https:\/\/statorials.org\/nl\/matplotlib-verwijdert-teken\/","title":{"rendered":"Hoe teken uit matplotlib-plots te verwijderen"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">Vaak wilt u misschien de maatstreepjes verwijderen van een of meer assen in een Matplotlib-plot. Gelukkig is dit eenvoudig te doen met behulp van de <a href=\"https:\/\/matplotlib.org\/3.1.1\/api\/_as_gen\/matplotlib.axes.Axes.tick_params.html\" target=\"_blank\" rel=\"noopener noreferrer\">tick_params()<\/a> functie.<\/span><\/p>\n<p> <span style=\"color: #000000;\">Deze tutorial toont verschillende voorbeelden van hoe u deze functie in de praktijk kunt gebruiken, op basis van het volgende spreidingsdiagram:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import<\/span> matplotlib.pyplot <span style=\"color: #107d3f;\">as<\/span> plt\n\n<span style=\"color: #008080;\">#createdata<\/span>\nx = [25, 12, 15, 14, 19, 23, 25, 29]\ny = [5, 7, 7, 9, 12, 9, 9, 4]\n\n<span style=\"color: #008080;\">#create scatterplot\n<\/span>plt. <span style=\"color: #3366ff;\">scatter<\/span> (x, y, s=200)\n<\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-10307 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/matplotlibticks1.png\" alt=\"\" width=\"411\" height=\"278\" srcset=\"\" sizes=\"auto, \"><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Voorbeeld 1: Maatstreepjes verwijderen van een enkele as<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">De volgende code laat zien hoe u de maatstreepjes op de <strong>y-as<\/strong> verwijdert:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong>plt. <span style=\"color: #3366ff;\">tick_params<\/span> (left= <span style=\"color: #008000;\">False<\/span> )\n\nplt. <span style=\"color: #3366ff;\">scatter<\/span> (x, y, s=200)\n<\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-10308 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/matplotlibticks2.png\" alt=\"Matplotlib verwijdert maatstreepjes op de y-as\" width=\"414\" height=\"284\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\">En de volgende code laat zien hoe u de maatstreepjes op de <strong>x-as<\/strong> verwijdert:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong>plt. <span style=\"color: #3366ff;\">tick_params<\/span> (bottom= <span style=\"color: #008000;\">False<\/span> )\n\nplt. <span style=\"color: #3366ff;\">scatter<\/span> (x, y, s=200)<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-10309 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/matplotlibticks3.png\" alt=\"Matplotlib verwijdert x-as-tekens\" width=\"417\" height=\"288\" srcset=\"\" sizes=\"auto, \"><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Voorbeeld 2: Verwijder de vinkjes van beide assen<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">De volgende code laat zien hoe u maatstreepjes van beide assen verwijdert:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong>plt. <span style=\"color: #3366ff;\">tick_params<\/span> (left= <span style=\"color: #008000;\">False <span style=\"color: #000000;\">,\n<\/span><span style=\"color: #000000;\">bottom=<\/span> False<\/span> )\n\nplt. <span style=\"color: #3366ff;\">scatter<\/span> (x, y, s=200)<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-10310 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/matplotlibticks4.png\" alt=\"Matplotlib verwijdert maatstreepjes van beide assen\" width=\"413\" height=\"283\" srcset=\"\" sizes=\"auto, \"><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Voorbeeld 3: Verwijder de vinkjes <em>en<\/em> aslabels<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">De volgende code laat zien hoe u maatstreepjes <em>en<\/em> labels van beide assen verwijdert:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong>plt. <span style=\"color: #3366ff;\">tick_params<\/span> (left= <span style=\"color: #008000;\">False <span style=\"color: #000000;\">,\n<\/span><span style=\"color: #000000;\">bottom=<\/span> False,\n                <span style=\"color: #000000;\">labelleft=<\/span> False <span style=\"color: #000000;\">,\n<\/span><span style=\"color: #000000;\">labelbottom=<\/span> False<\/span> )\n\nplt. <span style=\"color: #3366ff;\">scatter<\/span> (x, y, s=200)<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-10311 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/matplotlibticks5.png\" alt=\"Verwijder vinkjes en labels uit de Matplotlib-plot\" width=\"417\" height=\"274\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p> <span style=\"color: #000000;\"><em>Je kunt hier meer Matplotlib-tutorials vinden.<\/em><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Vaak wilt u misschien de maatstreepjes verwijderen van een of meer assen in een Matplotlib-plot. Gelukkig is dit eenvoudig te doen met behulp van de tick_params() functie. Deze tutorial toont verschillende voorbeelden van hoe u deze functie in de praktijk kunt gebruiken, op basis van het volgende spreidingsdiagram: import matplotlib.pyplot as plt #createdata x = [&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-993","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 teken uit Matplotlib-plots te verwijderen \u2013 Statorials<\/title>\n<meta name=\"description\" content=\"Een eenvoudige uitleg over het verwijderen van vinkjes uit Matplotlib-plots, inclusief 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\/matplotlib-verwijdert-teken\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Hoe teken uit Matplotlib-plots te verwijderen \u2013 Statorials\" \/>\n<meta property=\"og:description\" content=\"Een eenvoudige uitleg over het verwijderen van vinkjes uit Matplotlib-plots, inclusief verschillende voorbeelden.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/nl\/matplotlib-verwijdert-teken\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-28T01:45:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/matplotlibticks1.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=\"1\u00a0Minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/nl\/matplotlib-verwijdert-teken\/\",\"url\":\"https:\/\/statorials.org\/nl\/matplotlib-verwijdert-teken\/\",\"name\":\"Hoe teken uit Matplotlib-plots te verwijderen \u2013 Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/nl\/#website\"},\"datePublished\":\"2023-07-28T01:45:39+00:00\",\"dateModified\":\"2023-07-28T01:45:39+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219\"},\"description\":\"Een eenvoudige uitleg over het verwijderen van vinkjes uit Matplotlib-plots, inclusief verschillende voorbeelden.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/nl\/matplotlib-verwijdert-teken\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/nl\/matplotlib-verwijdert-teken\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/nl\/matplotlib-verwijdert-teken\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Thuis\",\"item\":\"https:\/\/statorials.org\/nl\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hoe teken uit matplotlib-plots te verwijderen\"}]},{\"@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 teken uit Matplotlib-plots te verwijderen \u2013 Statorials","description":"Een eenvoudige uitleg over het verwijderen van vinkjes uit Matplotlib-plots, inclusief 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\/matplotlib-verwijdert-teken\/","og_locale":"de_DE","og_type":"article","og_title":"Hoe teken uit Matplotlib-plots te verwijderen \u2013 Statorials","og_description":"Een eenvoudige uitleg over het verwijderen van vinkjes uit Matplotlib-plots, inclusief verschillende voorbeelden.","og_url":"https:\/\/statorials.org\/nl\/matplotlib-verwijdert-teken\/","og_site_name":"Statorials","article_published_time":"2023-07-28T01:45:39+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/matplotlibticks1.png"}],"author":"Dr.benjamin anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr.benjamin anderson","Gesch\u00e4tzte Lesezeit":"1\u00a0Minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/nl\/matplotlib-verwijdert-teken\/","url":"https:\/\/statorials.org\/nl\/matplotlib-verwijdert-teken\/","name":"Hoe teken uit Matplotlib-plots te verwijderen \u2013 Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/nl\/#website"},"datePublished":"2023-07-28T01:45:39+00:00","dateModified":"2023-07-28T01:45:39+00:00","author":{"@id":"https:\/\/statorials.org\/nl\/#\/schema\/person\/d4b8842173cca1bb62cdec41860e4219"},"description":"Een eenvoudige uitleg over het verwijderen van vinkjes uit Matplotlib-plots, inclusief verschillende voorbeelden.","breadcrumb":{"@id":"https:\/\/statorials.org\/nl\/matplotlib-verwijdert-teken\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/nl\/matplotlib-verwijdert-teken\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/nl\/matplotlib-verwijdert-teken\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Thuis","item":"https:\/\/statorials.org\/nl\/"},{"@type":"ListItem","position":2,"name":"Hoe teken uit matplotlib-plots te verwijderen"}]},{"@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\/993","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=993"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/posts\/993\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/media?parent=993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/categories?post=993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/nl\/wp-json\/wp\/v2\/tags?post=993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}