aitech-wizualizacja/02.ipynb

1740 lines
4.1 MiB
Plaintext
Raw Normal View History

2021-03-21 13:14:16 +01:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-09-28 10:12:43 +02:00
"![Logo 1](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech1.jpg)\n",
"<div class=\"alert alert-block alert-info\">\n",
"<h1> Wizualizacja danych </h1>\n",
"<h2> 3-6. <i>Biblioteka ggplot2</i> [laboratoria]</h2>\n",
"<h3>Tomasz Górecki (2021)</h3>\n",
"</div>\n",
"\n",
"![Logo 2](https://git.wmi.amu.edu.pl/AITech/Szablon/raw/branch/master/Logotyp_AITech2.jpg)"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
2021-10-06 20:40:44 +02:00
"Ładowanie wymaganego pakietu: dplyr\n",
2021-03-21 13:14:16 +01:00
"\n",
"\n",
2021-10-06 20:40:44 +02:00
"Dołączanie pakietu: dplyr\n",
2021-03-21 13:14:16 +01:00
"\n",
"\n",
2021-10-06 20:40:44 +02:00
"Następujący obiekt został zakryty z package:gridExtra:\n",
2021-03-21 13:14:16 +01:00
"\n",
" combine\n",
"\n",
"\n",
2021-10-06 20:40:44 +02:00
"Następujące obiekty zostały zakryte z package:stats:\n",
2021-03-21 13:14:16 +01:00
"\n",
" filter, lag\n",
"\n",
"\n",
2021-10-06 20:40:44 +02:00
"Następujące obiekty zostały zakryte z package:base:\n",
2021-03-21 13:14:16 +01:00
"\n",
" intersect, setdiff, setequal, union\n",
"\n",
"\n",
2021-10-06 20:40:44 +02:00
"Ładowanie wymaganego pakietu: SmarterPoland\n",
2021-03-21 13:14:16 +01:00
"\n",
2021-10-06 20:40:44 +02:00
"Ładowanie wymaganego pakietu: httr\n",
2021-03-21 13:14:16 +01:00
"\n",
2021-10-06 20:40:44 +02:00
"Ładowanie wymaganego pakietu: htmltools\n",
"\n"
2021-03-21 13:14:16 +01:00
]
}
],
"source": [
"library(repr) # To resize plots in Jupyter\n",
"options(repr.plot.width = 16, repr.plot.height = 9)\n",
"library(ggplot2)\n",
"library(grid) # For multiplots\n",
"library(gridExtra) # For multiplots\n",
"library(ggthemes) # Additinal themes\n",
"library(PogromcyDanych) # Library with data sets\n",
"setLang(lang = 'eng') # Change language to English for data sets from PogromcyDanych"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-10-06 20:40:44 +02:00
"# Biblioteka ggplot2"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-10-06 20:40:44 +02:00
"Pakiet *ggplot2* jest jednym z najbardziej zaawansowanych narzędzi do tworzenia wykresów statystycznych. Oznacza to, że konstrukcja pakietu jest na tyle elastyczna, że można z nim wykonać praktycznie każdą grafikę statystyczną. "
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-10-06 20:40:44 +02:00
"## Karty pomocy"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"1. [Podstawowa karta pomocy](https://rstudio.com/wp-content/uploads/2015/03/ggplot2-cheatsheet.pdf)\n",
"2. [Estetyki](https://drive.google.com/file/d/1Dvul1p6TYH6gWJzZRwpE0YX1dO0hDF-b/view)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-10-06 20:40:44 +02:00
"## Przykłady"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-10-06 20:40:44 +02:00
"### Wykres punktowy"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoP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955jXcoxbnWrVsXbrnl\nlvDkk09OfE5wXB/fgf3Tn/40fjmxxPA5hsqW1gXiOzfixcFLL73UuNu69RnNQIAAgdcEYvAb\nzy9Hjx5FQoAAgVIFli9fHuI5xvVgqawmI0DgVYF47RLv0jt27BgPAgQIlCqwcuXKxtMF4t9f\nLAQIEChToKurq/Fkx+PHj5c5rbkIECDQyPVOnToVBgcHaZQgEG9u7e7unnGmWgTAzz//fNi5\nc2d44IEHphQUi4x3/05e1qxZE3p7e8O+ffsmr25cHF9xxRVT1sVvXj/utAFWFBKIj9iOS/w/\nsQ/yLkRmEAECBQXiuT4GNMPDwwW3MIwAAQLFBMYfmeP8UszLKAIEiguMf0SO80txMyMJECgm\n4PqlmJNRBAjMXiC+gS3+jdf1y+ztbEGAwMwC8RrG+WVmpyIjij6q/7UPDikyY4Vj/vznP4cV\nK1aEd7zjHVOO4rnnnmvc7bt3796J9THQPXjwYHj9ZwBPDPAFAQIECBAgQIAAAQIECBAgQIAA\nAQIECBAgQIAAAQIEEhWoRQC8Z8+e8Na3vvW0FqxevTosXrw4PPTQQ+Hll19u3M3b398f4uNw\nNmzYcNp4KwgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIJCyQC0C4Hinb3y0c7Plrrvu\nCrt37
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(cats_birds, aes(x = weight, y = speed)) +\n",
" geom_point() # Basic ggplot"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HS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FLv/fv31/7k21rowkQaHSBGOzE36iLv6RjIUCAwPECra2t4fDhw+Gtt946/iWP\nCRAgECZMmBB2795NggABAt0Exo0bF+L3hPscpxuNJwgQ+K9AvDtA/KzSd1X6cSBA4HiB+Dll\n/BM/h4ifR1iyCcTPeoXn2cxSGV2JAPi1114L69evD/fee28Xt3gFb7z6t/Myffr0cOqpp4Y3\n33yz89O1W4mdd955XZ6LD44f122AJ95TIF7674T5njxeINC0AvF73eMf54em/RFw4AR6FHCO\n6JHIAAJNLeA9RFO338ETeE+B+P4hLs4R70nkBQJNLRDPEe3t7bU/TQ3h4AkQ6CbQcQvjeI7w\nPqIbT49PxBzOUk2B/32Za+K1/+Uvf6ldcXruued2qfTVV1+tXe27efPm+vMx0N2+fXs4/juA\n6wOsECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAoEEFKhEAb9q0KZx55pndWjBt2rQw\nYsSIcN9999VuExbD3xUrVtRuG/aZz3ym23hPECBAgAABAgQIECBAgAABAgQIECBAgAABAgQI\nECBAo
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(cats_birds, aes(x = weight, y = speed, shape = group)) + \n",
" geom_point(size = 5) # With different shapes"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Warning message:\n",
"“Using size for a discrete variable is not advised.”\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fm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G+vr5w+PDh8O9/\n//volzwnQIBAmDdvXti3bx8JAgQIjBOYO3duiN8T7jzOOBorCBD4j0C8O0A8V+m7Kv04ECBw\ntEA8Txn/xPMQ8XyEpZhAPNcrPC9mlsvolgiAn3vuubB9+/awadOmMW7xCt549W/9snTp0rBg\nwYLw0ksv1a+u3Urs7LPPHrMuPjl63LgBVhxTIF7674B5TB4vEOhYgfi97vGP40PH/gjYcQIn\nFHCMOCGRAQQ6WsBniI5uv50ncEyB+PkhLo4RxyTyAoGOFojHiMHBwdqfjoaw8wQIjBMYuYVx\nPEb4HDGO54QrYg5naU2B/36Za+a1/+lPf6pdcfqud71rTKXPPvts7Wrf559/fnR9DHRffvnl\ncPR3AI8O8IAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQJtKtASAfCOHTvCGWecMa4F\np59+epg+fXq44447arcJi+Hvli1barcNu+CCC8aNt4IAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQ
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(cats_birds, aes(x = weight, y = speed, size = group)) + \n",
" geom_point() # With different sizes"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\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lu6QzedPbv7GXj\nxo1xwgknxAsvvDB7detSYhdccMGcdenJoe3mNbDiiALp1H8HzCPyeIFAzwqk+7qnH8eHnn0L\n2HECxxRwjDgmkQYEelrAZ4ieLr+dJ3BEgfT5IS2OEUck8gKBnhZIx4jx8fHWT09D2HkCBOYJ\nTF/COB0jfI6Yx3PMFSmHs3SnwFs3c8187r/+9a9bZ5y+5z3vmTPTp59+unW277PPPjuzPgW6\nu3fvjkPvATzTwAMCBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgsUYGuCIB37doVZ511\n1rwSnHnmmbF8+fL43ve+17pMWAp/t23b1rps2KWXXjqvvRUECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQ
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(cats_birds, aes(x = weight, y = speed, color = group)) + \n",
" geom_point(size = 5) # With different colors"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yF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OLeoAAEAASURBVHgB7N0LkB11nS/w32RmkkzeIYEQAXmIAkFFQETe\nAoLuKiC+MGutKCpaguWiq+t6LfYhK8KiW6vARRcXHylRQVlLd1e0WEQFFOURbiForiThGUJC\nEhLymMwkd/7tnanpZEhmcnqmT5/+dFWY0326/4/P73g8c77T3W1b+5awECBAgAABAgQIECBA\ngAABAgQIECBAgAABAgQIECBAgEDlBcZVfgYmQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQKZgADYC4EAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQItIiAAbpFCmgYBAgQI\nECBAgAABAgQIECBAgAABAgQIECBAgAABAgQEwF4DBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQaBEBAXCLFNI0CBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgIAD2GiBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgECLCAiAW6SQpkGAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAIGOZiHo7e2NBQsWxNlnnx3Tpk3LhrV8+fK49957hxzigQceGC960Yti7dq1\nceedd263z8knnxydnZ3bbbeBAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECrSrQNAHw\n1VdfHd/97nfjtNNOGwiAH3nkkfi3f/u3nH1PT0+sXLkyLrzwwiwAXrhwYXz2s5+N2bNn5/Y7\n5phjhhUAp5DZMnyBiRMnRvq3bt26SLWwECBQb4GpU6dm7wdbt26tN4TZEyAQ06dPjy1btmR/\nnIeDAIF6C7S3t2e/Mzz33HP1hjB7AgRi/PjxMWnSpFi/fn10d3cTIUCg5gLp/SC9F/hOseYv\nBNMn0CeQvlNMvzesXr2axwgF9thjjxEeYfe6CpQeAD/11FNxxRVXxD333LNdDV75ylfGjTfe\nmNv+hS98IX7729/GWWedlW1ftGhRHHrooXHVVVfl9hvuSjrz2DJ8gXHjxmW/wKWwh93w3exJ\noFUF0ge1FPikfxYCBOotkK68kj4b+HxQ79eB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fgPgVERGDcqrRbc6K9//euYMWNGHHbYYbmWlyxZkp3t\n++ijjw5sT4Hu008/HdveA3hgBw8IECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECDQogKV\nCICXLl0a+++//3Yl2G+//bL7yFxzzTWxatWq7Gzeq6++OmbOnBmnnnrqdvvbQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAgVYWqEQAnM70TZd2Hmq56KKLYvHixXH22WfH/Pnz4/HH\nH88uF
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(cats_birds, aes(x = weight, y = speed, shape = group, color = habitat)) + \n",
" geom_point(size = 5) # Combined different shapes and colors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-10-06 20:40:44 +02:00
"### Dodawanie tekstu do wykresu"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHO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5f4n2HO6NmGMIdI5AvnmVX567nTMmekKg\ntwKNJdfy+du43dvHOo4AgWoFGu9fef2tdhy0TmBVBPz+vCpqHkOgMwTy/SvZUXlj0bgkTbMa\n+zc7oBP233fffZGz03beeece3ZkyZUox2/eZZ57p2p6B7vTp02PZawB3HeAGAQIECBAgQIAA\nAQIECBAgQIAAAQIECBAgQIAAAQIE+qhALQLgqVOnxpZbbvmmIdhiiy0irzl75ZVXFks/ZPg7\nceLEW
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(cats_birds, aes(x = weight, y = speed, label = species)) + \n",
" geom_text(hjust = 0) + \n",
" xlim(0, 350) # With text"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtf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GQdA1gUIgvTb1\nXnH+vwrJT+tOga64+MAdd9wRq1evjpe//OWzlB966KFytu+jjz46vTwFuk899VTsew3g6RXc\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAwCIV6IoA+OGHH44TTzxxzhCccMIJkU67\neM011
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(cats_birds, aes(x = weight, y = speed, label = species, color = group)) + \n",
" geom_text(hjust = -0.1) + \n",
" geom_point() + \n",
" xlim(0, 350) # Two geometries"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFWpz7EV6mel0L9Xy23FMYlPYZenAx0\nyDB1/PX6dledmQjikjkXCxqMJS9WtfFCyH9X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D\neHwHNwgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIDBLBToiAF63bl2ceOKJU4bghBNO\niLTs4
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(cats_birds, aes(x = weight, y = speed, label = species)) + \n",
" geom_text(hjust = -0.1, aes(color = group)) + \n",
" geom_point() + \n",
" xlim(0, 350) # Local aesthetic"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-10-06 20:40:44 +02:00
"### Wykres liniowy i wykres typu \"wstążka\""
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
2021-10-06 20:40:44 +02:00
"<table class=\"dataframe\">\n",
2021-03-21 13:14:16 +01:00
"<caption>A data.frame: 6 × 8</caption>\n",
"<thead>\n",
"\t<tr><th></th><th scope=col>Date</th><th scope=col>Name</th><th scope=col>Opening Price</th><th scope=col>Max Price</th><th scope=col>Min Price</th><th scope=col>Closing Price</th><th scope=col>Change</th><th scope=col>Turnover</th></tr>\n",
"\t<tr><th></th><th scope=col>&lt;date&gt;</th><th scope=col>&lt;fct&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th></tr>\n",
"</thead>\n",
"<tbody>\n",
"\t<tr><th scope=row>1</th><td>2013-12-02</td><td>WIG</td><td>54627</td><td>54790</td><td>53935</td><td>53935</td><td>-1.41</td><td> 640784</td></tr>\n",
"\t<tr><th scope=row>2</th><td>2013-12-03</td><td>WIG</td><td>54026</td><td>54026</td><td>53250</td><td>53277</td><td>-1.22</td><td> 914148</td></tr>\n",
"\t<tr><th scope=row>3</th><td>2013-12-04</td><td>WIG</td><td>53222</td><td>53285</td><td>52536</td><td>52867</td><td>-0.77</td><td> 968047</td></tr>\n",
"\t<tr><th scope=row>4</th><td>2013-12-05</td><td>WIG</td><td>52837</td><td>52900</td><td>52575</td><td>52597</td><td>-0.51</td><td> 808039</td></tr>\n",
"\t<tr><th scope=row>5</th><td>2013-12-06</td><td>WIG</td><td>52838</td><td>52899</td><td>52513</td><td>52728</td><td> 0.25</td><td>1012872</td></tr>\n",
"\t<tr><th scope=row>6</th><td>2013-12-09</td><td>WIG</td><td>53113</td><td>53187</td><td>52881</td><td>52881</td><td> 0.29</td><td> 599884</td></tr>\n",
"</tbody>\n",
"</table>\n"
],
"text/latex": [
"A data.frame: 6 × 8\n",
"\\begin{tabular}{r|llllllll}\n",
" & Date & Name & Opening Price & Max Price & Min Price & Closing Price & Change & Turnover\\\\\n",
" & <date> & <fct> & <dbl> & <dbl> & <dbl> & <dbl> & <dbl> & <dbl>\\\\\n",
"\\hline\n",
"\t1 & 2013-12-02 & WIG & 54627 & 54790 & 53935 & 53935 & -1.41 & 640784\\\\\n",
"\t2 & 2013-12-03 & WIG & 54026 & 54026 & 53250 & 53277 & -1.22 & 914148\\\\\n",
"\t3 & 2013-12-04 & WIG & 53222 & 53285 & 52536 & 52867 & -0.77 & 968047\\\\\n",
"\t4 & 2013-12-05 & WIG & 52837 & 52900 & 52575 & 52597 & -0.51 & 808039\\\\\n",
"\t5 & 2013-12-06 & WIG & 52838 & 52899 & 52513 & 52728 & 0.25 & 1012872\\\\\n",
"\t6 & 2013-12-09 & WIG & 53113 & 53187 & 52881 & 52881 & 0.29 & 599884\\\\\n",
"\\end{tabular}\n"
],
"text/markdown": [
"\n",
"A data.frame: 6 × 8\n",
"\n",
"| <!--/--> | Date &lt;date&gt; | Name &lt;fct&gt; | Opening Price &lt;dbl&gt; | Max Price &lt;dbl&gt; | Min Price &lt;dbl&gt; | Closing Price &lt;dbl&gt; | Change &lt;dbl&gt; | Turnover &lt;dbl&gt; |\n",
"|---|---|---|---|---|---|---|---|---|\n",
"| 1 | 2013-12-02 | WIG | 54627 | 54790 | 53935 | 53935 | -1.41 | 640784 |\n",
"| 2 | 2013-12-03 | WIG | 54026 | 54026 | 53250 | 53277 | -1.22 | 914148 |\n",
"| 3 | 2013-12-04 | WIG | 53222 | 53285 | 52536 | 52867 | -0.77 | 968047 |\n",
"| 4 | 2013-12-05 | WIG | 52837 | 52900 | 52575 | 52597 | -0.51 | 808039 |\n",
"| 5 | 2013-12-06 | WIG | 52838 | 52899 | 52513 | 52728 | 0.25 | 1012872 |\n",
"| 6 | 2013-12-09 | WIG | 53113 | 53187 | 52881 | 52881 | 0.29 | 599884 |\n",
"\n"
],
"text/plain": [
" Date Name Opening Price Max Price Min Price Closing Price Change\n",
"1 2013-12-02 WIG 54627 54790 53935 53935 -1.41 \n",
"2 2013-12-03 WIG 54026 54026 53250 53277 -1.22 \n",
"3 2013-12-04 WIG 53222 53285 52536 52867 -0.77 \n",
"4 2013-12-05 WIG 52837 52900 52575 52597 -0.51 \n",
"5 2013-12-06 WIG 52838 52899 52513 52728 0.25 \n",
"6 2013-12-09 WIG 53113 53187 52881 52881 0.29 \n",
" Turnover\n",
"1 640784 \n",
"2 914148 \n",
"3 968047 \n",
"4 808039 \n",
"5 1012872 \n",
"6 599884 "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"head(WIG)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoN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gQIAAAQIECBAg0OMCAuAe72DN\nI0CAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECgPgIC4Pr0tZYSIECAAAECBAgQIECAAAEC\nBAgQIECAAAECBAgQINDjAgLgHu9gzSNAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAoD4C\nAuD69LWWEiBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECDQ4wIC4B7vYM0jQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQKA+AgLg+vS1lhIgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAg0OMCAuAe72DNI0CAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECgPgIC4Pr0tZYSIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQINDjAgLgHu9gzSNAgAABAgQIECBAgAABAgQIECBA\ngAABAgQIECBAoD4CAuD69LWWEiBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECDQ4wIC4B7v\nYM0jQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQKA+AgLg+vS1lhIgQIAAAQIECBAgQIAA\nAQIECBAgQIAAAQIECBAg0OMCAuAe72DNI0CAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECg\nPgIC4Pr0tZYSIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQINDjAgLgHu9gzSNAgAABAgQI\nECBAgAABAgQIECBAgAABAgQIECBAoD4CAuD69LWWEiBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECDQ4wIC4B7vYM0jQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQKA+AgLg+vS1lhIg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg0OMCAuAe72DNI0CAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECgPgIC4Pr0tZYSIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQINDjAgLg\nHu9gzSNAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAoD4CAuD69LWWEiBAgAABAgQIECBA\ngAABAgQIECBAgAABAgQIECDQ4wIC4B7vYM0jQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQKA+AgLg+vS1lhIgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg0OMCAuAe72DNI0CAAAEC\nBAgQI
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(WIG, aes(x = Date, y = `Closing Price`)) + \n",
" geom_line() # Line geometry"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <ba>”\n",
"Warning message in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014' w 'mbcsToSbcs': kropka zastąpiona <c5>”\n",
"Warning message in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :\n",
"“niepowodzenie konwersji 'paź 2014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iAa0BXJQECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBMoQEACXoapMAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQI\n1CAgAK4BXZUECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAoQ0AAXIaqMgkQIECAAAEC\nBAgQIECAAAECBAgQIECAAAECBAgQIFCDgAC4BnRVEiBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAoAwBAXAZqsokQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIBADQIC4BrQVUmA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIEyBATAZagqkwABAgQIECBAgAABAgQIECBA\ngAABAgQIECBAgAABAjUICIBrQFclAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIEyhAQ\nAJehqkwCBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAjUICAArgFdlQQIECBAgAABAgQI\nECBAgAABAgQIECBAgAABAgQIEChDQABchqoyCRAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgUIOAALgGdFUSIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECgDAEBcBmqyiRAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgEANAgLgGtBVSYAAAQIECBAgQIAAAQIECBAgQIAA\nAQIECBAgQIAAgTIEBMBlqCqTAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECNQgIgGtA\nVyUBA
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(WIG, aes(x = Date, \n",
" ymin = 52000, \n",
" ymax = `Closing Price`)) + \n",
" geom_ribbon() # Ribbon geometry"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-10-06 20:40:44 +02:00
"### Dodawanie trendu do wykresu"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "code",
2021-10-06 20:40:44 +02:00
"execution_count": 44,
2021-03-21 13:14:16 +01:00
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
2021-10-06 20:40:44 +02:00
"<table class=\"dataframe\">\n",
"<caption>A data.frame: 6 × 5</caption>\n",
2021-03-21 13:14:16 +01:00
"<thead>\n",
2021-10-06 20:40:44 +02:00
"\t<tr><th></th><th scope=col>Brand</th><th scope=col>Model</th><th scope=col>Year</th><th scope=col>Price.in.PLN</th><th scope=col>Type.of.fuel</th></tr>\n",
"\t<tr><th></th><th scope=col>&lt;fct&gt;</th><th scope=col>&lt;fct&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;fct&gt;</th></tr>\n",
2021-03-21 13:14:16 +01:00
"</thead>\n",
"<tbody>\n",
2021-10-06 20:40:44 +02:00
"\t<tr><th scope=row>1</th><td>Skoda</td><td>Octavia</td><td>2010</td><td>52750</td><td>benzyna </td></tr>\n",
"\t<tr><th scope=row>2</th><td>Skoda</td><td>Octavia</td><td>2003</td><td>16800</td><td>olej napedowy (diesel)</td></tr>\n",
"\t<tr><th scope=row>3</th><td>Skoda</td><td>Octavia</td><td>2007</td><td>38900</td><td>olej napedowy (diesel)</td></tr>\n",
"\t<tr><th scope=row>4</th><td>Skoda</td><td>Octavia</td><td>2009</td><td>39999</td><td>olej napedowy (diesel)</td></tr>\n",
"\t<tr><th scope=row>5</th><td>Skoda</td><td>Octavia</td><td>2008</td><td>28500</td><td>olej napedowy (diesel)</td></tr>\n",
"\t<tr><th scope=row>6</th><td>Skoda</td><td>Octavia</td><td>2008</td><td>36800</td><td>olej napedowy (diesel)</td></tr>\n",
2021-03-21 13:14:16 +01:00
"</tbody>\n",
"</table>\n"
],
"text/latex": [
2021-10-06 20:40:44 +02:00
"A data.frame: 6 × 5\n",
"\\begin{tabular}{r|lllll}\n",
" & Brand & Model & Year & Price.in.PLN & Type.of.fuel\\\\\n",
" & <fct> & <fct> & <dbl> & <dbl> & <fct>\\\\\n",
2021-03-21 13:14:16 +01:00
"\\hline\n",
2021-10-06 20:40:44 +02:00
"\t1 & Skoda & Octavia & 2010 & 52750 & benzyna \\\\\n",
"\t2 & Skoda & Octavia & 2003 & 16800 & olej napedowy (diesel)\\\\\n",
"\t3 & Skoda & Octavia & 2007 & 38900 & olej napedowy (diesel)\\\\\n",
"\t4 & Skoda & Octavia & 2009 & 39999 & olej napedowy (diesel)\\\\\n",
"\t5 & Skoda & Octavia & 2008 & 28500 & olej napedowy (diesel)\\\\\n",
"\t6 & Skoda & Octavia & 2008 & 36800 & olej napedowy (diesel)\\\\\n",
2021-03-21 13:14:16 +01:00
"\\end{tabular}\n"
],
"text/markdown": [
"\n",
2021-10-06 20:40:44 +02:00
"A data.frame: 6 × 5\n",
2021-03-21 13:14:16 +01:00
"\n",
2021-10-06 20:40:44 +02:00
"| <!--/--> | Brand &lt;fct&gt; | Model &lt;fct&gt; | Year &lt;dbl&gt; | Price.in.PLN &lt;dbl&gt; | Type.of.fuel &lt;fct&gt; |\n",
"|---|---|---|---|---|---|\n",
"| 1 | Skoda | Octavia | 2010 | 52750 | benzyna |\n",
"| 2 | Skoda | Octavia | 2003 | 16800 | olej napedowy (diesel) |\n",
"| 3 | Skoda | Octavia | 2007 | 38900 | olej napedowy (diesel) |\n",
"| 4 | Skoda | Octavia | 2009 | 39999 | olej napedowy (diesel) |\n",
"| 5 | Skoda | Octavia | 2008 | 28500 | olej napedowy (diesel) |\n",
"| 6 | Skoda | Octavia | 2008 | 36800 | olej napedowy (diesel) |\n",
2021-03-21 13:14:16 +01:00
"\n"
],
"text/plain": [
2021-10-06 20:40:44 +02:00
" Brand Model Year Price.in.PLN Type.of.fuel \n",
"1 Skoda Octavia 2010 52750 benzyna \n",
"2 Skoda Octavia 2003 16800 olej napedowy (diesel)\n",
"3 Skoda Octavia 2007 38900 olej napedowy (diesel)\n",
"4 Skoda Octavia 2009 39999 olej napedowy (diesel)\n",
"5 Skoda Octavia 2008 28500 olej napedowy (diesel)\n",
"6 Skoda Octavia 2008 36800 olej napedowy (diesel)"
2021-03-21 13:14:16 +01:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"auta2012 %>% \n",
" filter(Brand == 'Skoda', Model == 'Octavia') %>% \n",
" select(Brand, Model, Year, Price.in.PLN, Type.of.fuel) -> data.skods # Preapre data\n",
2021-10-06 20:40:44 +02:00
"head(data.skods)"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFWpz7EV6mel0L9Xy23FMYlPYZenAx0\nyDB1/PX6dledmQjikjkXCxqMJS9WtfFCyH9XtSekEF+2dH+P4tzITduTygGfv58a5VCTH5Pt\nXD7EFZiNyUDBhHnsFTBgE0SQIA9pfFtgo6cKGuhooeilaKH41eDs38Ip+f4At1Rq/sj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AECBAgQIECAAAECBAgQIECAAAECBAhUiYAAuEoaaRoECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAQAPsZIECAAAECBAgQIECAAAECBAgQIECAAAEC\nBAgQIECAQJUICICrpJGmQYAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQGwnwECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAhUiYAAuEoaaRoECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAQAPsZIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAQJUI1FXJPIZt\nGqtWrYqWlpZhO74DEyCwZQLjxo2L1atXb9mLvYoAgaoRaGhoiNGjR8e6dev8/3nVdNVECGy5\ngPcHW27nlQSqSaC+vj7GjBkT69evj+bm5mqamrkQILAFAltvvXWsWbNmC17pJQQIVJNAXV1d\njB07NjZs2FD6qqa5mQsBAv0XSL8P1q5dG52dnf1/8Yd8RW1tbUycOPED9yIA/kCi7A3a29sj\nfVkIEMiXQPqjjn+7+eqZagkMlkAKgdMfeP1OGCxh+yWQHwHvD/LTK5USGEyB9Afe9P4g/YHX\n+4PBlLZvAvkQSL8TOjo6huUPvPkQUiWBYgikwCW9P0gng3l/UIyemyWBLIGu9wfpPUKlLi4B\nXamdURcBAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgT6KSAA7ieYzQkQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIFCpAgLgSu2MuggQIECAAAECBAgQIECAAAECBAgQIECAAAEC\nBAgQINBPAQFwP8FsToAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgUoVEABXamfURYAA\nAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgX4KCID7CWZzAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIVKqAALhSO6MuAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQI9FNA\nANxPMJsTIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECgUgUEwJXaGXURIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECgnwIC4H6C2ZwAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQKVKiAArtTOqIsAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQL9FBAA9xPM5gQI\nECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIEKhUAQFwpXZGXQQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIEOingAC4n2A2J0CAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAQKUK\nCIArtTPqIkCAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAQD8FBMD9BLM5AQIECBAgQIAA\nAQIECBAgQIAAAQIECBAgQIAAAQIEKlVAAFypnVEXAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIE+ikgAO4nmM0JECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBQqQIC4ErtjLoI\nECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECDQTwEBcD/BbE6AAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAIFKFRAAV2pn1EWAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIF+\nCgiA+wlmcwIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECFSqgAC4UjujLgIECBAgQIAA\nAQIECBAgQIAAAQIECBAgQIAAAQIECPRTQADcTzCbEyBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAoFIFBMCV2hl1ESBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAoJ8CAuB+gtmc\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAEClSogAK7UzqiLAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAEC/RQQAPcTzOYECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBCo\nVAEBc
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(data.skods, aes(x = Year, y = Price.in.PLN)) + \n",
" geom_point() # Too many points"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"`geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = \"cs\")'\n",
"\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFWpz7EV6mel0L9Xy23FMYlPYZenAx0\nyDB1/PX6dledmQjikjkXCxqMJS9WtfFCyH9XtSekEF+2dH+P4tzITduTygGfv58a5VCTH5Pt\nXD7EFZiNyUDBhHnsFTBgE0SQIA9pfFtgo6cKGuhooeilaKH41eDs38Ip+f4At1Rq/sjr6NEw\nQqb/I/DQqsLvaFUjvAx+eWirddAJZnAj1DFJL0mSg/gcIpPkMBkhoyCSJ8lTZIxk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QIECAAAECBAgQIEBg3QICwOumcyEBAgQIECBAgAABAgQIECBA\ngAABAgQIECBAgAABAgTKS0AAuLzGQ2sIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECCw\nbgEB4HXTuZAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQLlJSAAXF7joTUECBAgQIAA\nAQIECBAgQIAAAQIECBAgQIAAAQIECBBYt4AA8LrpXEiAAAECBAgQIECAAAECBAgQIECAAAEC\nBAgQIECAAIHyEhAALq/x0BoCBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAisW0AAeN10\nLiRAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgEB5CQgAl9d4aA0BAgQIECBAgAABAgQI\nECBAgAABAgQIECBAgAABAgTWLSAAvG46FxIgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQKC8BASAy2s8tIYAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQLrFhAAXjedCwkQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIFBeAgLA5TUeWkOAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAIF1CwgAr5vOhQQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECgvAQHg\n8hoPrSFAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgMC6BQSA103nQgIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECJSXgABweY2H1hAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQGDdAgLA66ZzIQECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBMpLQAC4vMZDawgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQILBuAQHgddO5kAABAgQIECBAgAABAgQIECBA\ngAABA
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(data.skods, aes(x = Year, y = Price.in.PLN)) + \n",
" geom_smooth() # Smoothed regression line + standard error"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"`geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = \"cs\")'\n",
"\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFWpz7EV6mel0L9Xy23FMYlPYZenAx0\nyDB1/PX6dledmQjikjkXCxqMJS9WtfFCyH9XtSekEF+2dH+P4tzITduTygGfv58a5VCTH5Pt\nXD7EFZiNyUDBhHnsFTBgE0SQIA9pfFtgo6cKGuhooeilaKH41eDs38Ip+f4At1Rq/sjr6NEw\nQqb/I/DQqsLvaFUjvAx+eWirddAJZnAj1DFJL0mSg/gcIpPkMBkhoyCSJ8lTZIxk0TpKDjXH\nliJzZPO50dR5ASNSnzeLvIvod0HG/mdkmOC0z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ZDNQQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIEChbQABcNp0DCRAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgkC0BAXC2xkM1BAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQKFtAAFw2nQMJECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECCQLQEBcLbGQzUE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAoW0AAXDadAwkQIECAAAECBAgQIECAAAEC\nBAgQIECAAAECBAgQIJAtAQFwtsZDNQQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIEChb\nQABcNp0DCRAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgkC0BAXC2xkM1BAgQIECAAAEC\nBAgQIECAAAECBAgQIECAAAECBAgQKFtAAFw2nQMJECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECCQLQEBcLbGQzUECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAoW0AAXDadAwkQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIJAtAQFwtsZDNQQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIEChbQABcNp0DCRAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgkC0B\nAXC2xkM1BAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQKFtAAFw2nQMJECBAgAABAgQI\nECBAgAABAgQIECBAgAABAgQIECCQLQEBcLbGQzUECBAgQIAAAQIECBAgQIAAAQIECBAgQIAA\nAQIECBAoW0AAXDadAwkQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIJAtAQFwtsZDNQQI\nECBAg
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(data.skods, aes(x = Year, y = Price.in.PLN)) + \n",
" geom_smooth(se = FALSE)"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"`geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = \"cs\")'\n",
"\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFWpz7EV6mel0L9Xy23FMYlPYZenAx0\nyDB1/PX6dledmQjikjkXCxqMJS9WtfFCyH9XtSekEF+2dH+P4tzITduTygGfv58a5VCTH5Pt\nXD7EFZiNyUDBhHnsFTBgE0SQIA9pfFtgo6cKGuhooeilaKH41eDs38Ip+f4At1Rq/sjr6NEw\nQqb/I/DQqsLvaFUjvAx+eWirddAJZnAj1DFJL0mSg/gcIpPkMBkhoyCSJ8lTZIxk0TpKDjXH\nliJzZPO50dR5ASNSnzeLvIvod0HG/mdkmOC0z8VKnzcQ2M/Yz2vKldduXjp9bleLu0ZWn7vW\nc+l0JGcaai10yN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AQGwnwECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAhUiYAAuEoaaRoECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAQAPsZIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAQJUI1FXJPIZt\nGqtWrYqWlpZhO74DEyCwZQLjxo2L1atXb9mLvYoAgaoRaGhoiNGjR8e6dev8/3nVdNVECGy5\ngPcHW27nlQSqSaC+vj7GjBkT69evj+bm5mqamrkQILAFAltvvXWsWbNmC17pJQQIVJNAXV1d\njB07NjZs2FD6qqa5mQsBAv0XSL8P1q5dG52dnf1/8Yd8RW1tbUycOPED9yIA/kCi7A3a29sj\nfVkIEMiXQPqjjn+7+eqZagkMlkAKgdMfeP1OGCxh+yWQHwHvD/LTK5USGEyB9Afe9P4g/YHX\n+4PBlLZvAvkQSL8TOjo6huUPvPkQUiWBYgikwCW9P0gng3l/UIyemyWBLIGu9wfpPUKlLi4B\nXamdURcBAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgT6KSAA7ieYzQkQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIFCpAgLgSu2MuggQIECAAAECBAgQIECAAAECBAgQIECAAAEC\nBAgQINBPAQFwP8FsToAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgUoVEABXamfURYAA\nAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgX4KCID7CWZzAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIVKqAALhSO6MuAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQI9FNA\nANxPMJsTIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECgUgUEwJXaGXURIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECgnwIC4H6C2ZwAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQKVKiAArtTOqIsAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQL9FBAA9xPM5gQI\nECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIEKhUAQFwpXZGXQQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIEOingAC4n2A2J0CAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAQKUK\nCIArtTPqIkCAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAQD8FBMD9BLM5AQIECBAgQIAA\nAQIECBAgQIAAAQIECBAgQIAAAQIEKlVAAFypnVEXAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIE+ikgAO4nmM0JECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBQqQIC4ErtjLoI\nECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECDQTwEBcD/BbE6AAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAIFKFRAAV2pn1EWAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIF+\nCgiA+wlmcwIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECFSqgAC4UjujLgIECBAgQIAA\nAQIECBAgQIAAAQIECBAgQIAAAQIECPRTQADcTzCbEyBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAoFIFBMCV2hl1ESBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAoJ8CAuB+gtmc\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAEClSogAK7UzqiLAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAEC/RQQAPcTzOYECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBCo\nVAEBc
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(data.skods, aes(x = Year, y = Price.in.PLN)) + \n",
" geom_point() + \n",
" geom_smooth(se = FALSE)"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"`geom_smooth()` using method = 'gam' and formula 'y ~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aaRoECBAgQIAAAQIECBAgQIAA\nAQIECBAgQIAAAQIECBAQAPsZIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAQIMItDTI\nPOo2jRdffDG6urrqNr6BCRA4OIHJkyfHtm3bDu5gRxEg0DACbW1tMWHChOjo6PD/5w3TVRMh\ncPACXh8cvJ0jCTSSQGtra0ycODF27twZnZ2djTQ1cyFA4CAEDjnkkGhvbz+IIx1CgEAjCbS0\ntMSkSZNi165dpa9Gmpu5ECBQvUD2+2DHjh3R19dX/cHDPKK5uTmmTZs25FkEwEMSVd6hp6cn\nsi8PAgTSEsje1PFvN62eqZZArQSyEDh7g9fvhFoJOy+BdAS8PkinVyolUEuB7A3e7PVB9gav\n1we1lHZuAmkIZL8Tent76/IGbxpCqiRQDIEscMleH2QXg3l9UIyemyWBSgL9rw+y1wh5fbgF\ndF47oy4CBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAhUKSAArhLM7gQIECBAgAABAgQI\nECBAgAABAgQIECBAgAABAgQIEMirgAA4r51RFwECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBKoUEABXCWZ3AgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQI5FVAAJzXzqiLAAEC\nBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECVQoIgKsEszsBAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgTyKiAAzmtn1EWAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIEqBQTA\nVYLZnQABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAnkVEADntTPqIkCAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAQJUCAuAqwexOgAABAgQIECBAgAABAgQIECBAgAABAgQIECBA\ngACBvAoIgPPaGXURIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECgSgEBcJVgdidAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgEBeBQTAee2MuggQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIFClgAC4SjC7EyBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAIK8CAuC8\ndkZdBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQqFJAAFwlmN0JECBAgAABAgQIECBA\ngAABAgQIECBAgAABAgQIECCQVwEBcF47oy4CBAgQIECAAAECBAgQIECAAAECBAgQIECAAAEC\nBAhUKSAArhLM7gQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIEMirgAA4r51RFwECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBKoUEABXCWZ3AgQIECBAgAABAgQIECBAgAABAgQI\nECBAgAABAgQI5FVAAJzXzqiLAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECVQoIgKsE\nszsBAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgTyKiAAzmtn1EWAAAECBAgQIECAAAEC\nBAgQIECAAAECBAgQIECAAIEqBQTAVYLZnQABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAnkVEADntTPqIkCAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAQJUCAuAqwexOgAABAgQI\nECBAgAABAgQIECBAgAABAgQIECBAgACBvAoIgPPaGXURIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECgSgEBcJVgdidAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgEBeBQTAee2M\nuggQI
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(data.skods, aes(x = Year, y = Price.in.PLN)) + \n",
" geom_point(size = 0.5) + \n",
" geom_smooth(se = FALSE, size = 3) # Layers are independent"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"`geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = \"cs\")'\n",
"\n",
"`geom_smooth()` using formula 'y ~ x'\n",
"\n"
]
},
{
"data": {
"image/png": "iVBOR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gQIECBAgAABAgQIECBAgAABAqkK\nCIBT7Yy6CBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgMEABAfAAwRxOgAABAgQIECBA\ngAABAgQIECBAgAABAgQIECBAgACBVAUEwKl2Rl0ECBAgQIAAAQIECBAgQIAAAQIECBAgQIAA\nAQIECBAYoIAAeIBgDidAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgECqAgLgVDujLgIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECAxQQAA8QDCHEyBAgAABAgQIECBAgAABAgQI\nECBAgAABAgQIECBAIFUBAXCqnVEXAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIEBigg\nAB4gmMMJECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECCQqoAAONXOqIsAAQIECBAgQIAA\nAQIECBAgQIAAAQIECBAgQIAAAQIDFBAADxDM4QQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIEEhVQACcamfURYAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgQEKCIAHCOZwAgQI\nECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIpCogAE61M+oiQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIDAAAUEwAMEczgBAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgRSFRAA\np9oZd
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(data.skods, aes(x = Year, y = Price.in.PLN)) + \n",
" geom_point(size = 0.5) +\n",
" geom_smooth(se = FALSE, size = 2) + \n",
" geom_smooth(method = 'lm', size = 2, color = 'green') + \n",
" geom_smooth(method = 'lm', formula = y ~ poly(x, 2), size = 2, color = 'red')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-10-06 20:40:44 +02:00
"### Wykres pudełkowy"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
2021-10-06 20:40:44 +02:00
"<table class=\"dataframe\">\n",
"<caption>A data.frame: 6 × 5</caption>\n",
2021-03-21 13:14:16 +01:00
"<thead>\n",
2021-10-06 20:40:44 +02:00
"\t<tr><th></th><th scope=col>Brand</th><th scope=col>Model</th><th scope=col>Year</th><th scope=col>Price.in.PLN</th><th scope=col>Type.of.fuel</th></tr>\n",
"\t<tr><th></th><th scope=col>&lt;fct&gt;</th><th scope=col>&lt;fct&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;fct&gt;</th></tr>\n",
2021-03-21 13:14:16 +01:00
"</thead>\n",
"<tbody>\n",
2021-10-06 20:40:44 +02:00
"\t<tr><th scope=row>1</th><td>Skoda</td><td>Fabia </td><td>2007</td><td>21850</td><td>olej napedowy (diesel)</td></tr>\n",
"\t<tr><th scope=row>2</th><td>Skoda</td><td>Octavia</td><td>2007</td><td>38900</td><td>olej napedowy (diesel)</td></tr>\n",
"\t<tr><th scope=row>3</th><td>Skoda</td><td>Octavia</td><td>2007</td><td>32500</td><td>olej napedowy (diesel)</td></tr>\n",
"\t<tr><th scope=row>4</th><td>Skoda</td><td>Octavia</td><td>2007</td><td>32500</td><td>benzyna </td></tr>\n",
"\t<tr><th scope=row>5</th><td>Skoda</td><td>Superb </td><td>2007</td><td>36600</td><td>olej napedowy (diesel)</td></tr>\n",
"\t<tr><th scope=row>6</th><td>Skoda</td><td>Fabia </td><td>2007</td><td>14500</td><td>olej napedowy (diesel)</td></tr>\n",
2021-03-21 13:14:16 +01:00
"</tbody>\n",
"</table>\n"
],
"text/latex": [
2021-10-06 20:40:44 +02:00
"A data.frame: 6 × 5\n",
"\\begin{tabular}{r|lllll}\n",
" & Brand & Model & Year & Price.in.PLN & Type.of.fuel\\\\\n",
" & <fct> & <fct> & <dbl> & <dbl> & <fct>\\\\\n",
2021-03-21 13:14:16 +01:00
"\\hline\n",
2021-10-06 20:40:44 +02:00
"\t1 & Skoda & Fabia & 2007 & 21850 & olej napedowy (diesel)\\\\\n",
"\t2 & Skoda & Octavia & 2007 & 38900 & olej napedowy (diesel)\\\\\n",
"\t3 & Skoda & Octavia & 2007 & 32500 & olej napedowy (diesel)\\\\\n",
"\t4 & Skoda & Octavia & 2007 & 32500 & benzyna \\\\\n",
"\t5 & Skoda & Superb & 2007 & 36600 & olej napedowy (diesel)\\\\\n",
"\t6 & Skoda & Fabia & 2007 & 14500 & olej napedowy (diesel)\\\\\n",
2021-03-21 13:14:16 +01:00
"\\end{tabular}\n"
],
"text/markdown": [
"\n",
2021-10-06 20:40:44 +02:00
"A data.frame: 6 × 5\n",
2021-03-21 13:14:16 +01:00
"\n",
2021-10-06 20:40:44 +02:00
"| <!--/--> | Brand &lt;fct&gt; | Model &lt;fct&gt; | Year &lt;dbl&gt; | Price.in.PLN &lt;dbl&gt; | Type.of.fuel &lt;fct&gt; |\n",
"|---|---|---|---|---|---|\n",
"| 1 | Skoda | Fabia | 2007 | 21850 | olej napedowy (diesel) |\n",
"| 2 | Skoda | Octavia | 2007 | 38900 | olej napedowy (diesel) |\n",
"| 3 | Skoda | Octavia | 2007 | 32500 | olej napedowy (diesel) |\n",
"| 4 | Skoda | Octavia | 2007 | 32500 | benzyna |\n",
"| 5 | Skoda | Superb | 2007 | 36600 | olej napedowy (diesel) |\n",
"| 6 | Skoda | Fabia | 2007 | 14500 | olej napedowy (diesel) |\n",
2021-03-21 13:14:16 +01:00
"\n"
],
"text/plain": [
2021-10-06 20:40:44 +02:00
" Brand Model Year Price.in.PLN Type.of.fuel \n",
"1 Skoda Fabia 2007 21850 olej napedowy (diesel)\n",
"2 Skoda Octavia 2007 38900 olej napedowy (diesel)\n",
"3 Skoda Octavia 2007 32500 olej napedowy (diesel)\n",
"4 Skoda Octavia 2007 32500 benzyna \n",
"5 Skoda Superb 2007 36600 olej napedowy (diesel)\n",
"6 Skoda Fabia 2007 14500 olej napedowy (diesel)"
2021-03-21 13:14:16 +01:00
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"auta2012 %>% \n",
" filter(Brand == 'Skoda', Year == 2007) %>% \n",
" select(Brand, Model, Year, Price.in.PLN, Type.of.fuel) -> data.skods # Prepare data set\n",
2021-10-06 20:40:44 +02:00
"head(data.skods)"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFWpz7EV6mel0L9Xy23FMYlPYZenAx0\nyDB1/PX6dledmQjikjkXCxqMJS9WtfFCyH9XtSekEF+2dH+P4tzITduTygGfv58a5VCTH5Pt\nXD7EFZiNyUDBhHnsFTBgE0SQIA9pfFtgo6cKGuhooeilaKH41eDs38Ip+f4At1Rq/sjr6NEw\nQqb/I/DQqsLvaFUjvA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jIIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECAgAHYMECBAgAABAgQIECBAgAABAgQIECBAgAABAgQI\nECBAoCQCAuCSFNIyCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgIAB2DBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQKAkAgLgkhTSMggQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQICAAdgwQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECgJAKVkqwjt2V0dnbm\nNraBCZRFYOrUqVGpVKKrq6ssS7IOAgQI1IXAlClTYtKkSbFx48bo7++vizmbJAECBMogMHny\n5Ej+bdq0KXp7e8uwJGsgQIBAXQgkr32T18BbtmyJ7du318WcTZIAAQJlEEje+03eA962bVv1\nXxnWZA0E8hJoaWmJ2bNnjzi8AHhEor0/oK+vb+8PsJcAgREFkhcAyX/C/D2NSOUBBAgQyFQg\necGYPP8m4a/n4ExpdUaAAIG9CjQ3N1effwcGBjz/7lXKTgIECGQr0NTUVH3+TQJgr3+ztdUb\nAQIE9iYw+P5vT0+P59+9QdlHIEMBl4DOEFNXBAgQIECAAAECBAgQIECAAAECBAgQIECAAAEC\nBAgQyFNAAJynvrEJECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECCQoYAAOENMXREgQIAA\nAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQCBPAQFwnvrGJkCAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAQIYCAuAMMXVFgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgACBPAUEwHnq\nG5sAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIZCgiAM8TUFQECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBPIUEADnqW9sAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQI\nZCggAM4QU1cECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBDIU0AAnKe+sQkQIECAAAEC\nBAgQIECAAAECBAgQIECAAAECBAgQIJChgAA4Q0xdESBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAIE8BAXCe+sYmQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIBAhgIC4AwxdUWA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIE8BQTAeeobmwABAgQIECBAgAABAgQIECBA\ngAABAgQIECBAgAABAhkKCIAzxNQVAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE8hQQ\nAOepb2wCBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAhkKCAAzhBTVwQIECBAgAABAgQI\nECBAgAABAgQIECBAgAABAgQIEMhTQACcp76xCRAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgkKGAADhDTF0RIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIEAgTwEBcJ76xiZAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgECGAgLgDDF1RYAAAQIECBAgQIAAAQIECBAgQIAA\nAQIECBAgQIAAgTwFBMB56hubAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECGQpUMuyr\nIbtqa2tryHVbNIEsBZqamqrd+XvKUlVfBAgQGFmgufmtzwJOmjQp+vv7R27gEQQIECCQiUBL\nS0u1n9bW1hh8LZxJxzohQIAAgb0KVCpvvRWa/PQexF6p7CRAgECmAsnr3uSWvA72/Jsprc4a\nUGC0/4cUAI/z4PBkNU5AzQn8T2AwgPD35HAgQIBAbQUGA4gkAB4YGKjt4EYjQIBAAwsMPv8m\nb4QN/t7AHJZOgACBmgkMBsA+gFMzcgMRIECgKjD4mtcHcBwQBMYvMNqTOATA47TeuHHjOHvQ\nnACBwTe+/D05FggQIFBbgZkzZ0byn69NmzZFX19fbQc3GgECBBpYYNq0aZF8+GbLli2xffv2\nBpawd
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(data.skods, aes(x = Model, y = Price.in.PLN)) + \n",
" geom_boxplot()"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFWpz7EV6mel0L9Xy23FMYlPYZenAx0\nyDB1/PX6dledmQjikjkXCxqMJS9WtfFCyH9XtSekEF+2dH+P4tzITduTygGfv58a5VCTH5Pt\nXD7EFZiNyUDBhHnsFTBgE0SQIA9pfFtgo6cKGuhooeilaKH41eDs38Ip+f4At1Rq/sjr6NEw\nQqb/I/DQqsLvaFUjvAx+eWirddAJZnAj1DFJL0mSg/gcIpPkMBkhoyCSJ8lTZIxk0TpKDjXH\nliJzZPO50dR5ASNSnzeLvIvod0HG/mdkmOC0z8VKnzcQ2M/Yz2vKldduXjp9bleLu0ZWn7vW\nc+l0JGcaai10yNrUnXLP/8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BAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQmEwBAfBk6ntuAgQI\nECBAgAABAgQIECBAgAABAgQIECBAgAABAgQINFFAANxETKciQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIDAZAoIgCdT33MTIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECgiQIC\n4CZiOhUBAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQmU0AAPJn6npsAAQIECBAgQIAA\nAQIECBAgQIAAAQIECBAgQIAAAQJNFBAANxHTqQgQIECAAAECBAgQIECAAAECBAgQIECAAAEC\nBAgQIDCZAgLgydT33AQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIEGiigAC4iZhORYAA\nAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgckUEABPpr7nJkCAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAQBMF2pt4rlqeaurUqbWct0kTaKZAS0tL43T+PjVT1bkIECAwtkBr6ye/\nCzhlypTo7+8fe4AjCBAgQKApAm1tbY3zdHR0RP5auCkndhICBAgQOKJAe/snb4VmS+9BHJHK\nTgIECDRVIHvdmz2y18F+/jaV1slqKDDef0MKgCf4zeGH1QQBDSfwP4E8gPD3ybcDAQIEjq5A\nHkBkAfDAwMDRfXLPRoAAgRoL5D9/szfC8q9rzGHqBAgQOGoCeQDsF3COGrknIkCAQEMgf83r\nF3B8QxCYuMB4L+IQAE/Qevfu3RM8g+EECORvfPn75HuBAAECR1dgzpw5kf3ja8+ePdHX13d0\nn9yzE
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"data.skods$Model <- reorder(data.skods$Model, data.skods$Price.in.PLN, median)\n",
"ggplot(data.skods, aes(x = Model, y = Price.in.PLN)) + \n",
" geom_boxplot() # Sorted"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
2021-10-06 20:40:44 +02:00
{
"name": "stderr",
"output_type": "stream",
"text": [
"Warning message:\n",
"“`guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> = \"none\")` instead.”\n"
]
},
2021-03-21 13:14:16 +01:00
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFWpz7EV6mel0L9Xy23FMYlPYZenAx0\nyDB1/PX6dledmQjikjkXCxqMJS9WtfFCyH9XtSekEF+2dH+P4tzITduTygGfv58a5VCTH5Pt\nXD7EFZiNyUDBhHnsFTBgE0SQIA9pfFtgo6cKGuhooeilaKH41eDs38Ip+f4At1Rq/sjr6NEw\nQqb/I/DQqsLvaFUjvAx+eWirddAJZnAj1DFJL0mSg/gcIpPkMBkhoyCSJ8lTZIxk0TpKDjXH\nliJzZPO50dR5ASNSnzeLvIvod0HG/mdkmOC0z8VKnzcQ2M/Yz2vKldduXjp9bleLu0ZWn7v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QIAAAQIE\nCBAgQKCJAgLgJmI6FQECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBKZSQAA8lfqemwAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAk0UEAA3EdOpCBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgMJUCAuCp1PfcBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQaKKA\nALiJmE5FgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgACBqRQQAE+lvucmQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIBAEwUEwE3EdCoCBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAhMpYAAeCr1PTcBAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgSaKCAAbiKmUxEg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQGAqBQTAU6nvuQkQIECAAAECBAgQIECAAAEC\nBAgQIECAAAECBAgQINBEgfYmnquWp5o+fXot523SBJop0NLS0jidv0/NVHUuAgQIjC/Q2vrR\n7wJOmzYtBgcHxx/gCAIECBBoikBbW1vjPB0dHZG/Fm7KiZ2EAAECBI4q0N7+0Vuh2dJ7EEel\nspMAAQJNFche92aP7HWwn79NpXWyGgpM9N+QAuBJfnP4YTVJQMMJ/FcgDyD8ffLtQIAAgWMr\nkAcQWQA8NDR0bJ/csxEgQKDGAvnP3+yNsPzrGnOYOgECBI6ZQB4A+wWcY0buiQgQINAQyF/z\n+gUc3xAEJi8w0Ys4BMCTtN6zZ88kz2A4AQL5G1/+PvleIECAwLEVmDt3bmT/+Nq7d28MDAwc\n2yf3b
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(data.skods, aes(x = Model, y = Price.in.PLN)) + \n",
" geom_boxplot(aes(fill = Model)) + \n",
" guides(fill = FALSE) # Remove legend for fill"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-10-06 20:40:44 +02:00
"### Histogram"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.\n",
"\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFWpz7EV6mel0L9Xy23FMYlPYZenAx0\nyDB1/PX6dledmQjikjkXCxqMJS9WtfFCyH9XtSekEF+2dH+P4tzITduTygGfv58a5VCTH5Pt\nXD7EFZiNyUDBhHnsFTBgE0SQIA9pfFtgo6cKGuhooeilaKH41eDs38Ip+f4At1Rq/sjr6NEw\nQqb/I/DQqsLvaFUjvAx+eWirddAJZnAj1DFJL0mSg/gcIpPkMBkhoyCSJ8lTZIxk0TpKDjXH\nliJzZPO50dR5ASNS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nBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBJISEAAn1S7FEiBAgAABAgQIECBAgAABAgQI\nECBAgAABAgQIECBAoFxAAFxuYwsBAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgSSEhAA\nJ9UuxRIgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQKBcQABcbmMLAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIEkhIQACfVLsUSIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECgXEAAXG5jCwECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBJISEAAn1S7FEiBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAoFxAAFxuYwsBAgQIECBAgAABAgQIECBAgAABAgQI\nECBAgAABAgSSEhAAJ9UuxRIgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQKBcQABcbmML\nAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIEkhIQACfVLsUSIECAAAECBAgQIECAAAEC\nBAgQIECAAAECBAgQIECgXEAAXG5jCwECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBJIS\nEAAn1S7FEiBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAoFxAAFxuYwsBAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgSSEhAAJ9UuxRIgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQKBcQABcbmMLAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIEkhIQACfVLsUSIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECgXEAAXG5jCwECBAgQIECAAAECBAgQIECAAAEC\nBAgQI
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(data.skods, aes(x = Price.in.PLN)) + \n",
" geom_histogram()"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.\n",
"\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFWpz7EV6mel0L9Xy23FMYlPYZenAx0\nyDB1/PX6dledmQjikjkXCxqMJS9WtfFCyH9XtSekEF+2dH+P4tzITduTygGfv58a5VCTH5Pt\nXD7EFZiNyUDBhHnsFTBgE0SQIA9pfFtgo6cKGuhooeilaKH41eDs38Ip+f4At1Rq/sjr6NEw\nQqb/I/DQqsLvaFUjvAx+eWirddAJZnAj1DFJL0mSg/gcIpPkMBkhoyCSJ8lTZIxk0TpKDjXH\nliJzZPO50dR5ASNSnzeLvIvod0HG/mdkmOC0z8VKnzcQ2M/Yz2vKldduXjp9bleLu0ZWn7vW\nc+l0JGcaai10yNrUnXLP/8Jf59ewX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QIAAAQIECBAgQIAAAQIECBAgQIAAgUQEBMCJNFIZBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQEAC7DBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQCARgU4i\ndcy5jK1bt875WAfmJ7BkyZLQbrfDzp0785vEyAQITAp0Op3Q398fRkZGJk/zAwEC+QksWrQo\nLFiwIOzatSuMj4/nN5GRCRDoCbRarTA0NBR2795NhACBAgTifVy8r9u3b184ePBgATOaggCB\npUuX9h5bkiBAIH+Bvr6+EJ+7PHDggOdR8uc2A4GeQHxsGR9Xjo6OJiuyevXqZGtTWDkCjQ+A\nx8bGypE367QCMYyKD6b0Z1omZxLITMB1LjNKAxGYkUB8kVN8cjyGv+7rZkRmJwLzEogBcLyv\nc32bF6ODCcxYIF7n4v1cDIBd72bMZkcC8xJwPzcvPgcTmJXAxP3coUOH3M/NSs7OBOYuEJ9H\n6Xa7rnNzJ3RkAwV8BHQDm65kAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgTSFBAAp9lX\nVREgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg0EABAXADm65kAgQIECBAgAABAgQIECBA\ngAABAgQIECBAgAABAgTSFBAAp9lXVREgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg0EAB\nAXADm65kAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgTSFBAAp9lXVREgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAg0EABAXADm65kAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgTSFBAAp9lXVREgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg0EABAXADm65kAgQIECBA\ngAABAgQIECBAgAABAgQIECBAgAABAgTSFBAAp9lXVREgQIAAAQIECBAgQIAAAQIECBAgQIAA\nAQIECBAg0EABAXADm65kAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgTSFBAAp9lXVREg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg0EABAXADm65kAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgTSFBAAp9lXVREgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg0EABAXAD\nm65kAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgTSFBAAp9lXVREgQIAAAQIECBAgQIAA\nAQIECBAgQIAAAQIECBAg0EABAXADm65kAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgTS\nFBAAp9lXVREgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg0EABAXADm65kAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgTSFBAAp9lXVREgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAg0EABAXADm65kAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgTSFBAAp9lXVREgQIAA\nAQIECBAgQIAAAQIECBAgQIAAAQIECBAg0EABAXADm65kAgQIECBAgAABAgQIECBAgAABAgQI\nECBAgAABAgTSFBAAp9lXVREgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg0EABAXADm65k\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgTSFBAAp9lXVREgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAg0EABAXADm65kAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgTSFBAA\np9lXVREgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg0EABAXADm65kAgQIECBAgAABAgQI\nECBAg
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(data.skods, aes(x = Price.in.PLN, fill = Model)) + \n",
" geom_histogram(color = 'white')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-10-06 20:40:44 +02:00
"### Wykres słupkowy"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoA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ECBAgAABAgQIECBAgAABAgQIDIjA8IDc\nj0nfjdOnT096XzsSIPCewMyZM9PChQvTlStX0n//+9/3VrhGgAABAqECixcvTjdu3EgjIyOh\nfTUjQIAAgfcEFixYkGbNmpXOnz+fRkdH31vhGgECBAiECcyZMyfNmzcvXbx4Mb3zzjthfTUi\nQIAAgfcEZsyYkRYtWuSY8XskrhHoWiBnMcuWLWusM+0D4OvXrzci2YAAgWaBoaGhNHv27OpF\nlb+rZi9bECBAoJRADhxyAOyxuJSwugQIEGgWyC/I83Pj/Hicf1wIECBAoDcC+bE4B8CeG/fG\nX1cCBAh0jhlfu3bNY7F/DgSCBXwEdDC4dgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQI\nECglIAAuJasuAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIEggUEwMHg2hEgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQKCUgAC4lKy6BAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQCBYQAAeDa0eAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIFSAgLgUrLqEiBA\ngAABAgQIECBAgAABAgQIECBAgAABAgQIECBAIFhAABwMrh0BAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgRKCQiAS8mqS4AAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgWABAXAw\nuHYECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAoJSAALiWrLgECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBIIFBMDB4NoRIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECg\nlIAAuJSsugQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIEAgWEAAHg2tHgAABAgQIECBA\ngAABAgQIECBAgAABAgQIECBAgACBUgIC4FKy6hIgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQCBYQAAcDK4dAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIESgkIgEvJqkuAAAEC\nBAgQIECAAAECBAgQIECAAAECBAgQIECAAIFgAQFwMLh2BAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQKCUgAC4lqy4BAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgSCBQTAweDa\nESBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAoJSAALiUrLoECBAgQIAAAQIECBAgQIAA\nAQIECBAgQIAAAQIECBAIFhAAB4NrR4AAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgVIC\nAuBSsuoSIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIEAgWGA4uN9N7V555ZX073//u3b7\n0qVL04MPPjh228jISDp8+HDKv9evX5/WrFkzti5faVpf29gCAQIECBAgQIAAAQIECBAgQIAA\nAQIECBAgQIAAAQIEBlSg5wHw888/n/785z+nhQsXjhGvW7duLAB+7bXX0le+8pX0wQ9+MN13\n331p79696Qc/+EF6+OGHq+2b1o8VdYUAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQID\nLtDzAPif//xn+trXvpY+//nP35J6165dafPmzWnnzp1paGgoHThwIO3evTsdPHiwWm5af8ui\nbiRAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgMAACvT0O4CvXLmSXn/99fThD3/4lrRn\nzpxJx
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(data.skods , aes(x = Model)) + \n",
" geom_bar()"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo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9EehrgdYHwDEUcyGQu0AMR+bNm1eEwLn3qj8CBNolMDg4GGJI\nMjk5WXy1q3vdEiCQs0D82S0+v8VwxO8sOa+03gi0UyA+v8XnNs9v7Vx/XRPIWSC+BhcDYM9v\nOa+y3ggQINAfAt4Cuj/WySwJECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECDQUUAA3JHI\nDgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIEOgPAQFwf6yTWRIgQIAAAQIECBAgQIAA\nAQIECBAgQIAAAQIECBAgQKCjgAC4I5EdCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\n0B8CAuD+WCezJECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAQEcBAXBHIjsQIECAAAEC\nBAgQIECAAAECBAgQIECAAAECBAgQIECgPwQEwP2xTmZJgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgACBjgIC4I5EdiBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgEB/CAiA+2Od\nzJIAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIdBQTAHYnsQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAgf4QEAD3xzqZJQECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAEC\nBDoKCIA7EtmBAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAEC/SEgAO6PdTJLAgQIECBA\ngAABAgQIECBAgAABAgQIECBAgAABAgQIdBQQAHcksgMBAgQIECBAgAABAgQIECBAgAABAgQI\nECBAgAABAgT6Q0AA3B/rZJYECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBDoKCAA7khk\nBwIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECPSHgAC4P9bJLAkQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQINBRQADckcgOBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\n6A8BAXB/rJNZEiBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAoKOAALgjkR0IECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECDQHwIC4P5YJ7MkQIAAAQIECBAgQIAAAQIECBAgQIAA\nAQIECBAgQIBARwEBcEciOxAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQKA/BIbqnuZL\nL70U/v3vf8+ZxpIlS8L9998/c9/ExEQ4dOhQiN8ffPDBcO+9985si1c6bZ+zsxsECBAgQIAA\nAQIECBAgQIAAAQIECBAgQIAAAQIECBDIVKD2AHj//v3hz3/+c1i4cOEM8dq1a2cC4OPHj4ev\nfvWr4YMf/GC45557wu7du8MPfvCD8NBDDxX7d9o+M6grBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQyFyg9gD4n//8Z/j6178ePv/5z9+U+plnngmbN28OO3bsCPPmzQv79u0LO3fu\nDAcOHChud9p+00HdSYAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgQwFav0M4KtXr4ZX\nXnklf
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(data.skods , aes(x = Model, fill = Type.of.fuel)) + \n",
" geom_bar()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-10-06 20:40:44 +02:00
"### ggplot2 - modyfikacje"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF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AgECZMmBB2795NggABAt0Exo0bF+L3hPscpxuNJwgQ+K9AvDtA/KzSd1X6cSBA4HiB+Dll\n/BM/h4ifR1iyCcTPeoXn2cxSGV2JAPi1114L69evD/fee28Xt3gFb7z6t/Myffr0cOqpp4Y3\n33yz89O1W4mdd955XZ6LD44f122AJ95TIF7674T5njxeINC0AvF73eMf54em/RFw4AR6FHCO\n6JHIAAJNLeA9RFO338ETeE+B+P4hLs4R70nkBQJNLRDPEe3t7bU/TQ3h4AkQ6CbQcQvjeI7w\nPqIbT49PxBzOUk2B/32Za+K1/+Uvf6ldcXruued2qfTVV1+tXe27efPm+vMx0N2+fXs4/juA\n6wOsECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAoEEFKhEAb9q0KZx55pndWjBt2rQw\nYsSIcN9999VuExbD3xUrVtRuG/aZz3ym23hPECBAgAABAgQIECBAgAABAgQIECBAgAABAgQI\nECBAo
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(cats_birds, aes(x = weight, y = speed, shape = group)) + \n",
" geom_point(size = 5) # How to adjust this plot?"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfR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/+/16ffMD1N8AuKD/A/8leAvF\nY9bLAAAAOGVYSWZNTQAqAAAACAABh2kABAAAAAEAAAAaAAAAAAACoAIABAAAAAEAAAeAoAMA\nBAAAAAEAAAQ4AAAAADFOLeoAAEAASURBVHgB7N0HnFTV2QfgA9JUFFREg2hEbNiwYO+9a+xY\nEluMsSRq1GDvLfYGscUYey+xoWCJvddYiVFBRLGBCIiIfL433wyzy+7s7DLs7uw+5/eDvXPn\n3nPPfe6ygv95z2kz9eeWNAIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBCoeIG2FX8H\nboAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIEMgEBsG8EAgQIECBAgAABAgQIECBA\ngAABAgQIECBAgAABAgQItBABAXALeZBugwABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgJg3wMECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBBoIQIC4BbyIN0GAQIECBAgQIAA\nAQIECBAgQIAAAQIECBAgQIAAAQIEBMC+BwgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nINBCBATALeRBug0CBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAi0Q1C3wNSpU9Nnn32W\nhg8fnjp27Jh69+6d5phjjrpPdAQBAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQaUUAF\ncC3Y33//fbr++uvTeuutlzp16pR69OiRVltttbTCCiukOeecM80333xpl112SW+++WYtPcz8\n3aNHj575F2kBV9hqq63Soosumv2KIH9G2g477JDv6+OPP56Rrko+d8cdd8xf85NPPin5PAcS\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAi0PgEVwDU881tuuSUdcMAB6Ztvvqnh3f/tivD1\n1ltvTbfddluKgO6yyy5Lc889d63Hl/ONuPaRRx6ZpkyZkoXU5ey7JfY1YsSI9MEHH2S39uOP\nP87QLUYAm+tr8uTJM9RXqSc3xTVLHZvjCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIEmpeA\nALjgefzwww/pT3/6Uxo4cGB+b5s2bdJaa62VFl988dSrV680YcKELAB89NFH0xdffJFieugI\ngaMadOjQoTN9aui33norrbnmmmns2LFpt912y4/TBgECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBATABd8D1cPf/v37p+OPPz4ttdRSBUf9b3P8+PHp0ksvTccdd1yKqtIXXnghbbPN\nNmnIkCGpXbuZxxpTGEf4qzWNwL777ps23XTT7OKNVfHdNHfqqgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABApUoMPOSygrTeOCBB6pU/p500knpxBNPrPUuZp999jRgwIDUvXv3tM8++2TH\nPf744ymmj959991rPc8blS3wu9/9rrJvwOgJECBAgAABAgQIECBAgAABAgQIECBAgAABAgRa\ntEDbFn13Jd5cTP0clZ25tt9++xUNf3PHxde99947/frXv87vOvfcc/PbNggQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQINCYAiqAf9Z+8MEHU0ytHK1Tp04pqn/r04488sh03XXXZad8\n/fXXadiwYWmxxRarsYuYOvrtt99O7777bnrvvffShx9+mGadddasknj11VdPG220Ufa6+snD\nhw9Psf7va6+9ln/r008/zcYeOxZaaKG09NJL59+LjUmTJqX77rsvvfPOO+m///1v6ty5czad\ndUxpvdxyy6WuXbtWOb7UF++//362DnIcv/DCC6c+ffrUeeqzzz6bxowZkx0X91n92jNrrLUN\nLJ7R008/nZ5//vk055xzplVXXTX7tcACC9R2Sra/8D7WXXfdNNtss+WPf+qpp9K4ceNSly5d\n0hprrJFth/8jjzySPd+tt946xb1Xb/E9EetIx/ONdaVXWmmltPbaa2fPqG3b0j+j0diG1e/D\nawIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgaYXaDP159b0w2jaEey8885ZABej2G233dIN\nN9xQ7wFFiBwBbASxtbVbb701HXTQQenLL7+s7ZDUu3fvdMUVV6QNNtigyjF//etf04EHHlhl\nX+GL3//+9ymOybXLL788q2L+/PPPc7uqfI3Q+Q9/+EM67bTTUvv27au8V9eLhx56KG222WbZ\nYRFWvvTSS0VP+fbbb9N8882Xvv/++ywcHTVqVJWQe2aONQbWt2/f9MYbb2RjjCD96quvTief\nfHKq6Vv/iCOOSGeeeWat6zhHUBzrPUeLEHnRRRfNtuO3eP4R7q+44oopjCIgjteFLa4dVeO5\ndtFFF6VTTjklxQcHqrd11lkn3XXXXWmLLbbIgup4P4L8Xr16VT80zWzD6S5oBwECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAQLMUKL28sFkOf8YH9dNPP2VVsrmeojK2IW3zzTevNfyNKaYj\nZN5ll
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(cats_birds, aes(x = weight, y = speed, shape = group)) + \n",
" geom_point(size = 5) +\n",
" ggtitle('Cats vs birds') + \n",
" theme(plot.title = element_text(size = 20)) + # Title\n",
" xlab('Weight [kg]') + ylab('Speed [km/h]') + # Axis' labels\n",
" scale_shape_discrete(name = 'Cats and birds') + \n",
" theme(legend.position = 'top') + # Title and position of legend\n",
" geom_text(data = cats_birds[c(6, 8), ], \n",
" aes(label = species), hjust = -0.2) # Additional text"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5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4XM8tldCMC4Keeeiq2bt0at9xyyxS3dAVvuvp3\n8rJu3bo4/vjj47nnnpv8dOtWYueee+6U59JK+7hpAzzxmgLp0n8nzNfk8QKBrhVI3+uefpwf\nuvZXwIETOKaAc8QxiQwg0NUC3kN0dfsdPIHXFEjvH9LiHPGaRF4g0NUC6RwxPDzc+ulqCAdP\ngMA0gfFbGKdzhPcR03iO+UTK4SzNFHjly1wzr/3BBx9sXXF6zjnnTKn0ySefbF3t+/TTT088\nnwLdF154Idq/A3higAcECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBDoUIFGBMDbtm2L\nN73pTdNacNppp8WiRYvitttua90mLIW/mzdvbt027KKLLpo23hMECBAgQIAAAQIECBAgQIAA\nAQIEC
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(cats_birds, aes(x = weight, y = speed, shape = group, color = group)) + \n",
" geom_point(size = 5) # Control mapping"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3H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IECAAAECBAgQIECAAAECBAgQIECAQDYCAuBsWqEQAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIlBMQAJfzM5oAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQLZCAiAs2mFQggQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIFBOQABczs9oAgQI\nECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIZCMgAM6mFQohQIAAAQIECBAgQIAAAQIECBAg\nQIAAA
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(cats_birds, aes(x = weight, y = speed, shape = group, color = group)) + \n",
" geom_point(size = 5) + \n",
" scale_shape_manual(values = c('B', 'C'), \n",
" breaks = c('Bird', 'Cat')) + # Shape of groups and labels on legend\n",
" scale_color_manual(values = c('blue', 'red'), \n",
" breaks = c('Bird', 'Cat')) + # Colors\n",
" scale_y_continuous(limits = c(0, 200), \n",
" expand = c(0, 0)) # Remove margins for X axis"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+Psz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AAAaAAAAAAACoAIABAAAAAEAAAeAoAMA\nBAAAAAEAAAQ4AAAAADFOLeoAAEAASURBVHgB7N0LmB1lfT/w3+7mQm6bqyEQhBBQAlGxXAsP\nIilia7FAWimG+BTBx2vACmqF6uPjDQSV4qOAF1D0aUooUO2jxT5qQRH9S0ChFIFApAECSYCE\nS+6X3ex/37G77m42m7PJnJmz53yGZ9kzM++8l897OJw93zMzTR2dS1gIECBAgAABAgQIECBA\ngAABAgQIECBAgAABAgQIECBAYMgLNA/5ERgAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAA\nAQIECGQCAmBPBAIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECNSJgAC4TibSMAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQICAA9hwgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIBAnQgIgOtkIg2DAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECAmDPAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECNSJgAC4TibSMAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIDCsVgja29tj4cKFMXfu3Ghtbc269dxzz8X999/fbxcPPvjgOOigg2LdunXx\n61//eocyc+bMieHDh++w3QYCBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAjUq0DNBMDX\nXntt3HzzzXHKKad0B8BPPfVUXHfddb3s29raYs2aNXH++ednAfADDzwQl112WUyZMqVXueOO\nO66iADiFzJbBCTQ3N2dztHXr1ti4cePgDlaaAIGGEBg7dmxs2LAhOjo6GmK8BkmAQOUC6Qt6\nY8aMiU2bNsWWLVsqP1BJAgQaRiB9IXjt2rUNM14DJUCgcoGRI0fGqFGjYv369ZE+H7IQIECg\np0BTU1P2t0Z6jbAQIECgr8Do0aNjxIgR2d8a27dv77vb+i4Ekt2ECRN2UcruWhIoPQB+9tln\n40tf+lLcd999O7gcddRRceutt/ba/k//9E/xm9/8Jk4//fRs+9KlS2P27Nlx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NPZvz2XmTNnxite8YpYuXJlz83ZJUCOOOKIXtvS\nSt9yOxSwYQeBrks3pmBn27ZtO+y3gQABAukyKun1QQDsuUCAQF+Brss+p6uzeB/RV8c6AQJd\nAl4fuiT8JkCgp0DXZZ/b2tq8j+gJ4zEBAplA+luj6/MIJAQIEOgr0PU5ZXofkT6TsAxOoOvz\nnMEdpXSZAkPixmuLFy+OCRMmxOGHH97L6oknnsjO9l2+fHn39hToPv/889H3HsDdBTwgQIAA\nAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIBAnQoMiQD4ySefjAMPPHCHKZgxY0Z2yv7Xv/71\n7BJhK
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(cats_birds, aes(x = weight, y = speed, size = length, color = lifespan)) + \n",
" geom_point() # Control mapping - continuous variable"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZx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Bw2ed0dRbvI3bW\n8ZwAgQEBrw8DEn4SIDBUYOCyz9u3b/c+YiiMxwQIZALpb42BzyOQECBAYGeBgc8p0/uI9JmE\nbWwCA5/njO0spYsUKMWN1+6///6YOXNmHHPMMcOsnn766Wy17/Llywf3p0B31apVsfM9gAcL\neECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIFxKlCKAPiZZ56JQw89tGYKDjnkkGzJ\n/te+9
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(cats_birds, aes(x = weight, y = speed, size = length, color = lifespan)) + \n",
" geom_point() + \n",
" scale_size_continuous(range = c(2, 7), limits = c(0, 3)) + # Size and range of points\n",
" scale_color_gradient(low = 'gold', high = 'red') # Colors"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-10-06 20:40:44 +02:00
"### ggplot2 - legenda"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5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FO338ETeE+B+P4hLs4R70nkBQJNLRDPEe3t7bU/TQ3h4AkQ6CbQcQvjeI7w\nPqIbT49PxBzOUk2B/32Za+K1/+Uvf6ldcXruued2qfTVV1+tXe27efPm+vMx0N2+fXs4/juA\n6wOsECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAoEEFKhEAb9q0KZx55pndWjBt2rQw\nYsSIcN9999VuExbD3xUrVtRuG/aZz3ym23hPECBAgAABAgQIECBAgAABAgQIECBAgAABAgQI\nECBAo
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(cats_birds, aes(x = weight, y = speed, shape = group)) +\n",
" geom_point(size = 5) "
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtf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+fPte+fck3KS\nc5KZOXNm3vU8w+zZe+1V3nWYMznfrLU6zf40hUSAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECHV6gc4fvgQ4QIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAQCEgAOwHgQAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAnUiIABcJwOpGwQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIEBAA9jNAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgACBOhEQAK6T\ngdQNAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQICAD7GSBAgAABAgQIECBAgAABAgQI\nECBAgAABAgQIECBAgECdCAgA18lA6gYBAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgS6\n1grBzJkz47rrrotBgwbFMsssUzRrzJgx8eyzz863ieuuu26ss8468dFHH8WwYcPmybPTTjvF\nEkssMc95JwgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIFCvAjUTAL7sssvixhtvjF13\n3bUpAPzWW2/FFVdcMYf9jBkzYty4cXH00UcXAeDnnnsufvzjH8fyyy8/R76tt966VQHgDDJL\niy/Qs2fP6NatW0ycODFmz569+AUqgQABAv8r0LVr1+L9ZfLkyUwIECBQVoFevXpFvsdMmDCh\nrOUqjAABAvlvo86dO8fUqVNhECBAoKwCpUkTH374YVnLVRgBAgS6d+8es2bNiunTp8MgQIBA\nWQX69OkTOQk0J3RKiy/QpUuX6Nu370ILavcA8HvvvRcXXXRRPPPMM/M0dsstt4ybb755jvMX\nX3xxPP3007HPPvsU51977bXYZJNN4tJLL50jX2tf5A+dtPgC+QOXf+TI4C/TxfdUAgEC/yeQ\n7y/5B1TvLf9n4ogAgfIIlL5g4v2lPJ5KIUBgToFOnTr5/DIniVcECJRBID+/eH8pA6QiCBCY\nRyDfW7y/zMPiBAECZRAordbr7y9lwGxDEe2+B/B5551XBA3PP//8hTY7A7933nlnnHbaaZHf\nSMqUAeANNthgoffKQIAAA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YZgjXXXDO6d+8el19+eYwfP76YzXvZZZdFLoezyy67zJPfCQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECNSzQIcIAOdM31zaeX7p+OOPjzfffDMGDRoU\ngwcPj
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"ggplot(cats_birds, aes(x = weight, y = speed, shape = group)) +\n",
" geom_point(size = 5) + \n",
" scale_shape_manual(values = c('B', 'C'), \n",
" labels = c('Angry birds', 'Big cats'), \n",
" name = 'Animals') + \n",
" theme(legend.background = element_rect(color = 'red', fill = 'grey95'),\n",
" legend.title = element_text(size = 15),\n",
" legend.position = c(0.8, 0.8)) # Position, color of legend"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-10-06 20:40:44 +02:00
"### ggplot2 - multiplots"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh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17jB5V/T/ws+3udlt6v2uJXyiEyi1GwkUi\nESop4Q9ujaBUo4iIEqiXGtQiBhMlSLXBS6CBaCRoIwb4j8RAEFG0NqJiqghNipRSC7S0YGnp\nbW8/zsNva5dny57dnXbmPM9rktJ9znPmzJnXZ5nO7vuZmZbeN5dgIUCAAAECBAgQIECAAAEC\nBAgQIECAAAECBAgQIECAAIHsBUZlvwd2gAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgRqAgJg3wgECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBBoEAEBcIMU0m4QIECAAAEC\nBAgQIECAAAECBAgQIECAAAECBAgQIEBAAOx7gAABAgQIECBAgAABAgQIECBAgAABAgQIECBA\ngAABAg0iIABukELaDQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECAiAfQ8QIECAAAEC\nBAgQIECAAAECBAgQIECAAAECBAgQIECgQQQEwA1SSLtBgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgACB1qoQdHd3h5UrV4aFCxeGiRMn1qa1ZcuW8Pe//33AKR577LHhmGOOCTt27Air\nV6+u6zN//vzQ1tZW166BAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECjSpQmQB4xYoV\n4b777gsLFizYHwC/8MIL4Sc/+Uk/+66urrBt27awePHiWgC8Zs2acMstt4Tp06f363fmmWcm\nBcAxZLaMXGDcuHGhvb09bN++PfT29o58QCMQIEDg/wu0trbWji+7du1iQoAAgUIFxo8fH+Ix\n5r///W+h4xqMAAEC8WejUaNGhT179sAgQIBAoQJ9F028/vrrhY5rMAIECHR0dISenp6wb98+\nGAQIEChUYPLkySFeBBov6LSMXGD06NFh2rRpgw5UegC8efPmsHz58vDkk0/WTfbUU08NDzzw\nQL/22267Lfz1r38NF198ca193bp14cQTTwx33HFHv36pL+I3nWXkAvEbLv6SI4a/TEfuaQQC\nBP4nEI8v8Reoji3/M/EVAQLFCPR9wMTxpRhPoxAg0F+gpaXF+Ut/Eq8IEChAI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WVwp5Qeqbfqf+vBISkjltjnz3/+c5g8eXJ43/ve\n128Wzz//fO1q340bN+5vj4HuK6+8Et7+DOD9HXxBgAABAgQIECBAgAABAgQIECBAgAABAgQI\nECBAgACBBhXIIgDesGFDOProo+tKcNRRR4WOjo5w5513htdee612Ne+KFStCvB3OueeeW9df\nAwECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBBpZIIsAOF7pG2/tPNCyZMmSsH79+rBw\n4cKwa
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"figure <- ggplot(cats_birds, aes(x = weight, y = speed)) +\n",
" geom_point(size = 5) # We have now object figure, we don't plot\n",
"print(figure) # Plot"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdp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hU5CEkQQlQucp+ZfF1v\nvz2dyUwyM5lJ9rv3/NbzjL33e1nvWr+17Oy9/+9aq2L131JIBAgQIECAAAECBAgQIECAAAEC\nBAgQIECAAAECBAgQIFDyApUlXwMVIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIFM\nQABYRyBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgECZCAgAl0lDqgYBAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQEgPUBAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQI\nlImAAHCZNKRqECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAQABYHyBAgAABAgQIECBA\ngAABAgQIECBAgAABAgQIECBAgECZCAgAl0lDqgYBAgQIECBAgAABAgQIECBAgAABAgQIECBA\ngAABAgQEgPUBAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIlIlAjzKpR6eqcdZZZ8Uj\njzzSZh4DBgyI22+/PVasWBEHHXRQ1NbWxi233NLmeeVwQKr39773vbjpppti2223LYcqqQMB\nAgQIECBAgAABAgS6nYDvv603+VNPPRVXXnll/M///E8MHz48xo4dG0cccUSMHDmy9RNsJUCA\nAAECBAgQIECAQI4FKlb/LeW4fBulaIcddlj85je/afNagwcPjnfffTeWLVsWffr0ic022yxe\nf/31Ns8r9QOee+652HPPPeP999+P//7v/45dd9211Kuk/AQIECBAgAABAgQIEOiWAr7/tmz2\nSy65JE4//fRoaGiIYcOGxZIlS7K/9J3/d7/7Xeywww4tT7KFAAECBAgQIECAAAECORYwArhJ\n41x44YVx9NFHN9nS/Gll5d9nzK6uro7zzz8/+vfv3/yAMnz15z//OY455pgs+FuG1VMlAgQI\nECBAgAABAgQIdEsB33//3uxpNrAU/O3bt29MnTo1Dj744Fi+fHn8/Oc/j4kTJ8a4ceNi7ty5\n0aOHn0+65f8oKk2AAAECBAgQIECgRAV8g2nScIMGDYrNN9+8yZbWn6Yvft/+9rdb31kmW9No\n30mTJsWUKVOioqIiBg4cGAsXLiyT2qkGAQIECBAgQIAAAQIEureA779/b/+rr746G/l7wgkn\nxKc//elsY79+/eIb3/hGXHPNNfGXv/wlHn300fjYxz7WvTuM2hMgQIAAAQIECBAgUFICAsDr\n0Vx1dXXZ3cDpDuEvfvGLzXJIM2o//fTTcffdd8cbb7yRTZ185JFHxv/9v/83pk+fHp/61Key\nqaPTSQ899FCk6ZUPOOCA+MAHPtAsnzS19J133hljxoyJT3ziE9m+hx9+OMvnc5/7XJbXbbfd\nFrvsskukKbzSNFWF9MQTT8SDDz4YL7zwQmyxxRax2267ZXcxp0Bue9MZZ5wRV1xxRRYQ/4//\n+I/44Q9/GPfff397T3ccAQIECBAgQIAAAQIECJSBQLl//03f19ON4F/5yldatNZHP/rRLAA8\nc+ZMAeAWOjYQIECAAAECBAgQIJBnAQHg9WidVatWxb/+679mgdymAeAVK1bEvvvuG4899liW\naxopnEbQXnrppbHjjjvG9ddfHx/84AcbA8A33nhjXHnllXHTTTe1CAA///zz2TXSlNSFAPDN\nN98cP/3pT7ORuGkEcmH55nTdk08+OZum6lvf+lZcfvnl2b6ePXtG2pfSQQcdFNdee20MHz48\ne93Wf9Ld4JMnT46TTjop0t3PEgECBAgQIECAAAECBAh0P4Fy//57yCGHRPpbMy1evDh+//vf\nZ5vTTdsSAQIECBAgQIAAAQIESkng74vallKJN2BZGxoaor6+vtW/tK+tdOKJJ2bB36OOOipe\ne+21WLZsWdx3333x9ttvZ8Hfts5v7/7vf//72TpEKbh8/PHHx4QJE7JTv/vd78Zll10We++9\ndzz77LPZ9dNaRWkqq3vuuSf+5V/+pb2XiB/96Edx5plnCv62W8yBBAgQIECAAAECBAgQKB0B\n339btlUySTNqnXvuudlsXq+88kqcf/75jTdxtzzDFgIECBAgQIAAAQIECORTwAjgJu2Spnxq\nbdqndMiee+6ZrfvT5PBmT9N0zmmE7U477RS/+tWvorLy77H1NHr317/+dey+++7Nju/Mi1Gj\nRsVdd90VvXr1aszmpZdein//93/PvpimqaM32WSTbN+mm24aaU2jNC31vffem53X2t3NjRl5\nQoAAAQIECBAgQIAAAQJlL+D7b8smnj17duyxxx6NOz7/+c/HpEmTGl97QoAAAQIECBAgQIAA\ngVIRE
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"# 1 solution\n",
"print(figure + ggtitle('Figure 1'), \n",
" vp = viewport(x = 0.25, y = 0.75, width = 0.5, height = 0.5))\n",
"print(figure + ggtitle('Figure 2'), \n",
" vp = viewport(x = 0.25, y = 0.25, width = 0.5, height = 0.5))\n",
"print(figure + ggtitle('Figure 3'), \n",
" vp = viewport(x = 0.75, y = 0.5, width = 0.5, height = 1))"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFW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\nvz2dyUwyM5lJ9rv3/NbzjL33e1nvWr+17Oy9/+9aq2L131JIBAgQIECAAAECBAgQIECAAAEC\nBAgQIECAAAECBAgQIFDyApUlXwMVIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIFM\nQABYRyBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgECZCAgAl0lDqgYBAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQEgPUBAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQI\nlImAAHCZNKRqECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAQABYHyBAgAABAgQIECBA\ngAABAgQIECBAgAABAgQIECBAgECZCAgAl0lDqgYBAgQIECBAgAABAgQIECBAgAABAgQIECBA\ngAABAgQEgPUBAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIlIlAjzKpR6eqcdZZZ8Uj\njzzSZh4DBgyI22+/PVasWBEHHXRQ1NbWxi233NLmeeVwQKr39773vbjpppti2223LYcqqQMB\nAgQIECBAgAABAgS6nYDvv603+VNPPRVXXnll/M///E8MHz48xo4dG0cccUSMHDmy9RNsJUCA\nAAECBAgQIECAQI4FKlb/LeW4fBulaIcddlj85je/afNagwcPjnfffTeWLVsWffr0ic022yxe\nf/31Ns8r9QOee+652HPPPeP999+P//7v/45dd9211Kuk/AQIECBAgAABAgQIEOiWAr7/tmz2\nSy65JE4//fRoaGiIYcOGxZIlS7K/9J3/d7/7Xeywww4tT7KFAAECBAgQIECAAAECORYwArhJ\n41x44YVx9NFHN9nS/Gll5d9nzK6uro7zzz8/+vfv3/yAMnz15z//OY455pgs+FuG1VMlAgQI\nECBAgAABAgQIdEsB33//3uxpNrAU/O3bt29MnTo1Dj744Fi+fHn8/Oc/j4kTJ8a4ceNi7ty5\n0aOHn0+65f8oKk2AAAECBAgQIECgRAV8g2nScIMGDYrNN9+8yZbWn6Yvft/+9rdb31kmW9No\n30mTJsWUKVOioqIiBg4cGAsXLiyT2qkGAQIECBAgQIAAAQIEureA779/b/+rr746G/l7wgkn\nxKc//elsY79+/eIb3/hGXHPNNfGXv/wlHn300fjYxz7WvTuM2hMgQIAAAQIECBAgUFICAsDr\n0Vx1dXXZ3cDpDuEvfvGLzXJIM2o//fTTcffdd8cbb7yRTZ185JFHxv/9v/83pk+fHp/61Key\nqaPTSQ899FCk6ZUPOOCA+MAHPtAsnzS19J133hljxoyJT3ziE9m+hx9+OMvnc5/7XJbXbbfd\nFrvsskukKbzSNFWF9MQTT8SDDz4YL7zwQmyxxRax2267ZXcxp0Bue9MZZ5wRV1xxRRYQ/4//\n+I/44Q9/GPfff397T3ccAQIECBAgQIAAAQIECJSBQLl//03f19ON4F/5yldatNZHP/rRLAA8\nc+ZMAeAWOjYQIECAAAECBAgQIJBnAQHg9WidVatWxb/+679mgdymAeAVK1bEvvvuG4899liW\naxopnEbQXnrppbHjjjvG9ddfHx/84AcbA8A33nhjXHnllXHTTTe1CAA///zz2TXSlNSFAPDN\nN98cP/3pT7ORuGkEcmH55nTdk08+OZum6lvf+lZcfvnl2b6ePXtG2pfSQQcdFNdee20MHz48\ne93Wf9Ld4JMnT46TTjop0t3PEgECBAgQIECAAAECBAh0P4Fy//57yCGHRPpbMy1evDh+//vf\nZ5vTTdsSAQIECBAgQIAAAQIESkng74vallKJN2BZGxoaor6+vtW/tK+tdOKJJ2bB36OOOipe\ne+21WLZsWdx3333x9ttvZ8Hfts5v7/7vf//72TpEKbh8/PHHx4QJE7JTv/vd78Zll10We++9\ndzz77LPZ9dNaRWkqq3vuuSf+5V/+pb2XiB/96Edx5plnCv62W8yBBAgQIECAAAECBAgQKB0B\n339btlUySTNqnXvuudlsXq+88kqcf/75jTdxtzzDFgIECBAgQIAAAQIECORTwAjgJu2Spnxq\nbdqndMiee+6ZrfvT5PBmT9N0zmmE7U477RS/+tWvorLy77H1NHr317/+dey+++7Nju/Mi1Gj\nRsVdd90VvXr1aszmpZdein//93/PvpimqaM32WSTbN+mm24aaU2jNC31vffem53X2t3NjRl5\nQoAAAQIECBAgQIAAAQJlL+D7b8smnj17duyxxx6NOz7/+c/HpEmTGl97QoAAAQIECBAgQIAA\ngVIRE
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"# 2 solution\n",
"pushViewport(viewport(layout = grid.layout(2, 2))) # Create layout\n",
"print(figure + ggtitle('Figure 1'), \n",
" vp = viewport(layout.pos.row = 1, layout.pos.col = 1)) # Position 1x1\n",
"print(figure + ggtitle('Figure 2'), \n",
" vp = viewport(layout.pos.row = 2, layout.pos.col = 1)) # Position 2x1\n",
"print(figure + ggtitle('Figure 3'), \n",
" vp = viewport(layout.pos.row = 1:2, layout.pos.col = 2)) # Position (1:2)x2"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45h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t1000j3NEqXpf75z3+eHXfIIYe0H+cFAQIECBAgQIAAAQIECDSegPi39z6/+OKLs6t2\npdsqnXvuub3vbCsBAgQIECBAgAABAgQKJiAB3KFDpkyZEhtuuGGHNX9/udVWW/39TTev0n13\n05IuD
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"# 3 solution - simplest but not so flexible and we need additional library\n",
"grid.arrange(figure + ggtitle('Figure 1'), \n",
" figure + ggtitle('Figure 2'), \n",
" figure + ggtitle('Figure 3'),\n",
" ncol = 2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-10-06 20:40:44 +02:00
"### ggplot2 - szablony"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZm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EYjKIilm1a7SVqm2bJNQQrOb\nkDirBCc0MgaBbfAL4HfPW+e5ZLwzzDCeOffMnOee+znS4Lnnnuc5z/P5HY7uvd855zZGx5aw\nECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgEDbC3S1/QxMgAABAgQIECBAgAABAgQI\nECBAgAABAgQIECBAgAABAgSaAgJgBwIBAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgRq\nIiAArkkhTYMAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQICYMcAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIEaiIgAK5JIU2DAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECAmDHAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBGoiIACuSSFNgwABAgQIECBA\ngAABAgQIECBAgAABAgQIECBAgAABAj25EAwPD8emTZti/fr1MTAw0BzWSy+9FD/72c+mHeKa\nNWvivPPOi/3798eTTz45ZZsrrrgient7p6y3ggABAgQIECBAgAABAgQIECBAgAABAgQIECBA\ngAABAnUVyCYA3rhxYzzyyCNx1VVXHQ+An3vuufjmN785yX5oaCj27NkTt956azMA3rJlS9x5\n552xcuXKSdtddtllJwyAN2/eHPfdd9+kdh7MTmBkZCQajUbzZ3YtbEWAQCcJjI6OOj90UsHN\nlcAcBNJriLR0dbkRzRzYbEqgYwTSOcL5oWPKbaIE5iTgNcScuGxMoOMEfA7RcSU3YQKzFkjn\nh/TjfcasySZt+O53vzu+8pWvTFrnQXsIVB4A79q1K+6+++546qmnpohdcskl8eijj05a/2d/\n9mfxk5/8JK699trm+meeeSbWrVsX995776TtZvMgXT18ww03xCc/+cnZbG6b3wkcO3Ys9u7d\nG0uXLo2TTz6ZCwECBCYJDA4OxoEDB2L58uWT1ntAgACBJLBz587mH+mdeuqpQAgQIDBFIN0F\n6vTTT5+y3goCBAikiwHSe41Vq1b5Y1OHAwECUwT27dsXJ5100gkvCJrS0AoCBGovkHKggwcP\nNj+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sQ6DiBdG5OLwyc\nHzqu9CZMYNYC6TzhHDFrLhsS6CgB54eOKrfJEpiTQDo/pCW9hhj/fU4d2JgAgVoLpM8hUrAj\n3Kl1mU2OQCGB8St/0x+j+yxiboTpnOp119zMctq6K6fBvNlYfvzjH8cpp5wS73znOydt8uyz\nzzav9
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"figure <- ggplot(cats_birds, aes(x = weight, y = speed, color = group)) +\n",
" geom_point(size = 5)\n",
"figure + theme_bw() # White background and grey lines"
]
},
{
"cell_type": "code",
2021-03-21 13:24:35 +01:00
"execution_count": 41,
2021-03-21 13:14:16 +01:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFWpz7EV6mel0L9Xy23FMYlPYZ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zf43Pve3xf278rDXPvuec873N/j5FG859zTm2o/ggPAgQI\nECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIEDjgBToO+E/gAxAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIBAQ0AA7B8CAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIEDhIB\nAfBBMkgfgwABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgJg/wYIECBAgAABAgQIECBA\ngAABAgQIECBAgAABAgQIECBwkAgIgA+SQfoYBAgQIECAAAECBAgQIECAAAECBAgQIECAAAEC\nBAgQ6CpD8OCDD8aWLVtiyZIlI4fdddddsXHjxpHX731y6qmnxmmnnRbPP/98PPTQQ+99q/F8\n6dKlcdhhh+2y3QYCBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQKC+wzwFwX19fLF++\nPObOnTtqlccffzxeeOGFUduKF9u3b4/DDz+8EQA/9dRTcffdd8fkyZNH7XfppZcKgEeJVPti\nx44d0d/f35hLtSupToAAAQIECBDYPwK/+93vYvz48dHd3b1/FrQKAQIECBAgQKBigTfffDOm\nTp0aHR0u3FcxtfIECBAgQIDAfhAYHByMrVu3xrRp0/bDapYYFhgzAN68eXOsXLkynnjiiVi3\nbt0uAfC3vvWt4Voj31etWhV33HFHfPKTn2xsW79+fVx44YVx+eWXj+zjyf4XeOONN+Ltt9+O\nRYsW7f/FrUiAAAECBAgQqEDgN7/5TRx77LExY8aMCqorSYAAAQIECBDY/wKrV6+OM8880x+4\n7X96KxIgQIAAAQIVCBQnmBY/35x77rkVVFdyTwJj/ilhcdZokczPnz8/pkyZsqc6I9uLwPjW\nW2+NL3/5yyNn/L7++usxa9askX08IUCAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIH0\nAmOeAVwEt8uWLWusfM0114zZwU033RTFvX9PPvnkkX1fe+21xr2Db7nllnjrrbdi3rx5cfHF\nF8eECRNG9vGEAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBFoTGDMALlP+5z//eTz9\n9NNx++23jxxWnNpdnBV8zz33xNlnn924fM2dd94Z999/f9x8880xadKkkX13fvLLX/4yXnnl\nlZ03e92kQHGd9aGhocalvJss4TACBAgQIECAQFYC/f39Ufyx4TPPPJNVX5ohQIAAAQIECDQr\nUPwurbi9Wq1Wa7aE4wgQIECAAAEC2QgUuVTx+5t77703m54OhkZOO+20OProo/f4UZIGwD/+\n8Y8b9/ot7sM2/BgYGIgrrrgizjjjjJg+fXpj80UXXRRXXnll3HXXXbF06dLhXXf5vnDhwii+\nPNIIFGF6cQ/gE088MU1BVQgQIECAAAECbRYo7iHjHsBtHoLlCRAgQIAAgaQCDzzwQHzsYx9z\nD+CkqooRIECAAAEC7RLo6emJn/3sZ3HOOee0q4WDct2x/lgwWQD87LPPxnPPPRdf+MIXRkEW\nl3levHjxqG0LFiyIOXPmxNq1a0dt3/nFWM3vvL/X+ybAdd+c7EWAAAECBAjkL1D8XDP8lX+3\nOiRAgAABAgQI7JuAn2/2zcleBAgQIECAQP4Cw5nU8Pf8Oz44OuxI9THuu+++xr19586dO6rk\nk08+GTfccEO88847I9t7e3tj48aNI2cEj7zhCQECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAg0LZAsAC7u/Xv66afv0siRRx4ZxaVrbr311sY1vjds2BC33XZbFKd8X3DBBbvsbwMB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQINCeQ5BLQxb1lN23atNv79X7gAx+Iq666\nKlasWBFLliyJ4p7AkyZNimuvvbZxGejm2nYUAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAA\nAQIECOwsUCoAvvHGG3c+vvF69uzZce+99+72vWLj+eef3/h69dVXY3BwMGbOnBmdnZ173N8b\nBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIFBeoFQAXL786CNmzZo1eoNXBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIJBMINk9gJN1pBABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQINCUgAG6KzUEECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBDIT0AA\nnN9Md
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"figure + theme_excel_new() # Excel"
]
},
{
"cell_type": "code",
2021-03-21 13:24:35 +01:00
"execution_count": 42,
2021-03-21 13:14:16 +01:00
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFWpz7EV6mel0L9Xy23FMYlPYZenAx0\nyDB1/PX6dledmQjikjkXCxqMJS9WtfFCyH9XtSekEF+2dH+P4tzITduTygGfv58a5VCTH5Pt\nXD7EFZiNyUDBhHnsFTBgE0SQIA9pfFtgo6cKGuhooeilaKH41eDs38Ip+f4At1Rq/sjr6NEw\nQqb/I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WKm\niNsECEwJpNcRjg9TGn4SIDBTYOq9iHSMcAnomTJuEyCQBNL7EOl93o6OZT/fSUMIEMhMYOoq\nQ+lS0ClnspQT6OnpmT4hs9yWRi+3wLIHwCn8Xcjyve99Lw4fPhwf+chHpocPDQ3FwYMHY+PG\njbFjx4645pprmpeMvv3222P37t2xevXq6bGz3RAAz6ay8PtcfmnhVkYSaEcBH7Bpx66bM4GF\nCaSAxzFiYVZGEWhHAceHduy6ORNYuEB689ZCgACB2QTSd3xaCBAgUCRw+vTpolXun0dgxYoV\n84ywOkeBZQ+AF4qSLv383ve+Ny6++OLpTVLA++ijj8bAwECkTyGkZevWrXHLLbfE448/Pv09\nwdMbvOZGV1fXWft7zWq/Fgik4Dd94jb9R9/X11cwyt0ECLSrQPrUbXpTpr+/v10JzJsAgTkE\nBgcHI70GW7t27RyjrCJAoF0Fjhw50vz7rl3nb94ECBQLvPLKK80z/NJ7QM4ALnayhkC7CqT3\nKletWtX8W6NdDcybAIHZBdL7lOkDIum9yu7u7tkHubdQwJUVCmmyX1GJAPi5556LvXv3xv33\n338WaHrBn87+nbls2rQpLrnkkjhw4MDMu2e9nZ64U8HxrAPcOadAZ2cnvzmFrCTQngLp2Oz4\n2p69N2sCCxVIxwmvwRaqZRyB9hJwfGivfpstgTIC6fiQlvQaYup2me2NJUCg3gLpfYgU7Ah3\n6t1nsyOwGIGpM3/Th9G9F7EYQdtUVaASX4rw4x//OC666KJ4+9vffpbzs88+2zzb9/nnn5++\nPwW/L7/8cizkO4CnN3KDAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECNRCoRAC8f//+\nuPzyy8/hvuyyy5qXIX7wwQfj6NGjzbN+d+3aFevWrYvrrrvunPHuIECAAAECBAgQIECAAAEC\nBAgQIECAAAECBAgQIECAQJ0FKhEApzN906WdZ1vuvPPOeOaZZ2L79u2xY8eOeOGFF5qXik7f\n+WAhQ
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"figure + theme_minimal() # Simple"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [
{
"data": {
2021-10-06 20:40:44 +02:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuUEcBiN2F2Kw4yiLiZQD+FcWyXYAEQfvICddi+AnEO2ycIOISw7UA\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFWpz7EV6mel0L9Xy23FMYlPYZenAx0\nyDB1/PX6dledmQjikjkXCxqMJS9WtfFCyH9XtSekEF+2dH+P4tzITduTygGfv58a5VCTH5Pt\nXD7EFZiNyUDBhHnsFTBgE0SQIA9pfFtgo6cKGuhooeilaKH41eDs38Ip+f4At1Rq/sjr6NEw\nQqb/I/DQqsLvaFUjvAx+eWirddAJZnAj1DFJL0mSg/gcIpPkMBkhoyCSJ8lTZIxk0TpKDjXH\nliJzZPO50dR5ASNSnzeLvIvod0HG/mdkmOC0z8VKnzcQ2M/Yz2vKldduXjp9bleLu0ZWn7vW\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ABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgACBLiIgAO4iD9JtECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAQADsN0CA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIEuIiAA7iIP0m0QIECAAAECBAgQIECAAAEC\nBAgQIECAAAECBAgQIEBAAOw3QIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgS4iIADu\nIg/SbRAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQEAA7DdAgAABAgQIECBAgAABAgQI\nECBAgAABAgQIECBAgACBLiIgAO4iD9JtECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBA\nQADsN0CAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIEuIiAA7iIP0m0QIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIEBAAOw3QIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAA\ngS4iIADuIg/SbRAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQEAA7DdAgAABAgQIECBA\ngAABAgQIECBAgAABAgQIECBAgACBLiIgAO4iD9JtECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAQADsN0CAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIEuIiAA7iIP0m0QIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIEBAAOw3QIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAgS4iIADuIg/SbRAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQEAA7DdAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgACBLiIgAO4iD9JtECBAgAABAgQIECBAgAABAgQI\nECBAgAABAgQIECBAQADsN0CAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIEuIiAA7iIP\n0m0QIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIEBAAOw3QIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAgS4iIADuIg/SbRAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQEAA\n7DdAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgACBLiIgAO4iD9JtECBAgAABAgQIECBA\ngAABAgQIECBAgAABAgQIECBAQADsN0CAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIEu\nIlDZRe7DbRAgQIAAAQIECBAgQIDAkihQVxfdJ4yP3q+/GpUfTI2y2tqo6dU75q4wNGatMjLq\nunVfElUyvedZNTXxxMwZMW7unJhRXR1V5eWxXFVVbNBnqVi5R89M+1KMAAECBAgQIECAAAEC\nBNouUPb4uAl1bS+jAgECBAgQIECAAAECBAgQ6ECBJJRc+sl/x8Axd0TFnNlRV1EZZcmxqKst\n7Cc7UZaEw9PX3Sje22G3qOm7dAcOrmt0NfHDeXHFOxPj4ekfREVZWeGm5iemFcle+j3d719Z\nFYcsNzi2X7pflH/cpmvcvbsgQIAAAQIECBAgQIBA5xUQAHfeZ2fkBAgQIECAAAECBAgQWCIF\nKj+YFkOvujiqpr4f5Wnou4ittiKNKyMm7fvVmLH2+otoWfypu2/7R3wwbVqTC7r36BErjVg1\nRqw2Mnr17t3kfHrgpef/G88/83Ssvtbasc4GGzXbpiUHx73ycjz1n3/HKkmfG2z6mZZcusi2\no6e8H3+YOD7S90ZVL7JlRBK9x4iePeLEFUfE0pXZLzRWncw6/teYu+OFZ5+OSW+/Hd2TWcfD\nVlopNtty61hj7XUXMzqnCRAgQIAAAQIECBAgsOQJZP9fZkueoTsmQIAAAQIECBAgQIAAgQ4S\nqHp/c
2021-03-21 13:14:16 +01:00
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"figure + theme_economist() # Economist (newspapper)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-10-06 20:40:44 +02:00
"# Zadania"
2021-03-21 13:14:16 +01:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Zbiory danych dla zadań 1-8 znajdują się w pakiecie *PogromcyDanych* (wersja angielska).\n",
"\n",
"1. Dla zbioru danych *cats\\_birds* przedstaw zależność pomiędzy zmiennymi *length* oraz *speed* na wykresie rozrzutu. Dodaj trend liniowy do wykresu. Obie grupy zwierząt powinny mieć własną prostą regresji oraz typ i kolor punktów.\t\n",
"\n",
"2. W zbiorze danych *pearson* mamy informacje o wzroście ojców i synów. Przedstaw zależność pomiędzy tymi cechami na wykresie rozrzutu. Dodaj trend liniowy bez przedziału ufności.\n",
"\n",
"3. W zbiorze danych *seriesIMDB* mamy informacje o odcinkach około 200 seriali. Stwórz wykres, w którym na osi Y będzie nazwa serialu, a na osi X wykres pudełkowy ocen odcinków danego serialu. Popraw wykres tak, aby seriale były posortowane według median ocen.\t\n",
"\n",
"4. W zbiorze danych *diagnosis* mamy zmienną *eduk4\\_2013* z poziomami edukacji i zmienną *gp29* z odpowiedziami na pytanie co jest najważniejsze w życiu. Stwórz wykres słupkowy. Każdy słupek odpowiada jednemu poziomowi edukacji. Każdy słupek powinien być podzielony na części wypełnione różnymi kolorami w zależności od zmiennej *gp29*.\n",
"\n",
"5. Ze zbioru *auta2012* wybierz jedynie auta Volkswagen Passat. Użyj funkcji *geom\\_smooth()*, aby przedstawić zależność pomiędzy rokiem produkcji i ceną. Spróbuj zastosować różne szablony wykresu.\t\n",
"\n",
"6. Zmień poniższy wykres:\n",
"\n",
"\tggplot(cats_birds, aes(x = weight, y = speed, size = lifespan, color = lifespan)) + geom_point()\n",
"\n",
" Zastąp skalę kolorów na gradient od koloru zielonego do czerwonego i zastąp kropki kwadratami. Dodaj tytuł i etykiety osi.\n",
"\n",
"7. Ze zbioru danych *auta2012* wybierz wszystkie samochody marki Toyota. Na wykresie kołowym zwizualizuj liczbę pięciu najpopularniejszych modeli. Następnie te same dane przedstaw na wykresie słupkowym w kolejności malejących liczebności. Nie zapomnij o legendzie.\t\n",
"\n",
"8. Dla wzrostu synów i ojców ze zbioru danych *pearson* narysuj na jednym wykresie histogram wraz z nieparametryczną oceną gęstości dla każdej cechy. Linie pomiędzy słupkami histogramu pokoloruj na biało. Oba wykresy powinny być obok siebie na jednym diagramie.\n",
"\n",
"9. Dla zbioru danych *iris* przygotuj obrazek jak na poniższym rysunku. Rozważ użycie funkcji *geom\\_density2d()* oraz *theme\\_light()*.\n",
"\n",
2021-03-21 13:20:29 +01:00
"<img src=\"figs/Lab2_1.png\" width=\"600\">\n",
2021-03-21 13:14:16 +01:00
"\n",
"10. Dla zbioru danych *iris* przygotuj obrazek jak na poniższym rysunku.\n",
"\n",
2021-03-21 13:20:29 +01:00
"<img src=\"figs/Lab2_2.png\" width=\"600\">\n",
2021-03-21 13:14:16 +01:00
"\n",
"11. Dla zbioru danych *mtcars* przygotuj obrazek jak na poniższym rysunku.\n",
"\n",
2021-03-21 13:20:29 +01:00
"<img src=\"figs/Lab2_3.png\" width=\"600\">\n",
2021-03-21 13:14:16 +01:00
"\n",
"12. Dla zbioru danych *economics* z pakietu *ggplot2* przygotuj obrazek jak na poniższym rysunku. Wykorzystaj szablon *theme\\_economist\\_white()* z pakietu *ggthemes*.\n",
"\n",
2021-03-21 13:20:29 +01:00
"<img src=\"figs/Lab2_4.png\" width=\"600\">"
2021-03-21 13:14:16 +01:00
]
}
],
"metadata": {
"kernelspec": {
"display_name": "R",
"language": "R",
"name": "ir"
},
"language_info": {
"codemirror_mode": "r",
"file_extension": ".r",
"mimetype": "text/x-r-source",
"name": "R",
"pygments_lexer": "r",
2021-09-28 10:12:43 +02:00
"version": "4.1.1"
},
"metadata": {
"author": "Tomasz Górecki",
"email": "tomasz.gorecki@amu.edu.pl",
"lang": "pl",
"subtitle": "3-6. Biblioteka ggplot2 [laboratoria]",
"title": "Wizualizacja danych",
"year": "2021"
2021-03-21 13:14:16 +01:00
}
},
"nbformat": 4,
"nbformat_minor": 4
}