{"id":1184,"date":"2023-07-27T08:57:53","date_gmt":"2023-07-27T08:57:53","guid":{"rendered":"https:\/\/statorials.org\/de\/kreis-matplotlib\/"},"modified":"2023-07-27T08:57:53","modified_gmt":"2023-07-27T08:57:53","slug":"kreis-matplotlib","status":"publish","type":"post","link":"https:\/\/statorials.org\/de\/kreis-matplotlib\/","title":{"rendered":"So zeichnen sie kreise in matplotlib (mit beispielen)"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\">Mithilfe der <a href=\"https:\/\/matplotlib.org\/stable\/api\/_as_gen\/matplotlib.patches.Circle.html\" target=\"_blank\" rel=\"noopener\">Circle()-<\/a> Funktion, die die folgende Syntax verwendet, k\u00f6nnen Sie in Matplotlib schnell Kreise zu einem Diagramm hinzuf\u00fcgen:<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>matplotlib.patches.Circle(xy, radius=5)<\/strong><\/span><\/p>\n<p> <span style=\"color: #000000;\">Gold:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>xy:<\/strong> die Koordinaten (x, y) des Kreises<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>Radius:<\/strong> Der Radius des Kreises. Der Standardwert ist 5.<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">Dieses Tutorial zeigt einige Beispiele f\u00fcr die praktische Verwendung dieser Funktion:<\/span><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Beispiel 1: Erstellen Sie einen einzelnen Kreis<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Der folgende Code zeigt, wie man einen einzelnen Kreis auf einem Matplotlib-Plot erstellt, der sich an den Koordinaten (x,y)(10,10) befindet:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #107d3f;\">as<\/span> plt\n\n<span style=\"color: #008080;\">#set axis limits of plot (x=0 to 20, y=0 to 20)\n<\/span>plt. <span style=\"color: #3366ff;\">axis<\/span> ([0, 20, 0, 20])\n\n<span style=\"color: #008080;\">#create circle with (x, y) coordinates at (10, 10)\n<\/span>c=plt. <span style=\"color: #3366ff;\">Circle<\/span> ((10, 10))\n\n<span style=\"color: #008080;\">#add circle to plot (gca means \"get current axis\")\n<\/span>plt. <span style=\"color: #3366ff;\">gca<\/span> (). <span style=\"color: #3366ff;\">add_artist<\/span> (c)\n<\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-11794 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/cercle1.png\" alt=\"Kreis in Matplotlib\" width=\"412\" height=\"268\" srcset=\"\" sizes=\"\"><\/p>\n<p> <span style=\"color: #000000;\">Standardm\u00e4\u00dfig zeigt eine Achse eines Matplotlib-Diagramms im Allgemeinen mehr Pixel pro Dateneinheit an. Um einen Kreis als Kreis statt als Ellipse erscheinen zu lassen, m\u00fcssen Sie das Argument <strong>plt.axis(\u201eequal\u201c)<\/strong> wie folgt verwenden:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #107d3f;\">as<\/span> plt\n\n<span style=\"color: #008080;\">#set axis limits of plot (x=0 to 20, y=0 to 20)\n<\/span>plt. <span style=\"color: #3366ff;\">axis<\/span> ([0, 20, 0, 20])\nplt. <span style=\"color: #3366ff;\">axis<\/span> (\" <span style=\"color: #008000;\">equal<\/span> \")\n\n<span style=\"color: #008080;\">#create circle with (x, y) coordinates at (10, 10)\n<\/span>c=plt. <span style=\"color: #3366ff;\">Circle<\/span> ((10, 10))\n\n<span style=\"color: #008080;\">#add circle to plot (gca means \"get current axis\")\n<\/span>plt. <span style=\"color: #3366ff;\">gca<\/span> (). <span style=\"color: #3366ff;\">add_artist<\/span> (c)<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-11795 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/cercle2.png\" alt=\"Matplotlib-Kreis\" width=\"387\" height=\"266\" srcset=\"\" sizes=\"\"><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Beispiel 2:<\/strong><\/span> <span style=\"color: #000000;\"><strong>Mehrere Kreise<\/strong><\/span> erstellen<\/h3>\n<p> <span style=\"color: #000000;\">Der folgende Code zeigt, wie man mehrere Kreise in einem Matplotlib-Plot erstellt:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #107d3f;\">as<\/span> plt\n\n<span style=\"color: #008080;\">#set axis limits of plot (x=0 to 20, y=0 to 20)\n<\/span>plt. <span style=\"color: #3366ff;\">axis<\/span> ([0, 20, 0, 20])\nplt. <span style=\"color: #3366ff;\">axis<\/span> (\" <span style=\"color: #008000;\">equal<\/span> \")\n\n<span style=\"color: #008080;\">#define circles\n<\/span>c1=plt. <span style=\"color: #3366ff;\">Circle<\/span> ((5, 5), radius= <span style=\"color: #008000;\">1<\/span> )\nc2=plt. <span style=\"color: #3366ff;\">Circle<\/span> ((10, 10), radius= <span style=\"color: #008000;\">2<\/span> )\nc3=plt. <span style=\"color: #3366ff;\">Circle<\/span> ((15, 13), radius= <span style=\"color: #008000;\">3<\/span> )\n\n<span style=\"color: #008080;\">#add circles to plot\n<\/span>plt. <span style=\"color: #3366ff;\">gca<\/span> (). <span style=\"color: #3366ff;\">add_artist<\/span> (c1)\nplt. <span style=\"color: #3366ff;\">gca<\/span> (). <span style=\"color: #3366ff;\">add_artist<\/span> (c2)\nplt. <span style=\"color: #3366ff;\">gca<\/span> (). <span style=\"color: #3366ff;\">add_artist<\/span> (c3)\n<\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-11796 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/cercle3.png\" alt=\"Mehrere Kreise in Matplotlib\" width=\"392\" height=\"263\" srcset=\"\" sizes=\"\"><\/p>\n<h3> <span style=\"color: #000000;\"><strong>Beispiel 3: \u00c4ndern Sie das Erscheinungsbild des Kreises<\/strong><\/span><\/h3>\n<p> <span style=\"color: #000000;\">Sie k\u00f6nnen die folgenden Argumente verwenden, um das Erscheinungsbild eines Kreises in Matplotlib zu \u00e4ndern:<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>Radius:<\/strong> Geben Sie den Radius des Kreises an<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>Farbe:<\/strong> Geben Sie die Farbe des Kreises an<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>Alpha:<\/strong> Geben Sie die Transparenz des Kreises an<\/span><\/li>\n<\/ul>\n<p> <span style=\"color: #000000;\">Der folgende Code zeigt ein Beispiel f\u00fcr die gleichzeitige Verwendung mehrerer dieser Argumente:<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #107d3f;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #107d3f;\">as<\/span> plt\n\n<span style=\"color: #008080;\">#set axis limits of plot (x=0 to 20, y=0 to 20)\n<\/span>plt. <span style=\"color: #3366ff;\">axis<\/span> ([0, 20, 0, 20])\nplt. <span style=\"color: #3366ff;\">axis<\/span> (\" <span style=\"color: #008000;\">equal<\/span> \")\n\n<span style=\"color: #008080;\">#create circle with (x, y) coordinates at (10, 10)\n<\/span>c=plt. <span style=\"color: #3366ff;\">Circle<\/span> ((10, 10), radius= <span style=\"color: #008000;\">2<\/span> , color=' <span style=\"color: #008000;\">red<\/span> ', alpha= <span style=\"color: #008000;\">.3<\/span> )\n\n<span style=\"color: #008080;\">#add circle to plot (gca means \"get current axis\")\n<\/span>plt. <span style=\"color: #3366ff;\">gca<\/span> (). <span style=\"color: #3366ff;\">add_artist<\/span> (c)<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-11798 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/cercle4.png\" alt=\"Kreis mit Alpha in Matplotlib\" width=\"403\" height=\"269\" srcset=\"\" sizes=\"\"><\/p>\n<p> <span style=\"color: #000000;\">Beachten Sie, dass Sie auch benutzerdefinierte hexadezimale Farbcodes verwenden k\u00f6nnen, um die Farbe der Kreise festzulegen.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mithilfe der Circle()- Funktion, die die folgende Syntax verwendet, k\u00f6nnen Sie in Matplotlib schnell Kreise zu einem Diagramm hinzuf\u00fcgen: matplotlib.patches.Circle(xy, radius=5) Gold: xy: die Koordinaten (x, y) des Kreises Radius: Der Radius des Kreises. Der Standardwert ist 5. Dieses Tutorial zeigt einige Beispiele f\u00fcr die praktische Verwendung dieser Funktion: Beispiel 1: Erstellen Sie einen einzelnen [&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 zeichnen Sie Kreise in Matplotlib (mit Beispielen) \u2013 Statistik<\/title>\n<meta name=\"description\" content=\"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Kreise in Matplotlib gezeichnet werden.\" \/>\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\/kreis-matplotlib\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"So zeichnen Sie Kreise in Matplotlib (mit Beispielen) \u2013 Statistik\" \/>\n<meta property=\"og:description\" content=\"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Kreise in Matplotlib gezeichnet werden.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/de\/kreis-matplotlib\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-27T08:57:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/cercle1.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 Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/de\/kreis-matplotlib\/\",\"url\":\"https:\/\/statorials.org\/de\/kreis-matplotlib\/\",\"name\":\"So zeichnen Sie Kreise in Matplotlib (mit Beispielen) \u2013 Statistik\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/de\/#website\"},\"datePublished\":\"2023-07-27T08:57:53+00:00\",\"dateModified\":\"2023-07-27T08:57:53+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0\"},\"description\":\"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Kreise in Matplotlib gezeichnet werden.\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/de\/kreis-matplotlib\/#breadcrumb\"},\"inLanguage\":\"de-DE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/de\/kreis-matplotlib\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/de\/kreis-matplotlib\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Heim\",\"item\":\"https:\/\/statorials.org\/de\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"So zeichnen sie kreise 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 zeichnen Sie Kreise in Matplotlib (mit Beispielen) \u2013 Statistik","description":"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Kreise in Matplotlib gezeichnet werden.","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\/kreis-matplotlib\/","og_locale":"de_DE","og_type":"article","og_title":"So zeichnen Sie Kreise in Matplotlib (mit Beispielen) \u2013 Statistik","og_description":"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Kreise in Matplotlib gezeichnet werden.","og_url":"https:\/\/statorials.org\/de\/kreis-matplotlib\/","og_site_name":"Statorials","article_published_time":"2023-07-27T08:57:53+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/cercle1.png"}],"author":"Dr. Benjamin Anderson","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"Dr. Benjamin Anderson","Gesch\u00e4tzte Lesezeit":"2 Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/de\/kreis-matplotlib\/","url":"https:\/\/statorials.org\/de\/kreis-matplotlib\/","name":"So zeichnen Sie Kreise in Matplotlib (mit Beispielen) \u2013 Statistik","isPartOf":{"@id":"https:\/\/statorials.org\/de\/#website"},"datePublished":"2023-07-27T08:57:53+00:00","dateModified":"2023-07-27T08:57:53+00:00","author":{"@id":"https:\/\/statorials.org\/de\/#\/schema\/person\/ec75c4d6365f2708f8a0ad3a42121aa0"},"description":"In diesem Tutorial wird anhand mehrerer Beispiele erl\u00e4utert, wie Kreise in Matplotlib gezeichnet werden.","breadcrumb":{"@id":"https:\/\/statorials.org\/de\/kreis-matplotlib\/#breadcrumb"},"inLanguage":"de-DE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/de\/kreis-matplotlib\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/de\/kreis-matplotlib\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Heim","item":"https:\/\/statorials.org\/de\/"},{"@type":"ListItem","position":2,"name":"So zeichnen sie kreise 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\/1184"}],"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=1184"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/posts\/1184\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/media?parent=1184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/categories?post=1184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/de\/wp-json\/wp\/v2\/tags?post=1184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}