{"id":1927,"date":"2023-07-24T10:14:48","date_gmt":"2023-07-24T10:14:48","guid":{"rendered":"https:\/\/statorials.org\/de\/matplotlib-rotations-tick-beschriftungen\/"},"modified":"2023-07-24T10:14:48","modified_gmt":"2023-07-24T10:14:48","slug":"matplotlib-rotations-tick-beschriftungen","status":"publish","type":"post","link":"https:\/\/statorials.org\/de\/matplotlib-rotations-tick-beschriftungen\/","title":{"rendered":"So drehen sie h\u00e4kchenbeschriftungen in matplotlib (mit beispielen)"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">Sie k\u00f6nnen die folgende Syntax verwenden, um Teilstrichbeschriftungen in Matplotlib-Plots zu drehen:<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#rotate x-axis tick labels<\/span>\nplt. <span style=\"color: #3366ff;\">xticks<\/span> (rotation= <span style=\"color: #008000;\">45<\/span> )\n\n<span style=\"color: #008080;\">#rotate y-axis tick labels\n<\/span>plt. <span style=\"color: #3366ff;\">yticks<\/span> (rotation= <span style=\"color: #008000;\">90<\/span> )\n<\/strong><\/pre>\n<p> <span style=\"color: #000000;\">Die folgenden Beispiele zeigen, wie Sie diese Syntax in der Praxis anwenden k\u00f6nnen.<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Beispiel 1: Teilstrichbeschriftungen auf der X-Achse drehen<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Der folgende Code zeigt, wie die Teilstrichbeschriftungen der X-Achse in Matplotlib gedreht werden:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\"><span style=\"color: #000000;\"><span style=\"color: #008000;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #008000;\">as<\/span> plt<\/span>\n\n#define data\n<span style=\"color: #000000;\">x = [1, 2, 3, 4]\ny = [7, 13, 24, 22]<\/span>\n\n#createplot\n<span style=\"color: #000000;\">plt. <span style=\"color: #3366ff;\">plot<\/span> (x,y,color=' <span style=\"color: #ff0000;\">red<\/span> ')<\/span>\n\n#rotate x-axis tick labels<\/span>\nplt. <span style=\"color: #3366ff;\">xticks<\/span> (rotation= <span style=\"color: #008000;\">45<\/span> )\n<\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-18392 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/tickrotation1.png\" alt=\"\" width=\"533\" height=\"359\" srcset=\"\" sizes=\"\"><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Beispiel 2: Teilstrichbeschriftungen auf der Y-Achse drehen<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Der folgende Code zeigt, wie man die Markierungsbeschriftungen der Y-Achse in Matplotlib dreht:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\"><span style=\"color: #000000;\"><span style=\"color: #008000;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #008000;\">as<\/span> plt<\/span>\n\n#define data\n<span style=\"color: #000000;\">x = [1, 2, 3, 4]\ny = [7, 13, 24, 22]<\/span>\n\n#createplot\n<span style=\"color: #000000;\">plt. <span style=\"color: #3366ff;\">plot<\/span> (x,y,color=' <span style=\"color: #ff0000;\">blue<\/span> ')<\/span>\n\n#rotate y-axis tick labels<\/span>\nplt. <span style=\"color: #3366ff;\">yticks<\/span> (rotation= <span style=\"color: #008000;\">90<\/span> )<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-18393 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/tickrotation2.png\" alt=\"\" width=\"523\" height=\"356\" srcset=\"\" sizes=\"\"><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Beispiel 3:<\/strong><\/span> <span style=\"color: #000000;\"><strong>Drehen Sie die H\u00e4kchenbeschriftungen beider Achsen<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Der folgende Code zeigt, wie man Teilstrichbeschriftungen auf beiden Achsen in Matplotlib dreht:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\"><span style=\"color: #000000;\"><span style=\"color: #008000;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #008000;\">as<\/span> plt<\/span>\n\n#define data\n<span style=\"color: #000000;\">x = [1, 2, 3, 4]\ny = [7, 13, 24, 22]<\/span>\n\n#createplot\n<span style=\"color: #000000;\">plt. <span style=\"color: #3366ff;\">plot<\/span> (x,y,color=' <span style=\"color: #ff0000;\">green<\/span> ')<\/span>\n\n#rotate x-axis and y-axis tick labels\n<span style=\"color: #000000;\">plt. <span style=\"color: #3366ff;\">xticks<\/span> (rotation= <span style=\"color: #008000;\">45<\/span> )<\/span><\/span>\nplt. <span style=\"color: #3366ff;\">yticks<\/span> (rotation= <span style=\"color: #008000;\">90<\/span> )<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-18394 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/tickrotation3.png\" alt=\"\" width=\"530\" height=\"365\" srcset=\"\" sizes=\"\"><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Zus\u00e4tzliche Ressourcen<\/strong><\/span><\/h3>\n<p> <a href=\"https:\/\/statorials.org\/de\/matplotlib-anzahl-der-ticks\/\" target=\"_blank\" rel=\"noopener\">So \u00e4ndern Sie die Anzahl der Ticks in Matplotlib<\/a><br \/> <a href=\"https:\/\/statorials.org\/de\/matplotlib-tick-label-schriftgrosse\/\" target=\"_blank\" rel=\"noopener\">So legen Sie die Schriftgr\u00f6\u00dfe von H\u00e4kchenbeschriftungen in Matplotlib fest<\/a><br \/> <a href=\"https:\/\/statorials.org\/de\/matplotlib-entfernt-zecken\/\" target=\"_blank\" rel=\"noopener\">So entfernen Sie H\u00e4kchen aus Matplotlib-Plots<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sie k\u00f6nnen die folgende Syntax verwenden, um Teilstrichbeschriftungen in Matplotlib-Plots zu drehen: #rotate x-axis tick labels plt. xticks (rotation= 45 ) #rotate y-axis tick labels plt. yticks (rotation= 90 ) Die folgenden Beispiele zeigen, wie Sie diese Syntax in der Praxis anwenden k\u00f6nnen. Beispiel 1: Teilstrichbeschriftungen auf der X-Achse drehen Der folgende Code zeigt, wie [&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":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>So drehen Sie H\u00e4kchenbeschriftungen in Matplotlib (mit Beispielen) \u2013 Statorials<\/title>\n<meta name=\"description\" content=\"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Sie Teilstrichbeschriftungen in Diagrammen in Matplotlib drehen.\" \/>\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\/de\/matplotlib-rotations-tick-beschriftungen\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"So drehen Sie H\u00e4kchenbeschriftungen in Matplotlib (mit Beispielen) \u2013 Statorials\" \/>\n<meta property=\"og:description\" content=\"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Sie Teilstrichbeschriftungen in Diagrammen in Matplotlib drehen.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/de\/matplotlib-rotations-tick-beschriftungen\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-24T10:14:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/tickrotation1.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 Minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/de\/matplotlib-rotations-tick-beschriftungen\/\",\"url\":\"https:\/\/statorials.org\/de\/matplotlib-rotations-tick-beschriftungen\/\",\"name\":\"So drehen Sie H\u00e4kchenbeschriftungen in Matplotlib (mit Beispielen) \u2013 Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/de\/#website\"},\"datePublished\":\"2023-07-24T10:14:48+00:00\",\"dateModified\":\"2023-07-24T10:14:48+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0\"},\"description\":\"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Sie Teilstrichbeschriftungen in Diagrammen in Matplotlib drehen.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/de\/matplotlib-rotations-tick-beschriftungen\/#breadcrumb\"},\"inLanguage\":\"de-DE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/de\/matplotlib-rotations-tick-beschriftungen\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/de\/matplotlib-rotations-tick-beschriftungen\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Heim\",\"item\":\"https:\/\/statorials.org\/de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"So drehen sie h\u00e4kchenbeschriftungen in matplotlib (mit beispielen)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/de\/#website\",\"url\":\"https:\/\/statorials.org\/de\/\",\"name\":\"Statorials\",\"description\":\"Ihr Leitfaden f\u00fcr statistische Kompetenz !\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/de\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"de-DE\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0\",\"name\":\"Dr. Benjamin Anderson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de-DE\",\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg\",\"caption\":\"Dr. Benjamin Anderson\"},\"description\":\"Hallo, ich bin Benjamin, ein pensionierter Statistikprofessor, der sich zum engagierten Statorials-Lehrer entwickelt hat. Mit umfassender Erfahrung und Fachwissen auf dem Gebiet der Statistik bin ich bestrebt, mein Wissen zu teilen, um Studenten durch Statorials zu bef\u00e4higen. Mehr wissen\",\"sameAs\":[\"https:\/\/statorials.org\/de\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"So drehen Sie H\u00e4kchenbeschriftungen in Matplotlib (mit Beispielen) \u2013 Statorials","description":"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Sie Teilstrichbeschriftungen in Diagrammen in Matplotlib drehen.","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\/de\/matplotlib-rotations-tick-beschriftungen\/","og_locale":"de_DE","og_type":"article","og_title":"So drehen Sie H\u00e4kchenbeschriftungen in Matplotlib (mit Beispielen) \u2013 Statorials","og_description":"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Sie Teilstrichbeschriftungen in Diagrammen in Matplotlib drehen.","og_url":"https:\/\/statorials.org\/de\/matplotlib-rotations-tick-beschriftungen\/","og_site_name":"Statorials","article_published_time":"2023-07-24T10:14:48+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/tickrotation1.png"}],"author":"Dr. Benjamin Anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr. Benjamin Anderson","Gesch\u00e4tzte Lesezeit":"1 Minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/de\/matplotlib-rotations-tick-beschriftungen\/","url":"https:\/\/statorials.org\/de\/matplotlib-rotations-tick-beschriftungen\/","name":"So drehen Sie H\u00e4kchenbeschriftungen in Matplotlib (mit Beispielen) \u2013 Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/de\/#website"},"datePublished":"2023-07-24T10:14:48+00:00","dateModified":"2023-07-24T10:14:48+00:00","author":{"@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0"},"description":"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Sie Teilstrichbeschriftungen in Diagrammen in Matplotlib drehen.","breadcrumb":{"@id":"https:\/\/statorials.org\/de\/matplotlib-rotations-tick-beschriftungen\/#breadcrumb"},"inLanguage":"de-DE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/de\/matplotlib-rotations-tick-beschriftungen\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/de\/matplotlib-rotations-tick-beschriftungen\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Heim","item":"https:\/\/statorials.org\/de\/"},{"@type":"ListItem","position":2,"name":"So drehen sie h\u00e4kchenbeschriftungen in matplotlib (mit beispielen)"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/de\/#website","url":"https:\/\/statorials.org\/de\/","name":"Statorials","description":"Ihr Leitfaden f\u00fcr statistische Kompetenz !","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/de\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"de-DE"},{"@type":"Person","@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0","name":"Dr. Benjamin Anderson","image":{"@type":"ImageObject","inLanguage":"de-DE","@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/de\/wp-content\/uploads\/2023\/11\/Benjamin-Anderson-96x96.jpg","caption":"Dr. Benjamin Anderson"},"description":"Hallo, ich bin Benjamin, ein pensionierter Statistikprofessor, der sich zum engagierten Statorials-Lehrer entwickelt hat. Mit umfassender Erfahrung und Fachwissen auf dem Gebiet der Statistik bin ich bestrebt, mein Wissen zu teilen, um Studenten durch Statorials zu bef\u00e4higen. Mehr wissen","sameAs":["https:\/\/statorials.org\/de"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts\/1927"}],"collection":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/comments?post=1927"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts\/1927\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/media?parent=1927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/categories?post=1927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/tags?post=1927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}