{"id":87,"date":"2025-09-24T23:04:40","date_gmt":"2025-09-24T21:04:40","guid":{"rendered":"http:\/\/python-ai.pl\/?p=87"},"modified":"2025-09-24T23:05:33","modified_gmt":"2025-09-24T21:05:33","slug":"%f0%9f%93%88-wizualizacja-danych-wykresy-i-grafy","status":"publish","type":"post","link":"https:\/\/python-ai.pl\/?p=87","title":{"rendered":"\ud83d\udcc8 Wizualizacja danych &#8211; Wykresy i Grafy"},"content":{"rendered":"\n<p class=\"has-medium-font-size\">Stworzymy wykresy i wizualizacje z matplotlib i seaborn, kt\u00f3re pomog\u0105 zrozumie\u0107 dane i przygotowa\u0107 si\u0119 do Machine Learning. Poznamy histogramy, scatter ploty i box ploty.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Wizualizacje:<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Histogramy rozk\u0142ad\u00f3w<\/li>\n\n\n\n<li>Wykresy punktowe<\/li>\n\n\n\n<li>Korelacje mi\u0119dzy zmiennymi<\/li>\n\n\n\n<li>Przygotowanie do ML<\/li>\n<\/ul>\n\n\n\n<p>Wizualizacje danych:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"814\" height=\"359\" src=\"http:\/\/python-ai.pl\/wp-content\/uploads\/2025\/09\/image-2.png\" alt=\"\" class=\"wp-image-89\" srcset=\"https:\/\/python-ai.pl\/wp-content\/uploads\/2025\/09\/image-2.png 814w, https:\/\/python-ai.pl\/wp-content\/uploads\/2025\/09\/image-2-300x132.png 300w, https:\/\/python-ai.pl\/wp-content\/uploads\/2025\/09\/image-2-768x339.png 768w\" sizes=\"auto, (max-width: 814px) 100vw, 814px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"814\" height=\"464\" src=\"http:\/\/python-ai.pl\/wp-content\/uploads\/2025\/09\/image-3.png\" alt=\"\" class=\"wp-image-90\" srcset=\"https:\/\/python-ai.pl\/wp-content\/uploads\/2025\/09\/image-3.png 814w, https:\/\/python-ai.pl\/wp-content\/uploads\/2025\/09\/image-3-300x171.png 300w, https:\/\/python-ai.pl\/wp-content\/uploads\/2025\/09\/image-3-768x438.png 768w\" sizes=\"auto, (max-width: 814px) 100vw, 814px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Kod Python &#8211; Wizualizacja z matplotlib:<\/strong><\/h4>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>import matplotlib.pyplot as plt\nimport seaborn as sns\n\n# Ustawienie stylu\nplt.style.use(&#39;seaborn-v0_8&#39;)\nfig, axes = plt.subplots(2, 2, figsize=(15, 10))\n\n# Histogram wieku\naxes[0,0].hist(df[&#39;wiek&#39;], bins=10, alpha=0.7, color=&#39;skyblue&#39;)\naxes[0,0].set_title(&#39;Rozk\u0142ad wieku&#39;)\naxes[0,0].set_xlabel(&#39;Wiek&#39;)\naxes[0,0].set_ylabel(&#39;Liczba os\u00f3b&#39;)\n\n# Histogram pensji\naxes[0,1].hist(df[&#39;pensja&#39;], bins=15, alpha=0.7, color=&#39;lightgreen&#39;)\naxes[0,1].set_title(&#39;Rozk\u0142ad pensji&#39;)\naxes[0,1].set_xlabel(&#39;Pensja (PLN)&#39;)\naxes[0,1].set_ylabel(&#39;Liczba os\u00f3b&#39;)\n\n# Scatter plot - wiek vs pensja\naxes[1,0].scatter(df[&#39;wiek&#39;], df[&#39;pensja&#39;], alpha=0.6, color=&#39;orange&#39;)\naxes[1,0].set_title(&#39;Wiek vs Pensja&#39;)\naxes[1,0].set_xlabel(&#39;Wiek&#39;)\naxes[1,0].set_ylabel(&#39;Pensja (PLN)&#39;)\n\n# Box plot\naxes[1,1].boxplot([df[&#39;pensja&#39;]], labels=[&#39;Pensja&#39;])\naxes[1,1].set_title(&#39;Box Plot - Pensja&#39;)\naxes[1,1].set_ylabel(&#39;Pensja (PLN)&#39;)\n\nplt.tight_layout()\nplt.show()<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Stworzymy wykresy i wizualizacje z matplotlib i seaborn, kt\u00f3re pomog\u0105 zrozumie\u0107 dane i przygotowa\u0107 si\u0119 do Machine Learning. Poznamy histogramy, scatter ploty i box ploty. Wizualizacje: Wizualizacje danych: Kod Python &#8211; Wizualizacja z matplotlib:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[28,4],"tags":[29,6],"class_list":["post-87","post","type-post","status-publish","format-standard","hentry","category-ai","category-kurs","tag-ai","tag-kurs"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/python-ai.pl\/index.php?rest_route=\/wp\/v2\/posts\/87","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/python-ai.pl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/python-ai.pl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/python-ai.pl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/python-ai.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=87"}],"version-history":[{"count":5,"href":"https:\/\/python-ai.pl\/index.php?rest_route=\/wp\/v2\/posts\/87\/revisions"}],"predecessor-version":[{"id":97,"href":"https:\/\/python-ai.pl\/index.php?rest_route=\/wp\/v2\/posts\/87\/revisions\/97"}],"wp:attachment":[{"href":"https:\/\/python-ai.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=87"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/python-ai.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=87"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/python-ai.pl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=87"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}