aitech-wizualizacja/01.ipynb

1731 lines
1.3 MiB
Plaintext
Raw Normal View History

2021-03-07 15:19:50 +01:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Wizualizacja danych"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"library(repr) # To resize plots in Jupyter\n",
"options(repr.plot.width = 16, repr.plot.height = 9)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Wprowadznie do grafiki w R"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
2021-03-10 11:38:01 +01:00
"R dysponuje bardzo dużymi możliwościami w zakresie graficznej prezentacji uzyskanych wyników. Aby jednak w pełni korzystać z jego możliwości zapoznamy się wpierw z systemem prezentacji grafiki. Bazowy system graficzny dzieli każdą stronę na trzy główne obszary: marginesy zewnętrzne (*ang. outer margins*), obszar rysunku (*ang. figure region*) oraz obszar kreślenia (*ang. plot region*). Obszar jaki uzyskujemy po odrzuceniu marginesów zewnętrznych nazywany jest obszarem wewnętrznym (*ang. inner region*)."
2021-03-07 15:19:50 +01:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"figs/Rgrafika.png\" width=\"400\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Obszar na zewnątrz obszaru kreślenia, ale wewnątrz obszaru rysunku nazywa się marginesami rysunku (*ang. figure margins*). Większość funkcji rysujących wykorzystuje obszar kreślenia do rysowania symboli graficznych oraz linii, natomiast osie oraz etykiety nanoszone są na marginesach rysunku lub marginesach zewnętrznych. Rozmiar oraz położenie marginesów kontrolowane są za pomocą funkcji <font color='red'>par</font>. Polecenia graficzne w R można podzielić na trzy typy: funkcje wysokiego poziomu, funkcje niskiego poziomu oraz funkcje parametrów graficznych."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Funkcje wysokiego poziomu"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Tworzą nowy wykres:\n",
"\n",
"- <font color='red'>plot</font> - wykres punktowy, najpopularniejsza funkcja graficzna, przeciążona praktycznie dla każdego obiektu,\n",
"- <font color='red'>curve</font> - wykres funkcji.\n",
"\n",
"Każda funkcja wysokiego poziomu może zostać wywołana z parametrami:\n",
"\n",
"- add = FALSE - jeżeli TRUE, nakłada wykres na już istniejący,\n",
"- axes = TRUE - jeżeli FALSE, nie rysuje osi i pudełka naokoło,\n",
"- type = 'p' - określa rodzaj wykresu. Główne typy to: 'p' - punkty, 'l' - linie bez punktów, 'b' - punkty połączone za pomocą linii, 'o' - linie oraz punkty na nich leżące, 'h' - linie pionowe, 's' oraz 'S' - linie łączą punkty (najpierw w poziomie potem w pionie lub na odwrót), 'n' - pusty wykres,\n",
2021-03-10 11:46:32 +01:00
"- xlim, ylim - określa początek i koniec osi,\n",
"- xlab, ylab - tytuły osi,\n",
"- main - tytuł wykresu,\n",
"- sub - podtytuł (mniejsza czcionka).\n"
2021-03-07 15:19:50 +01:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"figs/type.png\" width=\"400\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Funkcje niskiego poziomu"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Funkcje takie dodają pewne elementy do już istniejącego wykresu:\n",
"\n",
"- abline(a, b) - rysuje prostą $y=ax+b$,\n",
"- arrows(x0, y0, x1, y1) - dodaje strzałkę,\n",
2021-03-10 11:46:32 +01:00
"- legend(x, y, legend = 'legenda') - dodaje legendę,\n",
2021-03-07 15:19:50 +01:00
"- lines(x, y) - rysuje linię,\n",
"- points(x, y) - rysuje punkty,\n",
"- poly(x, y) - rysuje wielokąt,\n",
"- rect(x0, y0, x1, y1) - rysuje prostokąt,\n",
2021-03-10 11:46:32 +01:00
"- text(x, y, label = 'tekst') - dodaje 'tekst' w punkcie (x, y). Możemy dodawać opisy matematyczne (i nie tylko), których składnia opiera się na wewnętrznym systemie R zbliżonym do TEXa,\n",
"- title('tytuł') - dodaje tytuł."
2021-03-07 15:19:50 +01:00
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Funkcje parametrów graficznych"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Zmieniają oraz poprawiają wygląd okna graficznego. Większość ustawień jest kontrolowana poprzez funkcję <font color='red'>par</font>, która wywołana bez parametrów wyświetla bieżące ustawienia okna. Jedną z najważniejszych opcji oferowanych przez <font color='red'>par</font> jest podział okna graficznego. Uzyskujemy to za pomocą opcji <font color='red'>mfrow</font> oraz <font color='red'>mfcol</font>. W tym pierwszym przypadku obrazki rysowane są po wierszach, w drugim po kolumnach. Bardziej skomplikowane układy mogą być uzyskane za pomocą poleceń <font color='red'>split.screen</font> oraz <font color='red'>layout</font>."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Podstawowe parametry graficzne"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"- adj - Wyrównanie tekstu, 0 - do lewej, 0.5 - do środka, 1 - do prawej.\n",
"- bg - Kolor tła.\n",
"- bty - Kontroluje rodzaj obramowania rysunku. Dopuszczalne wartości to: 'n', 'o', 'l', '7', 'c', 'u', ']', gdzie 'n' oznacza brak obramowania, natomiast pozostałe parametry określają typy obramowania zgodne z wyglądem znaków, np. : 'u' - wszystkie linie poza górną.\n",
"- cex - Wielkość powiększenia symboli i tekstu.\n",
"- col - Kolor punktów, linii, tekstu oraz wypełnionych obrazków. Do kolorów można się odwoływać za pomocą nazwy lub korzystając z modelu RGB. Wszystkie 657 nazw kolorów możemy wyświetlić za pomocą funkcji <font color='red'>colors</font>.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"figs/paleta.png\" width=\"300\">"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<style>\n",
".list-inline {list-style: none; margin:0; padding: 0}\n",
".list-inline>li {display: inline-block}\n",
".list-inline>li:not(:last-child)::after {content: \"\\00b7\"; padding: 0 .5ex}\n",
"</style>\n",
"<ol class=list-inline><li>'white'</li><li>'aliceblue'</li><li>'antiquewhite'</li><li>'antiquewhite1'</li><li>'antiquewhite2'</li><li>'antiquewhite3'</li><li>'antiquewhite4'</li><li>'aquamarine'</li><li>'aquamarine1'</li><li>'aquamarine2'</li><li>'aquamarine3'</li><li>'aquamarine4'</li><li>'azure'</li><li>'azure1'</li><li>'azure2'</li><li>'azure3'</li><li>'azure4'</li><li>'beige'</li><li>'bisque'</li><li>'bisque1'</li><li>'bisque2'</li><li>'bisque3'</li><li>'bisque4'</li><li>'black'</li><li>'blanchedalmond'</li><li>'blue'</li><li>'blue1'</li><li>'blue2'</li><li>'blue3'</li><li>'blue4'</li><li>'blueviolet'</li><li>'brown'</li><li>'brown1'</li><li>'brown2'</li><li>'brown3'</li><li>'brown4'</li><li>'burlywood'</li><li>'burlywood1'</li><li>'burlywood2'</li><li>'burlywood3'</li><li>'burlywood4'</li><li>'cadetblue'</li><li>'cadetblue1'</li><li>'cadetblue2'</li><li>'cadetblue3'</li><li>'cadetblue4'</li><li>'chartreuse'</li><li>'chartreuse1'</li><li>'chartreuse2'</li><li>'chartreuse3'</li><li>'chartreuse4'</li><li>'chocolate'</li><li>'chocolate1'</li><li>'chocolate2'</li><li>'chocolate3'</li><li>'chocolate4'</li><li>'coral'</li><li>'coral1'</li><li>'coral2'</li><li>'coral3'</li><li>'coral4'</li><li>'cornflowerblue'</li><li>'cornsilk'</li><li>'cornsilk1'</li><li>'cornsilk2'</li><li>'cornsilk3'</li><li>'cornsilk4'</li><li>'cyan'</li><li>'cyan1'</li><li>'cyan2'</li><li>'cyan3'</li><li>'cyan4'</li><li>'darkblue'</li><li>'darkcyan'</li><li>'darkgoldenrod'</li><li>'darkgoldenrod1'</li><li>'darkgoldenrod2'</li><li>'darkgoldenrod3'</li><li>'darkgoldenrod4'</li><li>'darkgray'</li><li>'darkgreen'</li><li>'darkgrey'</li><li>'darkkhaki'</li><li>'darkmagenta'</li><li>'darkolivegreen'</li><li>'darkolivegreen1'</li><li>'darkolivegreen2'</li><li>'darkolivegreen3'</li><li>'darkolivegreen4'</li><li>'darkorange'</li><li>'darkorange1'</li><li>'darkorange2'</li><li>'darkorange3'</li><li>'darkorange4'</li><li>'darkorchid'</li><li>'darkorchid1'</li><li>'darkorchid2'</li><li>'darkorchid3'</li><li>'darkorchid4'</li><li>'darkred'</li><li>'darksalmon'</li><li>'darkseagreen'</li><li>'darkseagreen1'</li><li>'darkseagreen2'</li><li>'darkseagreen3'</li><li>'darkseagreen4'</li><li>'darkslateblue'</li><li>'darkslategray'</li><li>'darkslategray1'</li><li>'darkslategray2'</li><li>'darkslategray3'</li><li>'darkslategray4'</li><li>'darkslategrey'</li><li>'darkturquoise'</li><li>'darkviolet'</li><li>'deeppink'</li><li>'deeppink1'</li><li>'deeppink2'</li><li>'deeppink3'</li><li>'deeppink4'</li><li>'deepskyblue'</li><li>'deepskyblue1'</li><li>'deepskyblue2'</li><li>'deepskyblue3'</li><li>'deepskyblue4'</li><li>'dimgray'</li><li>'dimgrey'</li><li>'dodgerblue'</li><li>'dodgerblue1'</li><li>'dodgerblue2'</li><li>'dodgerblue3'</li><li>'dodgerblue4'</li><li>'firebrick'</li><li>'firebrick1'</li><li>'firebrick2'</li><li>'firebrick3'</li><li>'firebrick4'</li><li>'floralwhite'</li><li>'forestgreen'</li><li>'gainsboro'</li><li>'ghostwhite'</li><li>'gold'</li><li>'gold1'</li><li>'gold2'</li><li>'gold3'</li><li>'gold4'</li><li>'goldenrod'</li><li>'goldenrod1'</li><li>'goldenrod2'</li><li>'goldenrod3'</li><li>'goldenrod4'</li><li>'gray'</li><li>'gray0'</li><li>'gray1'</li><li>'gray2'</li><li>'gray3'</li><li>'gray4'</li><li>'gray5'</li><li>'gray6'</li><li>'gray7'</li><li>'gray8'</li><li>'gray9'</li><li>'gray10'</li><li>'gray11'</li><li>'gray12'</li><li>'gray13'</li><li>'gray14'</li><li>'gray15'</li><li>'gray16'</li><li>'gray17'</li><li>'gray18'</li><li>'gray19'</li><li>'gray20'</li><li>'gray21'</li><li>'gray22'</li><li>'gray23'</li><li>'gray24'</li><li>'gray25'</li><li>'gray26'</li><li>'gray27'</li><li>'gray28'</li><li>'gray29'</li><li>'gray30'</li><li>'gray31'</li><li>'gray32'</li><li>'gray33'</li><li>'gray34'</li><li>'gray35'</li><li>'gray36'</li><li>'gray37'</li><li>'gray38'</li><li>'gray39'</li><li>'gray40'</li><li>'gray41'</li><li>'gray42'</li><li>'gray43'</li><li>'gray44'</li><li>'gray45'</li><li>'gray46'</li><li>'gray47'</li><li>⋯</li><li>'maroon3'</li><li>'maroon4'</li><li>'mediumaquamarine'</li><li>'mediumblue'</li><li>'mediumorchid'</li><li>'mediumorchid1'</li><
],
"text/latex": [
"\\begin{enumerate*}\n",
"\\item 'white'\n",
"\\item 'aliceblue'\n",
"\\item 'antiquewhite'\n",
"\\item 'antiquewhite1'\n",
"\\item 'antiquewhite2'\n",
"\\item 'antiquewhite3'\n",
"\\item 'antiquewhite4'\n",
"\\item 'aquamarine'\n",
"\\item 'aquamarine1'\n",
"\\item 'aquamarine2'\n",
"\\item 'aquamarine3'\n",
"\\item 'aquamarine4'\n",
"\\item 'azure'\n",
"\\item 'azure1'\n",
"\\item 'azure2'\n",
"\\item 'azure3'\n",
"\\item 'azure4'\n",
"\\item 'beige'\n",
"\\item 'bisque'\n",
"\\item 'bisque1'\n",
"\\item 'bisque2'\n",
"\\item 'bisque3'\n",
"\\item 'bisque4'\n",
"\\item 'black'\n",
"\\item 'blanchedalmond'\n",
"\\item 'blue'\n",
"\\item 'blue1'\n",
"\\item 'blue2'\n",
"\\item 'blue3'\n",
"\\item 'blue4'\n",
"\\item 'blueviolet'\n",
"\\item 'brown'\n",
"\\item 'brown1'\n",
"\\item 'brown2'\n",
"\\item 'brown3'\n",
"\\item 'brown4'\n",
"\\item 'burlywood'\n",
"\\item 'burlywood1'\n",
"\\item 'burlywood2'\n",
"\\item 'burlywood3'\n",
"\\item 'burlywood4'\n",
"\\item 'cadetblue'\n",
"\\item 'cadetblue1'\n",
"\\item 'cadetblue2'\n",
"\\item 'cadetblue3'\n",
"\\item 'cadetblue4'\n",
"\\item 'chartreuse'\n",
"\\item 'chartreuse1'\n",
"\\item 'chartreuse2'\n",
"\\item 'chartreuse3'\n",
"\\item 'chartreuse4'\n",
"\\item 'chocolate'\n",
"\\item 'chocolate1'\n",
"\\item 'chocolate2'\n",
"\\item 'chocolate3'\n",
"\\item 'chocolate4'\n",
"\\item 'coral'\n",
"\\item 'coral1'\n",
"\\item 'coral2'\n",
"\\item 'coral3'\n",
"\\item 'coral4'\n",
"\\item 'cornflowerblue'\n",
"\\item 'cornsilk'\n",
"\\item 'cornsilk1'\n",
"\\item 'cornsilk2'\n",
"\\item 'cornsilk3'\n",
"\\item 'cornsilk4'\n",
"\\item 'cyan'\n",
"\\item 'cyan1'\n",
"\\item 'cyan2'\n",
"\\item 'cyan3'\n",
"\\item 'cyan4'\n",
"\\item 'darkblue'\n",
"\\item 'darkcyan'\n",
"\\item 'darkgoldenrod'\n",
"\\item 'darkgoldenrod1'\n",
"\\item 'darkgoldenrod2'\n",
"\\item 'darkgoldenrod3'\n",
"\\item 'darkgoldenrod4'\n",
"\\item 'darkgray'\n",
"\\item 'darkgreen'\n",
"\\item 'darkgrey'\n",
"\\item 'darkkhaki'\n",
"\\item 'darkmagenta'\n",
"\\item 'darkolivegreen'\n",
"\\item 'darkolivegreen1'\n",
"\\item 'darkolivegreen2'\n",
"\\item 'darkolivegreen3'\n",
"\\item 'darkolivegreen4'\n",
"\\item 'darkorange'\n",
"\\item 'darkorange1'\n",
"\\item 'darkorange2'\n",
"\\item 'darkorange3'\n",
"\\item 'darkorange4'\n",
"\\item 'darkorchid'\n",
"\\item 'darkorchid1'\n",
"\\item 'darkorchid2'\n",
"\\item 'darkorchid3'\n",
"\\item 'darkorchid4'\n",
"\\item 'darkred'\n",
"\\item 'darksalmon'\n",
"\\item 'darkseagreen'\n",
"\\item 'darkseagreen1'\n",
"\\item 'darkseagreen2'\n",
"\\item 'darkseagreen3'\n",
"\\item 'darkseagreen4'\n",
"\\item 'darkslateblue'\n",
"\\item 'darkslategray'\n",
"\\item 'darkslategray1'\n",
"\\item 'darkslategray2'\n",
"\\item 'darkslategray3'\n",
"\\item 'darkslategray4'\n",
"\\item 'darkslategrey'\n",
"\\item 'darkturquoise'\n",
"\\item 'darkviolet'\n",
"\\item 'deeppink'\n",
"\\item 'deeppink1'\n",
"\\item 'deeppink2'\n",
"\\item 'deeppink3'\n",
"\\item 'deeppink4'\n",
"\\item 'deepskyblue'\n",
"\\item 'deepskyblue1'\n",
"\\item 'deepskyblue2'\n",
"\\item 'deepskyblue3'\n",
"\\item 'deepskyblue4'\n",
"\\item 'dimgray'\n",
"\\item 'dimgrey'\n",
"\\item 'dodgerblue'\n",
"\\item 'dodgerblue1'\n",
"\\item 'dodgerblue2'\n",
"\\item 'dodgerblue3'\n",
"\\item 'dodgerblue4'\n",
"\\item 'firebrick'\n",
"\\item 'firebrick1'\n",
"\\item 'firebrick2'\n",
"\\item 'firebrick3'\n",
"\\item 'firebrick4'\n",
"\\item 'floralwhite'\n",
"\\item 'forestgreen'\n",
"\\item 'gainsboro'\n",
"\\item 'ghostwhite'\n",
"\\item 'gold'\n",
"\\item 'gold1'\n",
"\\item 'gold2'\n",
"\\item 'gold3'\n",
"\\item 'gold4'\n",
"\\item 'goldenrod'\n",
"\\item 'goldenrod1'\n",
"\\item 'goldenrod2'\n",
"\\item 'goldenrod3'\n",
"\\item 'goldenrod4'\n",
"\\item 'gray'\n",
"\\item 'gray0'\n",
"\\item 'gray1'\n",
"\\item 'gray2'\n",
"\\item 'gray3'\n",
"\\item 'gray4'\n",
"\\item 'gray5'\n",
"\\item 'gray6'\n",
"\\item 'gray7'\n",
"\\item 'gray8'\n",
"\\item 'gray9'\n",
"\\item 'gray10'\n",
"\\item 'gray11'\n",
"\\item 'gray12'\n",
"\\item 'gray13'\n",
"\\item 'gray14'\n",
"\\item 'gray15'\n",
"\\item 'gray16'\n",
"\\item 'gray17'\n",
"\\item 'gray18'\n",
"\\item 'gray19'\n",
"\\item 'gray20'\n",
"\\item 'gray21'\n",
"\\item 'gray22'\n",
"\\item 'gray23'\n",
"\\item 'gray24'\n",
"\\item 'gray25'\n",
"\\item 'gray26'\n",
"\\item 'gray27'\n",
"\\item 'gray28'\n",
"\\item 'gray29'\n",
"\\item 'gray30'\n",
"\\item 'gray31'\n",
"\\item 'gray32'\n",
"\\item 'gray33'\n",
"\\item 'gray34'\n",
"\\item 'gray35'\n",
"\\item 'gray36'\n",
"\\item 'gray37'\n",
"\\item 'gray38'\n",
"\\item 'gray39'\n",
"\\item 'gray40'\n",
"\\item 'gray41'\n",
"\\item 'gray42'\n",
"\\item 'gray43'\n",
"\\item 'gray44'\n",
"\\item 'gray45'\n",
"\\item 'gray46'\n",
"\\item 'gray47'\n",
"\\item ⋯\n",
"\\item 'maroon3'\n",
"\\item 'maroon4'\n",
"\\item 'mediumaquamarine'\n",
"\\item 'mediumblue'\n",
"\\item 'mediumorchid'\n",
"\\item 'mediumorchid1'\n",
"\\item 'mediumorchid2'\n",
"\\item 'mediumorchid3'\n",
"\\item 'mediumorchid4'\n",
"\\item 'mediumpurple'\n",
"\\item 'mediumpurple1'\n",
"\\item 'mediumpurple2'\n",
"\\item 'mediumpurple3'\n",
"\\item 'mediumpurple4'\n",
"\\item 'mediumseagreen'\n",
"\\item 'mediumslateblue'\n",
"\\item 'mediumspringgreen'\n",
"\\item 'mediumturquoise'\n",
"\\item 'mediumvioletred'\n",
"\\item 'midnightblue'\n",
"\\item 'mintcream'\n",
"\\item 'mistyrose'\n",
"\\item 'mistyrose1'\n",
"\\item 'mistyrose2'\n",
"\\item 'mistyrose3'\n",
"\\item 'mistyrose4'\n",
"\\item 'moccasin'\n",
"\\item 'navajowhite'\n",
"\\item 'navajowhite1'\n",
"\\item 'navajowhite2'\n",
"\\item 'navajowhite3'\n",
"\\item 'navajowhite4'\n",
"\\item 'navy'\n",
"\\item 'navyblue'\n",
"\\item 'oldlace'\n",
"\\item 'olivedrab'\n",
"\\item 'olivedrab1'\n",
"\\item 'olivedrab2'\n",
"\\item 'olivedrab3'\n",
"\\item 'olivedrab4'\n",
"\\item 'orange'\n",
"\\item 'orange1'\n",
"\\item 'orange2'\n",
"\\item 'orange3'\n",
"\\item 'orange4'\n",
"\\item 'orangered'\n",
"\\item 'orangered1'\n",
"\\item 'orangered2'\n",
"\\item 'orangered3'\n",
"\\item 'orangered4'\n",
"\\item 'orchid'\n",
"\\item 'orchid1'\n",
"\\item 'orchid2'\n",
"\\item 'orchid3'\n",
"\\item 'orchid4'\n",
"\\item 'palegoldenrod'\n",
"\\item 'palegreen'\n",
"\\item 'palegreen1'\n",
"\\item 'palegreen2'\n",
"\\item 'palegreen3'\n",
"\\item 'palegreen4'\n",
"\\item 'paleturquoise'\n",
"\\item 'paleturquoise1'\n",
"\\item 'paleturquoise2'\n",
"\\item 'paleturquoise3'\n",
"\\item 'paleturquoise4'\n",
"\\item 'palevioletred'\n",
"\\item 'palevioletred1'\n",
"\\item 'palevioletred2'\n",
"\\item 'palevioletred3'\n",
"\\item 'palevioletred4'\n",
"\\item 'papayawhip'\n",
"\\item 'peachpuff'\n",
"\\item 'peachpuff1'\n",
"\\item 'peachpuff2'\n",
"\\item 'peachpuff3'\n",
"\\item 'peachpuff4'\n",
"\\item 'peru'\n",
"\\item 'pink'\n",
"\\item 'pink1'\n",
"\\item 'pink2'\n",
"\\item 'pink3'\n",
"\\item 'pink4'\n",
"\\item 'plum'\n",
"\\item 'plum1'\n",
"\\item 'plum2'\n",
"\\item 'plum3'\n",
"\\item 'plum4'\n",
"\\item 'powderblue'\n",
"\\item 'purple'\n",
"\\item 'purple1'\n",
"\\item 'purple2'\n",
"\\item 'purple3'\n",
"\\item 'purple4'\n",
"\\item 'red'\n",
"\\item 'red1'\n",
"\\item 'red2'\n",
"\\item 'red3'\n",
"\\item 'red4'\n",
"\\item 'rosybrown'\n",
"\\item 'rosybrown1'\n",
"\\item 'rosybrown2'\n",
"\\item 'rosybrown3'\n",
"\\item 'rosybrown4'\n",
"\\item 'royalblue'\n",
"\\item 'royalblue1'\n",
"\\item 'royalblue2'\n",
"\\item 'royalblue3'\n",
"\\item 'royalblue4'\n",
"\\item 'saddlebrown'\n",
"\\item 'salmon'\n",
"\\item 'salmon1'\n",
"\\item 'salmon2'\n",
"\\item 'salmon3'\n",
"\\item 'salmon4'\n",
"\\item 'sandybrown'\n",
"\\item 'seagreen'\n",
"\\item 'seagreen1'\n",
"\\item 'seagreen2'\n",
"\\item 'seagreen3'\n",
"\\item 'seagreen4'\n",
"\\item 'seashell'\n",
"\\item 'seashell1'\n",
"\\item 'seashell2'\n",
"\\item 'seashell3'\n",
"\\item 'seashell4'\n",
"\\item 'sienna'\n",
"\\item 'sienna1'\n",
"\\item 'sienna2'\n",
"\\item 'sienna3'\n",
"\\item 'sienna4'\n",
"\\item 'skyblue'\n",
"\\item 'skyblue1'\n",
"\\item 'skyblue2'\n",
"\\item 'skyblue3'\n",
"\\item 'skyblue4'\n",
"\\item 'slateblue'\n",
"\\item 'slateblue1'\n",
"\\item 'slateblue2'\n",
"\\item 'slateblue3'\n",
"\\item 'slateblue4'\n",
"\\item 'slategray'\n",
"\\item 'slategray1'\n",
"\\item 'slategray2'\n",
"\\item 'slategray3'\n",
"\\item 'slategray4'\n",
"\\item 'slategrey'\n",
"\\item 'snow'\n",
"\\item 'snow1'\n",
"\\item 'snow2'\n",
"\\item 'snow3'\n",
"\\item 'snow4'\n",
"\\item 'springgreen'\n",
"\\item 'springgreen1'\n",
"\\item 'springgreen2'\n",
"\\item 'springgreen3'\n",
"\\item 'springgreen4'\n",
"\\item 'steelblue'\n",
"\\item 'steelblue1'\n",
"\\item 'steelblue2'\n",
"\\item 'steelblue3'\n",
"\\item 'steelblue4'\n",
"\\item 'tan'\n",
"\\item 'tan1'\n",
"\\item 'tan2'\n",
"\\item 'tan3'\n",
"\\item 'tan4'\n",
"\\item 'thistle'\n",
"\\item 'thistle1'\n",
"\\item 'thistle2'\n",
"\\item 'thistle3'\n",
"\\item 'thistle4'\n",
"\\item 'tomato'\n",
"\\item 'tomato1'\n",
"\\item 'tomato2'\n",
"\\item 'tomato3'\n",
"\\item 'tomato4'\n",
"\\item 'turquoise'\n",
"\\item 'turquoise1'\n",
"\\item 'turquoise2'\n",
"\\item 'turquoise3'\n",
"\\item 'turquoise4'\n",
"\\item 'violet'\n",
"\\item 'violetred'\n",
"\\item 'violetred1'\n",
"\\item 'violetred2'\n",
"\\item 'violetred3'\n",
"\\item 'violetred4'\n",
"\\item 'wheat'\n",
"\\item 'wheat1'\n",
"\\item 'wheat2'\n",
"\\item 'wheat3'\n",
"\\item 'wheat4'\n",
"\\item 'whitesmoke'\n",
"\\item 'yellow'\n",
"\\item 'yellow1'\n",
"\\item 'yellow2'\n",
"\\item 'yellow3'\n",
"\\item 'yellow4'\n",
"\\item 'yellowgreen'\n",
"\\end{enumerate*}\n"
],
"text/markdown": [
"1. 'white'\n",
"2. 'aliceblue'\n",
"3. 'antiquewhite'\n",
"4. 'antiquewhite1'\n",
"5. 'antiquewhite2'\n",
"6. 'antiquewhite3'\n",
"7. 'antiquewhite4'\n",
"8. 'aquamarine'\n",
"9. 'aquamarine1'\n",
"10. 'aquamarine2'\n",
"11. 'aquamarine3'\n",
"12. 'aquamarine4'\n",
"13. 'azure'\n",
"14. 'azure1'\n",
"15. 'azure2'\n",
"16. 'azure3'\n",
"17. 'azure4'\n",
"18. 'beige'\n",
"19. 'bisque'\n",
"20. 'bisque1'\n",
"21. 'bisque2'\n",
"22. 'bisque3'\n",
"23. 'bisque4'\n",
"24. 'black'\n",
"25. 'blanchedalmond'\n",
"26. 'blue'\n",
"27. 'blue1'\n",
"28. 'blue2'\n",
"29. 'blue3'\n",
"30. 'blue4'\n",
"31. 'blueviolet'\n",
"32. 'brown'\n",
"33. 'brown1'\n",
"34. 'brown2'\n",
"35. 'brown3'\n",
"36. 'brown4'\n",
"37. 'burlywood'\n",
"38. 'burlywood1'\n",
"39. 'burlywood2'\n",
"40. 'burlywood3'\n",
"41. 'burlywood4'\n",
"42. 'cadetblue'\n",
"43. 'cadetblue1'\n",
"44. 'cadetblue2'\n",
"45. 'cadetblue3'\n",
"46. 'cadetblue4'\n",
"47. 'chartreuse'\n",
"48. 'chartreuse1'\n",
"49. 'chartreuse2'\n",
"50. 'chartreuse3'\n",
"51. 'chartreuse4'\n",
"52. 'chocolate'\n",
"53. 'chocolate1'\n",
"54. 'chocolate2'\n",
"55. 'chocolate3'\n",
"56. 'chocolate4'\n",
"57. 'coral'\n",
"58. 'coral1'\n",
"59. 'coral2'\n",
"60. 'coral3'\n",
"61. 'coral4'\n",
"62. 'cornflowerblue'\n",
"63. 'cornsilk'\n",
"64. 'cornsilk1'\n",
"65. 'cornsilk2'\n",
"66. 'cornsilk3'\n",
"67. 'cornsilk4'\n",
"68. 'cyan'\n",
"69. 'cyan1'\n",
"70. 'cyan2'\n",
"71. 'cyan3'\n",
"72. 'cyan4'\n",
"73. 'darkblue'\n",
"74. 'darkcyan'\n",
"75. 'darkgoldenrod'\n",
"76. 'darkgoldenrod1'\n",
"77. 'darkgoldenrod2'\n",
"78. 'darkgoldenrod3'\n",
"79. 'darkgoldenrod4'\n",
"80. 'darkgray'\n",
"81. 'darkgreen'\n",
"82. 'darkgrey'\n",
"83. 'darkkhaki'\n",
"84. 'darkmagenta'\n",
"85. 'darkolivegreen'\n",
"86. 'darkolivegreen1'\n",
"87. 'darkolivegreen2'\n",
"88. 'darkolivegreen3'\n",
"89. 'darkolivegreen4'\n",
"90. 'darkorange'\n",
"91. 'darkorange1'\n",
"92. 'darkorange2'\n",
"93. 'darkorange3'\n",
"94. 'darkorange4'\n",
"95. 'darkorchid'\n",
"96. 'darkorchid1'\n",
"97. 'darkorchid2'\n",
"98. 'darkorchid3'\n",
"99. 'darkorchid4'\n",
"100. 'darkred'\n",
"101. 'darksalmon'\n",
"102. 'darkseagreen'\n",
"103. 'darkseagreen1'\n",
"104. 'darkseagreen2'\n",
"105. 'darkseagreen3'\n",
"106. 'darkseagreen4'\n",
"107. 'darkslateblue'\n",
"108. 'darkslategray'\n",
"109. 'darkslategray1'\n",
"110. 'darkslategray2'\n",
"111. 'darkslategray3'\n",
"112. 'darkslategray4'\n",
"113. 'darkslategrey'\n",
"114. 'darkturquoise'\n",
"115. 'darkviolet'\n",
"116. 'deeppink'\n",
"117. 'deeppink1'\n",
"118. 'deeppink2'\n",
"119. 'deeppink3'\n",
"120. 'deeppink4'\n",
"121. 'deepskyblue'\n",
"122. 'deepskyblue1'\n",
"123. 'deepskyblue2'\n",
"124. 'deepskyblue3'\n",
"125. 'deepskyblue4'\n",
"126. 'dimgray'\n",
"127. 'dimgrey'\n",
"128. 'dodgerblue'\n",
"129. 'dodgerblue1'\n",
"130. 'dodgerblue2'\n",
"131. 'dodgerblue3'\n",
"132. 'dodgerblue4'\n",
"133. 'firebrick'\n",
"134. 'firebrick1'\n",
"135. 'firebrick2'\n",
"136. 'firebrick3'\n",
"137. 'firebrick4'\n",
"138. 'floralwhite'\n",
"139. 'forestgreen'\n",
"140. 'gainsboro'\n",
"141. 'ghostwhite'\n",
"142. 'gold'\n",
"143. 'gold1'\n",
"144. 'gold2'\n",
"145. 'gold3'\n",
"146. 'gold4'\n",
"147. 'goldenrod'\n",
"148. 'goldenrod1'\n",
"149. 'goldenrod2'\n",
"150. 'goldenrod3'\n",
"151. 'goldenrod4'\n",
"152. 'gray'\n",
"153. 'gray0'\n",
"154. 'gray1'\n",
"155. 'gray2'\n",
"156. 'gray3'\n",
"157. 'gray4'\n",
"158. 'gray5'\n",
"159. 'gray6'\n",
"160. 'gray7'\n",
"161. 'gray8'\n",
"162. 'gray9'\n",
"163. 'gray10'\n",
"164. 'gray11'\n",
"165. 'gray12'\n",
"166. 'gray13'\n",
"167. 'gray14'\n",
"168. 'gray15'\n",
"169. 'gray16'\n",
"170. 'gray17'\n",
"171. 'gray18'\n",
"172. 'gray19'\n",
"173. 'gray20'\n",
"174. 'gray21'\n",
"175. 'gray22'\n",
"176. 'gray23'\n",
"177. 'gray24'\n",
"178. 'gray25'\n",
"179. 'gray26'\n",
"180. 'gray27'\n",
"181. 'gray28'\n",
"182. 'gray29'\n",
"183. 'gray30'\n",
"184. 'gray31'\n",
"185. 'gray32'\n",
"186. 'gray33'\n",
"187. 'gray34'\n",
"188. 'gray35'\n",
"189. 'gray36'\n",
"190. 'gray37'\n",
"191. 'gray38'\n",
"192. 'gray39'\n",
"193. 'gray40'\n",
"194. 'gray41'\n",
"195. 'gray42'\n",
"196. 'gray43'\n",
"197. 'gray44'\n",
"198. 'gray45'\n",
"199. 'gray46'\n",
"200. 'gray47'\n",
"201. ⋯\n",
"202. 'maroon3'\n",
"203. 'maroon4'\n",
"204. 'mediumaquamarine'\n",
"205. 'mediumblue'\n",
"206. 'mediumorchid'\n",
"207. 'mediumorchid1'\n",
"208. 'mediumorchid2'\n",
"209. 'mediumorchid3'\n",
"210. 'mediumorchid4'\n",
"211. 'mediumpurple'\n",
"212. 'mediumpurple1'\n",
"213. 'mediumpurple2'\n",
"214. 'mediumpurple3'\n",
"215. 'mediumpurple4'\n",
"216. 'mediumseagreen'\n",
"217. 'mediumslateblue'\n",
"218. 'mediumspringgreen'\n",
"219. 'mediumturquoise'\n",
"220. 'mediumvioletred'\n",
"221. 'midnightblue'\n",
"222. 'mintcream'\n",
"223. 'mistyrose'\n",
"224. 'mistyrose1'\n",
"225. 'mistyrose2'\n",
"226. 'mistyrose3'\n",
"227. 'mistyrose4'\n",
"228. 'moccasin'\n",
"229. 'navajowhite'\n",
"230. 'navajowhite1'\n",
"231. 'navajowhite2'\n",
"232. 'navajowhite3'\n",
"233. 'navajowhite4'\n",
"234. 'navy'\n",
"235. 'navyblue'\n",
"236. 'oldlace'\n",
"237. 'olivedrab'\n",
"238. 'olivedrab1'\n",
"239. 'olivedrab2'\n",
"240. 'olivedrab3'\n",
"241. 'olivedrab4'\n",
"242. 'orange'\n",
"243. 'orange1'\n",
"244. 'orange2'\n",
"245. 'orange3'\n",
"246. 'orange4'\n",
"247. 'orangered'\n",
"248. 'orangered1'\n",
"249. 'orangered2'\n",
"250. 'orangered3'\n",
"251. 'orangered4'\n",
"252. 'orchid'\n",
"253. 'orchid1'\n",
"254. 'orchid2'\n",
"255. 'orchid3'\n",
"256. 'orchid4'\n",
"257. 'palegoldenrod'\n",
"258. 'palegreen'\n",
"259. 'palegreen1'\n",
"260. 'palegreen2'\n",
"261. 'palegreen3'\n",
"262. 'palegreen4'\n",
"263. 'paleturquoise'\n",
"264. 'paleturquoise1'\n",
"265. 'paleturquoise2'\n",
"266. 'paleturquoise3'\n",
"267. 'paleturquoise4'\n",
"268. 'palevioletred'\n",
"269. 'palevioletred1'\n",
"270. 'palevioletred2'\n",
"271. 'palevioletred3'\n",
"272. 'palevioletred4'\n",
"273. 'papayawhip'\n",
"274. 'peachpuff'\n",
"275. 'peachpuff1'\n",
"276. 'peachpuff2'\n",
"277. 'peachpuff3'\n",
"278. 'peachpuff4'\n",
"279. 'peru'\n",
"280. 'pink'\n",
"281. 'pink1'\n",
"282. 'pink2'\n",
"283. 'pink3'\n",
"284. 'pink4'\n",
"285. 'plum'\n",
"286. 'plum1'\n",
"287. 'plum2'\n",
"288. 'plum3'\n",
"289. 'plum4'\n",
"290. 'powderblue'\n",
"291. 'purple'\n",
"292. 'purple1'\n",
"293. 'purple2'\n",
"294. 'purple3'\n",
"295. 'purple4'\n",
"296. 'red'\n",
"297. 'red1'\n",
"298. 'red2'\n",
"299. 'red3'\n",
"300. 'red4'\n",
"301. 'rosybrown'\n",
"302. 'rosybrown1'\n",
"303. 'rosybrown2'\n",
"304. 'rosybrown3'\n",
"305. 'rosybrown4'\n",
"306. 'royalblue'\n",
"307. 'royalblue1'\n",
"308. 'royalblue2'\n",
"309. 'royalblue3'\n",
"310. 'royalblue4'\n",
"311. 'saddlebrown'\n",
"312. 'salmon'\n",
"313. 'salmon1'\n",
"314. 'salmon2'\n",
"315. 'salmon3'\n",
"316. 'salmon4'\n",
"317. 'sandybrown'\n",
"318. 'seagreen'\n",
"319. 'seagreen1'\n",
"320. 'seagreen2'\n",
"321. 'seagreen3'\n",
"322. 'seagreen4'\n",
"323. 'seashell'\n",
"324. 'seashell1'\n",
"325. 'seashell2'\n",
"326. 'seashell3'\n",
"327. 'seashell4'\n",
"328. 'sienna'\n",
"329. 'sienna1'\n",
"330. 'sienna2'\n",
"331. 'sienna3'\n",
"332. 'sienna4'\n",
"333. 'skyblue'\n",
"334. 'skyblue1'\n",
"335. 'skyblue2'\n",
"336. 'skyblue3'\n",
"337. 'skyblue4'\n",
"338. 'slateblue'\n",
"339. 'slateblue1'\n",
"340. 'slateblue2'\n",
"341. 'slateblue3'\n",
"342. 'slateblue4'\n",
"343. 'slategray'\n",
"344. 'slategray1'\n",
"345. 'slategray2'\n",
"346. 'slategray3'\n",
"347. 'slategray4'\n",
"348. 'slategrey'\n",
"349. 'snow'\n",
"350. 'snow1'\n",
"351. 'snow2'\n",
"352. 'snow3'\n",
"353. 'snow4'\n",
"354. 'springgreen'\n",
"355. 'springgreen1'\n",
"356. 'springgreen2'\n",
"357. 'springgreen3'\n",
"358. 'springgreen4'\n",
"359. 'steelblue'\n",
"360. 'steelblue1'\n",
"361. 'steelblue2'\n",
"362. 'steelblue3'\n",
"363. 'steelblue4'\n",
"364. 'tan'\n",
"365. 'tan1'\n",
"366. 'tan2'\n",
"367. 'tan3'\n",
"368. 'tan4'\n",
"369. 'thistle'\n",
"370. 'thistle1'\n",
"371. 'thistle2'\n",
"372. 'thistle3'\n",
"373. 'thistle4'\n",
"374. 'tomato'\n",
"375. 'tomato1'\n",
"376. 'tomato2'\n",
"377. 'tomato3'\n",
"378. 'tomato4'\n",
"379. 'turquoise'\n",
"380. 'turquoise1'\n",
"381. 'turquoise2'\n",
"382. 'turquoise3'\n",
"383. 'turquoise4'\n",
"384. 'violet'\n",
"385. 'violetred'\n",
"386. 'violetred1'\n",
"387. 'violetred2'\n",
"388. 'violetred3'\n",
"389. 'violetred4'\n",
"390. 'wheat'\n",
"391. 'wheat1'\n",
"392. 'wheat2'\n",
"393. 'wheat3'\n",
"394. 'wheat4'\n",
"395. 'whitesmoke'\n",
"396. 'yellow'\n",
"397. 'yellow1'\n",
"398. 'yellow2'\n",
"399. 'yellow3'\n",
"400. 'yellow4'\n",
"401. 'yellowgreen'\n",
"\n",
"\n"
],
"text/plain": [
" [1] \"white\" \"aliceblue\" \"antiquewhite\" \n",
" [4] \"antiquewhite1\" \"antiquewhite2\" \"antiquewhite3\" \n",
" [7] \"antiquewhite4\" \"aquamarine\" \"aquamarine1\" \n",
" [10] \"aquamarine2\" \"aquamarine3\" \"aquamarine4\" \n",
" [13] \"azure\" \"azure1\" \"azure2\" \n",
" [16] \"azure3\" \"azure4\" \"beige\" \n",
" [19] \"bisque\" \"bisque1\" \"bisque2\" \n",
" [22] \"bisque3\" \"bisque4\" \"black\" \n",
" [25] \"blanchedalmond\" \"blue\" \"blue1\" \n",
" [28] \"blue2\" \"blue3\" \"blue4\" \n",
" [31] \"blueviolet\" \"brown\" \"brown1\" \n",
" [34] \"brown2\" \"brown3\" \"brown4\" \n",
" [37] \"burlywood\" \"burlywood1\" \"burlywood2\" \n",
" [40] \"burlywood3\" \"burlywood4\" \"cadetblue\" \n",
" [43] \"cadetblue1\" \"cadetblue2\" \"cadetblue3\" \n",
" [46] \"cadetblue4\" \"chartreuse\" \"chartreuse1\" \n",
" [49] \"chartreuse2\" \"chartreuse3\" \"chartreuse4\" \n",
" [52] \"chocolate\" \"chocolate1\" \"chocolate2\" \n",
" [55] \"chocolate3\" \"chocolate4\" \"coral\" \n",
" [58] \"coral1\" \"coral2\" \"coral3\" \n",
" [61] \"coral4\" \"cornflowerblue\" \"cornsilk\" \n",
" [64] \"cornsilk1\" \"cornsilk2\" \"cornsilk3\" \n",
" [67] \"cornsilk4\" \"cyan\" \"cyan1\" \n",
" [70] \"cyan2\" \"cyan3\" \"cyan4\" \n",
" [73] \"darkblue\" \"darkcyan\" \"darkgoldenrod\" \n",
" [76] \"darkgoldenrod1\" \"darkgoldenrod2\" \"darkgoldenrod3\" \n",
" [79] \"darkgoldenrod4\" \"darkgray\" \"darkgreen\" \n",
" [82] \"darkgrey\" \"darkkhaki\" \"darkmagenta\" \n",
" [85] \"darkolivegreen\" \"darkolivegreen1\" \"darkolivegreen2\" \n",
" [88] \"darkolivegreen3\" \"darkolivegreen4\" \"darkorange\" \n",
" [91] \"darkorange1\" \"darkorange2\" \"darkorange3\" \n",
" [94] \"darkorange4\" \"darkorchid\" \"darkorchid1\" \n",
" [97] \"darkorchid2\" \"darkorchid3\" \"darkorchid4\" \n",
"[100] \"darkred\" \"darksalmon\" \"darkseagreen\" \n",
"[103] \"darkseagreen1\" \"darkseagreen2\" \"darkseagreen3\" \n",
"[106] \"darkseagreen4\" \"darkslateblue\" \"darkslategray\" \n",
"[109] \"darkslategray1\" \"darkslategray2\" \"darkslategray3\" \n",
"[112] \"darkslategray4\" \"darkslategrey\" \"darkturquoise\" \n",
"[115] \"darkviolet\" \"deeppink\" \"deeppink1\" \n",
"[118] \"deeppink2\" \"deeppink3\" \"deeppink4\" \n",
"[121] \"deepskyblue\" \"deepskyblue1\" \"deepskyblue2\" \n",
"[124] \"deepskyblue3\" \"deepskyblue4\" \"dimgray\" \n",
"[127] \"dimgrey\" \"dodgerblue\" \"dodgerblue1\" \n",
"[130] \"dodgerblue2\" \"dodgerblue3\" \"dodgerblue4\" \n",
"[133] \"firebrick\" \"firebrick1\" \"firebrick2\" \n",
"[136] \"firebrick3\" \"firebrick4\" \"floralwhite\" \n",
"[139] \"forestgreen\" \"gainsboro\" \"ghostwhite\" \n",
"[142] \"gold\" \"gold1\" \"gold2\" \n",
"[145] \"gold3\" \"gold4\" \"goldenrod\" \n",
"[148] \"goldenrod1\" \"goldenrod2\" \"goldenrod3\" \n",
"[151] \"goldenrod4\" \"gray\" \"gray0\" \n",
"[154] \"gray1\" \"gray2\" \"gray3\" \n",
"[157] \"gray4\" \"gray5\" \"gray6\" \n",
"[160] \"gray7\" \"gray8\" \"gray9\" \n",
"[163] \"gray10\" \"gray11\" \"gray12\" \n",
"[166] \"gray13\" \"gray14\" \"gray15\" \n",
"[169] \"gray16\" \"gray17\" \"gray18\" \n",
"[172] \"gray19\" \"gray20\" \"gray21\" \n",
"[175] \"gray22\" \"gray23\" \"gray24\" \n",
"[178] \"gray25\" \"gray26\" \"gray27\" \n",
"[181] \"gray28\" \"gray29\" \"gray30\" \n",
"[184] \"gray31\" \"gray32\" \"gray33\" \n",
"[187] \"gray34\" \"gray35\" \"gray36\" \n",
"[190] \"gray37\" \"gray38\" \"gray39\" \n",
"[193] \"gray40\" \"gray41\" \"gray42\" \n",
"[196] \"gray43\" \"gray44\" \"gray45\" \n",
"[199] \"gray46\" \"gray47\" \"gray48\" \n",
"[202] \"gray49\" \"gray50\" \"gray51\" \n",
"[205] \"gray52\" \"gray53\" \"gray54\" \n",
"[208] \"gray55\" \"gray56\" \"gray57\" \n",
"[211] \"gray58\" \"gray59\" \"gray60\" \n",
"[214] \"gray61\" \"gray62\" \"gray63\" \n",
"[217] \"gray64\" \"gray65\" \"gray66\" \n",
"[220] \"gray67\" \"gray68\" \"gray69\" \n",
"[223] \"gray70\" \"gray71\" \"gray72\" \n",
"[226] \"gray73\" \"gray74\" \"gray75\" \n",
"[229] \"gray76\" \"gray77\" \"gray78\" \n",
"[232] \"gray79\" \"gray80\" \"gray81\" \n",
"[235] \"gray82\" \"gray83\" \"gray84\" \n",
"[238] \"gray85\" \"gray86\" \"gray87\" \n",
"[241] \"gray88\" \"gray89\" \"gray90\" \n",
"[244] \"gray91\" \"gray92\" \"gray93\" \n",
"[247] \"gray94\" \"gray95\" \"gray96\" \n",
"[250] \"gray97\" \"gray98\" \"gray99\" \n",
"[253] \"gray100\" \"green\" \"green1\" \n",
"[256] \"green2\" \"green3\" \"green4\" \n",
"[259] \"greenyellow\" \"grey\" \"grey0\" \n",
"[262] \"grey1\" \"grey2\" \"grey3\" \n",
"[265] \"grey4\" \"grey5\" \"grey6\" \n",
"[268] \"grey7\" \"grey8\" \"grey9\" \n",
"[271] \"grey10\" \"grey11\" \"grey12\" \n",
"[274] \"grey13\" \"grey14\" \"grey15\" \n",
"[277] \"grey16\" \"grey17\" \"grey18\" \n",
"[280] \"grey19\" \"grey20\" \"grey21\" \n",
"[283] \"grey22\" \"grey23\" \"grey24\" \n",
"[286] \"grey25\" \"grey26\" \"grey27\" \n",
"[289] \"grey28\" \"grey29\" \"grey30\" \n",
"[292] \"grey31\" \"grey32\" \"grey33\" \n",
"[295] \"grey34\" \"grey35\" \"grey36\" \n",
"[298] \"grey37\" \"grey38\" \"grey39\" \n",
"[301] \"grey40\" \"grey41\" \"grey42\" \n",
"[304] \"grey43\" \"grey44\" \"grey45\" \n",
"[307] \"grey46\" \"grey47\" \"grey48\" \n",
"[310] \"grey49\" \"grey50\" \"grey51\" \n",
"[313] \"grey52\" \"grey53\" \"grey54\" \n",
"[316] \"grey55\" \"grey56\" \"grey57\" \n",
"[319] \"grey58\" \"grey59\" \"grey60\" \n",
"[322] \"grey61\" \"grey62\" \"grey63\" \n",
"[325] \"grey64\" \"grey65\" \"grey66\" \n",
"[328] \"grey67\" \"grey68\" \"grey69\" \n",
"[331] \"grey70\" \"grey71\" \"grey72\" \n",
"[334] \"grey73\" \"grey74\" \"grey75\" \n",
"[337] \"grey76\" \"grey77\" \"grey78\" \n",
"[340] \"grey79\" \"grey80\" \"grey81\" \n",
"[343] \"grey82\" \"grey83\" \"grey84\" \n",
"[346] \"grey85\" \"grey86\" \"grey87\" \n",
"[349] \"grey88\" \"grey89\" \"grey90\" \n",
"[352] \"grey91\" \"grey92\" \"grey93\" \n",
"[355] \"grey94\" \"grey95\" \"grey96\" \n",
"[358] \"grey97\" \"grey98\" \"grey99\" \n",
"[361] \"grey100\" \"honeydew\" \"honeydew1\" \n",
"[364] \"honeydew2\" \"honeydew3\" \"honeydew4\" \n",
"[367] \"hotpink\" \"hotpink1\" \"hotpink2\" \n",
"[370] \"hotpink3\" \"hotpink4\" \"indianred\" \n",
"[373] \"indianred1\" \"indianred2\" \"indianred3\" \n",
"[376] \"indianred4\" \"ivory\" \"ivory1\" \n",
"[379] \"ivory2\" \"ivory3\" \"ivory4\" \n",
"[382] \"khaki\" \"khaki1\" \"khaki2\" \n",
"[385] \"khaki3\" \"khaki4\" \"lavender\" \n",
"[388] \"lavenderblush\" \"lavenderblush1\" \"lavenderblush2\" \n",
"[391] \"lavenderblush3\" \"lavenderblush4\" \"lawngreen\" \n",
"[394] \"lemonchiffon\" \"lemonchiffon1\" \"lemonchiffon2\" \n",
"[397] \"lemonchiffon3\" \"lemonchiffon4\" \"lightblue\" \n",
"[400] \"lightblue1\" \"lightblue2\" \"lightblue3\" \n",
"[403] \"lightblue4\" \"lightcoral\" \"lightcyan\" \n",
"[406] \"lightcyan1\" \"lightcyan2\" \"lightcyan3\" \n",
"[409] \"lightcyan4\" \"lightgoldenrod\" \"lightgoldenrod1\" \n",
"[412] \"lightgoldenrod2\" \"lightgoldenrod3\" \"lightgoldenrod4\" \n",
"[415] \"lightgoldenrodyellow\" \"lightgray\" \"lightgreen\" \n",
"[418] \"lightgrey\" \"lightpink\" \"lightpink1\" \n",
"[421] \"lightpink2\" \"lightpink3\" \"lightpink4\" \n",
"[424] \"lightsalmon\" \"lightsalmon1\" \"lightsalmon2\" \n",
"[427] \"lightsalmon3\" \"lightsalmon4\" \"lightseagreen\" \n",
"[430] \"lightskyblue\" \"lightskyblue1\" \"lightskyblue2\" \n",
"[433] \"lightskyblue3\" \"lightskyblue4\" \"lightslateblue\" \n",
"[436] \"lightslategray\" \"lightslategrey\" \"lightsteelblue\" \n",
"[439] \"lightsteelblue1\" \"lightsteelblue2\" \"lightsteelblue3\" \n",
"[442] \"lightsteelblue4\" \"lightyellow\" \"lightyellow1\" \n",
"[445] \"lightyellow2\" \"lightyellow3\" \"lightyellow4\" \n",
"[448] \"limegreen\" \"linen\" \"magenta\" \n",
"[451] \"magenta1\" \"magenta2\" \"magenta3\" \n",
"[454] \"magenta4\" \"maroon\" \"maroon1\" \n",
"[457] \"maroon2\" \"maroon3\" \"maroon4\" \n",
"[460] \"mediumaquamarine\" \"mediumblue\" \"mediumorchid\" \n",
"[463] \"mediumorchid1\" \"mediumorchid2\" \"mediumorchid3\" \n",
"[466] \"mediumorchid4\" \"mediumpurple\" \"mediumpurple1\" \n",
"[469] \"mediumpurple2\" \"mediumpurple3\" \"mediumpurple4\" \n",
"[472] \"mediumseagreen\" \"mediumslateblue\" \"mediumspringgreen\" \n",
"[475] \"mediumturquoise\" \"mediumvioletred\" \"midnightblue\" \n",
"[478] \"mintcream\" \"mistyrose\" \"mistyrose1\" \n",
"[481] \"mistyrose2\" \"mistyrose3\" \"mistyrose4\" \n",
"[484] \"moccasin\" \"navajowhite\" \"navajowhite1\" \n",
"[487] \"navajowhite2\" \"navajowhite3\" \"navajowhite4\" \n",
"[490] \"navy\" \"navyblue\" \"oldlace\" \n",
"[493] \"olivedrab\" \"olivedrab1\" \"olivedrab2\" \n",
"[496] \"olivedrab3\" \"olivedrab4\" \"orange\" \n",
"[499] \"orange1\" \"orange2\" \"orange3\" \n",
"[502] \"orange4\" \"orangered\" \"orangered1\" \n",
"[505] \"orangered2\" \"orangered3\" \"orangered4\" \n",
"[508] \"orchid\" \"orchid1\" \"orchid2\" \n",
"[511] \"orchid3\" \"orchid4\" \"palegoldenrod\" \n",
"[514] \"palegreen\" \"palegreen1\" \"palegreen2\" \n",
"[517] \"palegreen3\" \"palegreen4\" \"paleturquoise\" \n",
"[520] \"paleturquoise1\" \"paleturquoise2\" \"paleturquoise3\" \n",
"[523] \"paleturquoise4\" \"palevioletred\" \"palevioletred1\" \n",
"[526] \"palevioletred2\" \"palevioletred3\" \"palevioletred4\" \n",
"[529] \"papayawhip\" \"peachpuff\" \"peachpuff1\" \n",
"[532] \"peachpuff2\" \"peachpuff3\" \"peachpuff4\" \n",
"[535] \"peru\" \"pink\" \"pink1\" \n",
"[538] \"pink2\" \"pink3\" \"pink4\" \n",
"[541] \"plum\" \"plum1\" \"plum2\" \n",
"[544] \"plum3\" \"plum4\" \"powderblue\" \n",
"[547] \"purple\" \"purple1\" \"purple2\" \n",
"[550] \"purple3\" \"purple4\" \"red\" \n",
"[553] \"red1\" \"red2\" \"red3\" \n",
"[556] \"red4\" \"rosybrown\" \"rosybrown1\" \n",
"[559] \"rosybrown2\" \"rosybrown3\" \"rosybrown4\" \n",
"[562] \"royalblue\" \"royalblue1\" \"royalblue2\" \n",
"[565] \"royalblue3\" \"royalblue4\" \"saddlebrown\" \n",
"[568] \"salmon\" \"salmon1\" \"salmon2\" \n",
"[571] \"salmon3\" \"salmon4\" \"sandybrown\" \n",
"[574] \"seagreen\" \"seagreen1\" \"seagreen2\" \n",
"[577] \"seagreen3\" \"seagreen4\" \"seashell\" \n",
"[580] \"seashell1\" \"seashell2\" \"seashell3\" \n",
"[583] \"seashell4\" \"sienna\" \"sienna1\" \n",
"[586] \"sienna2\" \"sienna3\" \"sienna4\" \n",
"[589] \"skyblue\" \"skyblue1\" \"skyblue2\" \n",
"[592] \"skyblue3\" \"skyblue4\" \"slateblue\" \n",
"[595] \"slateblue1\" \"slateblue2\" \"slateblue3\" \n",
"[598] \"slateblue4\" \"slategray\" \"slategray1\" \n",
"[601] \"slategray2\" \"slategray3\" \"slategray4\" \n",
"[604] \"slategrey\" \"snow\" \"snow1\" \n",
"[607] \"snow2\" \"snow3\" \"snow4\" \n",
"[610] \"springgreen\" \"springgreen1\" \"springgreen2\" \n",
"[613] \"springgreen3\" \"springgreen4\" \"steelblue\" \n",
"[616] \"steelblue1\" \"steelblue2\" \"steelblue3\" \n",
"[619] \"steelblue4\" \"tan\" \"tan1\" \n",
"[622] \"tan2\" \"tan3\" \"tan4\" \n",
"[625] \"thistle\" \"thistle1\" \"thistle2\" \n",
"[628] \"thistle3\" \"thistle4\" \"tomato\" \n",
"[631] \"tomato1\" \"tomato2\" \"tomato3\" \n",
"[634] \"tomato4\" \"turquoise\" \"turquoise1\" \n",
"[637] \"turquoise2\" \"turquoise3\" \"turquoise4\" \n",
"[640] \"violet\" \"violetred\" \"violetred1\" \n",
"[643] \"violetred2\" \"violetred3\" \"violetred4\" \n",
"[646] \"wheat\" \"wheat1\" \"wheat2\" \n",
"[649] \"wheat3\" \"wheat4\" \"whitesmoke\" \n",
"[652] \"yellow\" \"yellow1\" \"yellow2\" \n",
"[655] \"yellow3\" \"yellow4\" \"yellowgreen\" "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"colors()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"- font - Typ czcionki dla tekstu: 1 - normalna, 2 - pogrubiona, 3 - pochylona, 4 - pogrubiona i pochylona.\n",
"- lty - Określa typ linii, 0 - brak linii ('blank'), 1 - ciągła ('solid'), 2 - przerywana ('dashed'), 3 - kropkowana ('dotted'), 4 - kropka-kreska ('dotdash'), 5 - długa kreska ('longdash'), 6 - podwójna kreska ('twodash'). Poza tym istnieje możliwość określenia dowolnej linii, w taki sposób, że po kolei w liczbach szesnastkowych podajemy ile jednostek ma być wypełnionych linią, a ile pustych (maksymalnie osiem znaków, tylko parzyste długości), np:. lty = '13' oznacza linię kropkowaną."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"figs/linie.png\" width=\"300\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"- lwd - Grubość linii.\n",
"- pch - Symbol używany na obrazkach, można używać domyślnych symboli określonych liczbami od 0 do 25. Symbole 21-25 różnią się od wcześniejszych jedynie typem wypełnienia. Dodatkowo istnieje możliwość użycia znaków o kodach ASCII od 32 do 255 z bieżącej czcionki (wszystkie symbole dostępne do użycia można wyświetlić poleceniem <font color='red'>symbolTable</font> z pakietu <font color='red'>fBasics</font>)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"figs/pch.png\" width=\"300\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"figs/linie.png\" width=\"00\">"
]
},
{
"cell_type": "code",
"execution_count": 3,
"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/8Jf59ewX+c3W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AAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQ
"text/plain": [
"Plot with title “Plot”"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"par(mfrow = c(2, 2)) # Split screen\n",
"plot(cars) # Scatterplot\n",
"plot(cars$speed, cars$dist)\n",
"plot(cars, axes = FALSE)\n",
"plot(cars, \n",
" xlab = 'Speed', \n",
" ylab = 'Distance',\n",
" main = 'Plot', \n",
" sub = 'Subtitle', \n",
" pch = 20, \n",
" col = 'red',\n",
" cex = 3)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"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/Yz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Qg\nAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAE\nIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAA\nBCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCA\nAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQ\ngAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAAC\nEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAA\nAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhA\nAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEI\nQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAAB\nCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAA\nAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQg\nAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAE\nIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAA\nBCAAA
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"par(mfrow = c(1, 3)) # Split screen\n",
"curve(sin, from = 0, to = 2 * pi) # Create plot\n",
"curve(cos, from = 0, to = 2 * pi, add = TRUE, col = 'red', lwd = 2) # Add plot to existing \n",
"curve(sin(cos(x) * exp(-x / 2)), -10, 7) # New plot\n",
"curve(sin(cos(x) * exp(-x / 2)), -10, 7, n = 1000) # New plot"
]
},
{
"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\nVxieD/Cyz5mRMohfRSwoqoz+xNuIB+cj9loEB3Pw2448NaitKSLLRck2q5pOI9O9g/t/tkXd\na8Tbg0+PszB9FN8DuPaXKnKW4YcQn1Xk3HSIry5ps8UQ/2W5aQnxIwBdu7yFcgrxPsRjVXu8\nHOh0qao30cArp9SZZxDfg3h1wTzKxu5E/LUxX5wKdX5SnAzmDx4A4OIqLbB69yMesE1pKojL\njVdoNsfyiPi45hZmAn3uLWdpOtfQOaVmikEs7ovj8hFWpz7EV6mel0L9Xy23FMYlPYZenAx0\nyDB1/PX6dledmQjikjkXCxqMJS9WtfFCyH9XtSekEF+2dH+P4tzITduTygGfv58a5VCTH5Pt\nXD7EFZiNyUDBhHnsFTBgE0SQIA9pfFtgo6cKGuhooeilaKH41eDs38Ip+f4At1Rq/sjr6NEw\nQqb/I/DQqsLvaFUjvAx+eWirddAJZnAj1DFJL0mSg/gcIpPkMBkhoyCS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AgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAA
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"with(cars, plot(speed, pch = '*')) # Scatterplot\n",
"with(cars, lines(lowess(speed))) # Add lines\n",
"legend('bottomright', # Place\n",
" c('Speed', 'Smoothed speed'), # Text\n",
" pch = c('*', NA), # Points\n",
" lty = c(0, 1)) # Lines"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Warning message in par(parameters):\n",
"“parametr graficzny 'cin' nie może zostać ustawiony”\n",
"Warning message in par(parameters):\n",
"“parametr graficzny 'cra' nie może zostać ustawiony”\n",
"Warning message in par(parameters):\n",
"“parametr graficzny 'csi' nie może zostać ustawiony”\n",
"Warning message in par(parameters):\n",
"“parametr graficzny 'cxy' nie może zostać ustawiony”\n",
"Warning message in par(parameters):\n",
"“parametr graficzny 'din' nie może zostać ustawiony”\n",
"Warning message in par(parameters):\n",
"“parametr graficzny 'page' nie może zostać ustawiony”\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/LUxX5wKdX5SnAzmDx4A4O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W6CCgiCCiIgDRFmigdDfxQmoCAKFgoSu+BhAQC6fnPd/Kf697NbnLvTXa5\nd3nP8yRbZubMmffMzt5nv/nO6TV9+uPTk0KAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECPV6gd48/AgdAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAllAANiJQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgRYREABukY50GAQIECBAgAABAgQIECBAgAABAgQI\nECBAgAABAgQIEBAAdg4QIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECgRQQEgFukIx0G\nAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIEBICdAwQIECBAgAABAgQIECBAgAABAgQI\nECBAgAABAgQIEGgRAQHgFulIh0GAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAEBYOcA\nAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIEWkRAALhFOtJhECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAQADYOUCAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAIEWERAA\nbpGOdBgECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAQAHYOECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAoEUEBIBbpCMdBgECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAEC\nBASAnQMECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBBoEQEB4BbpSIdBgAABAgQIECBA\ngAABAgQIECBAgAABAgQIECBAgAABAWDnAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAEC\nBFpEQAC4RTrSYRAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQEAA2DlAgAABAgQIECBA\ngAABAgQIECBAgAABAgQIECBAgACBFhEQAG6RjnQYBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQEAB2DhAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQKBFBASAW6QjHQYBAgQI\nECBAgAABAgQIECBAgAABAgQIECBAgAABAgQEgJ0DBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQaBEBAeAW6UiHQYAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQFg5wABAgQI\nECBAgAABAgQIECBAgAABAgQIECBAgAABAgRaREAAuEU60mEQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIEBAANg5QIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAgRYREABukY50\nGAQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIEBAAdg4QIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECgRQQEgFukIx0GAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIEBICd\nAwQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIEGgRAQHgFulIh0GAAAECBAgQIECAAAEC\nBAgQIECAAAECBAgQIECAAAEBYOcAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIEWkRA\nALhFOtJhECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAQADYOUCAAAECBAgQIECAAAEC\nBAgQIECAAAECBAgQIECAAIEWERAAbpGOdBgECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAQAHYOECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAoEUEBIBbpCMdBgECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBASAnQMECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBBoEQEB4BbpSIdBgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgACBeREQIECAAAECBAgQ\nIECAAAECBAgQINC9BSZPnpz+/e//drqRQ4YslQYNWjg9//zLacyYsWmppRZPSyyxaKfrsUHn\nBd5+e3x66qnn0/zz900rrvjBzlfQiS3++c8n01/+8kiaOnVqWmGFD6T1118j9e/frxM1WHVu\nCfz3v8+l8ePfScstNzgttNDALlc7adKk9NhjT6VevXqlNdZYqcv1NHrDWsf7zDMvpHHj3k7l\n9afRbVB/4wRefPHV9MYbY9KSSy6W/zVuT2rubgLTpk1LP/3pr4p+XzTttttnZtm8Bx98NP9t\nMXToM
"text/plain": [
"Plot with title “The speed of cars and the distances taken to stop (1920)”"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"parameters <- par() # Save parameters\n",
"par(bg = 'lightyellow', col.axis = 'blue') # Set new parameters\n",
"plot(cars, xlab = 'Speed', ylab = 'Distance', pch = 22, col = rgb(1, 0, 0, 0.5), bg = 'yellow')\n",
"title('The speed of cars and the distances taken to stop (1920)', font.main = 3, adj = 1)\n",
"par(parameters) # Load parameters"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Podstawowe wykresy"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Histogram"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Histogram - zbór przylegających prostokątów, których podstawy, równe rozpiętości przedziałów klasowych znajdują się na osi odciętych, a wysokości są liczebnościami przedziałów."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<style>\n",
".list-inline {list-style: none; margin:0; padding: 0}\n",
".list-inline>li {display: inline-block}\n",
".list-inline>li:not(:last-child)::after {content: \"\\00b7\"; padding: 0 .5ex}\n",
"</style>\n",
"<ol class=list-inline><li>'eruptions'</li><li>'waiting'</li></ol>\n"
],
"text/latex": [
"\\begin{enumerate*}\n",
"\\item 'eruptions'\n",
"\\item 'waiting'\n",
"\\end{enumerate*}\n"
],
"text/markdown": [
"1. 'eruptions'\n",
"2. 'waiting'\n",
"\n",
"\n"
],
"text/plain": [
"[1] \"eruptions\" \"waiting\" "
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2021-03-10 17:34:54 +01:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDml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ee80a+6vo7EK5mmXUdyfQlrYLTwoZIU9wsPCZEtP6BWGhAlhL3p2N6sTjRdd\nuwbHsG9kq32sgBepc+xurLPW4T9URpYGJ3ym4+8zA05u44QjST8ZIoVtu3qE7fWmdn5LPdqv\ngcZz8Ww8BWJ8X3w0PhQ/wnCDGd+LvlHs8dRy6bLLDuKMaZ20tZrqisPJ5ONiCq8yKhYM5cCg\nKOu66Lsc0aYOtZdo5QCwezI4wm9J/v0X23mlZXOfBjj8Jzv3WrY5D+CsA9D7aMs2gGfjve8A\nrD6mePZSeCfEYt8CONWDw8FXTxrPqx/r9Vt4biXeANh8vV7/+/16ffMD1N8AuKD/A/8leAvF\nY9bLAAAAOGVYSWZNTQAqAAAACAABh2kABAAAAAEAAAAaAAAAAAACoAIABAAAAAEAAAeAoAMA\nBAAAAAEAAAQ4AAAAADFOLeoAAEAASURBVHgB7N0HvCZlfS/wd9nCUqQsSO8IqKCAooiKBQv2\nEo2a2EiuRmP0JtEYY+zGEqMxJvGGxMQriTG2qLGCXguoiApYEJWmNKW3XdrCLrv39z9nZnk9\nnHP29H3L9/l8fjt95nm+s2V2njMznY5CgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAABAgQIECBAgAAB\nAgQIECBAgMAACiwewDZpEgECsxfYNrt4anJwcmGyJmnLfhl5TFLD85qZ98nwEcnWya+T6ZTN\nsvL66WwwwOuW4+8mRyWLkl8l/Vjq980jk/p9dGk/NkCdCRAgQIDAEAq4/ts0J93136Zxd1QC\nBAgQIDBoAtO9lntCAA5Prk9unCaGe3l3gvXjtVz3+ZvNPd07FYwRIECAAAECfSNwSGpanbKV\nPcfU+sXN/O7OyXc28/5zzLqTTdbFxu8nH59spSFa9pC09bakdT++j9v+5qYdn+zjNqg6AQIE\nCBAYNgHXfwt/xl3/Lby5IxIgQIAAgUEVmO613AWBqHtQT50GiHt5v4nVb9dyK1L99ycv6WrG\nTO7pdm1ulACBXhZY0suVUzcCBPpG4OzU9FPJ96dR4z/IutXJeco0thnkVR+Xxi1Lzkiqk/2a\nRCFAgAABAgQI9KqA67/ZnxnXf7M3tAcCBAgQIEBgZgInZbNdksumsbl7eb+J1W/XcvWgxjHJ\ny7uaMZNr+q7NjRIg0MsCOoB7+eyoG4H+Efhmqnp+cm1XlesVxg9O9k3qydafJOckVXZODhgZ\n63S2yfCByc+Sm5p5Najl908uSX6QrE7GliMyY//kzOSXSU1XaTuia7p+OvGHSb2S+Jbku8na\npMpeyYOS65KfJ79OqlTdH5DUT0KenhyY1Gtxzk5+mlQ5LKk61vKLko2VpVmh9rlHUvup9ral\nfkqzXrlSpdpRHcFVp/HKZK61fnneM7kpqTbdNzkoqXpemIwttfzgpHW+dcwKW2T6yGTnpLv9\n3attnYn6qcflybe6FxgnQIAAAQIEBlbA9d/GT63rv40bWYMAAQIECBDYNAL/msNuntT9vLZs\nl5H6LNlOSd2X+nZSr4iuUveF6j5Ylbr39MCk7m3V/acqk133jK4x+um4uldYx637R9U3sV9S\nx6onkrdN6h7WyuSq5Jjkx0ktq7I4OTSpder+WR2/fX31Dhmve4R1b7LucVX9dkqqDVcndX/r\noUkd89RkVbKxMlmbpnMvr46za1L319YkZyRXJm0pgx2Tum9Xw2rfyckdyb2StckPkrbU/dKy\naP33y
2021-03-07 15:19:50 +01:00
"text/plain": [
"Plot with title “Histogram of eruptions”"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"par(mfrow = c(1, 3)) # Split screen\n",
"with(cars, hist(speed)) # Basic histogram\n",
"with(cars, hist(speed, prob = TRUE)) # Histogram for probabilities\n",
2021-03-10 11:38:01 +01:00
"with(cars, lines(density(speed), lwd = 2)) # Density\n",
2021-03-07 15:19:50 +01:00
"\n",
"names(faithful)\n",
"with(faithful, hist(eruptions, seq(1.6, 5.2, 0.2), \n",
" prob = TRUE,\n",
" col = 'salmon'))\n",
2021-03-10 11:38:01 +01:00
"with(faithful, lines(density(eruptions, bw = 0.1), lwd = 2))\n",
2021-03-07 15:19:50 +01:00
"with(faithful, rug(jitter(eruptions), side = 1)) # Add true value below X axis"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Wykres pudełkowy"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Wykres pudełkowy inaczej ramkowy (*ang. boxplot, box-and-whisker plot*). Tworzymy go odkładając na pionowej osi wartości niektórych parametrów rozkładu. Nad osią umieszczony jest prostokąt (pudełko), którego dolny bok jest wyznaczony przez pierwszy kwartyl, górny bok zaś przez trzeci kwartyl. Wysokość pudełka odpowiada wartości rozstępu ćwiartkowego. Wewnątrz prostokąta znajduje się pozioma linia, określająca wartość mediany. Rysunek pudełka uzupełniamy od góry i od dołu odcinkami (wąsy). Dolny koniec dolnego odcinka wyznacza najmniejszą wartość w zbiorze, natomiast górny koniec górnego odcinka, to wartość największa. Końcowe wartości wąsów muszą spełniać dodatkowy warunek, a mianowicie dolny koniec nie może być mniejszy niż $Q_1-1{,}5\\cdot(Q_3-Q_1)$, a górny większy niż $Q_3+1{,}5\\cdot(Q_3-Q_1)$. Jeśli występują obserwacje spoza tego przedziału, to nanoszone są na wykres indywidualnie (są to tzw. obserwacje odstające (*ang. outlier*))."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"figs/boxplot.png\" width=\"800\">"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
2021-03-10 17:34:54 +01:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4CAYAAADo08FDAAAEDmlDQ1BrQ0dDb2xvclNwYWNl\nR2VuZXJpY1JHQgAAOI2NVV1oHFUUPpu5syskzoPUpqaSDv41lLRsUtGE2uj+ZbNt3CyTbLRB\nkMns3Z1pJjPj/KRpKT4UQRDBqOCT4P9bwSchaqvtiy2itFCiBIMo+ND6R6HSFwnruTOzu5O4\na73L3PnmnO9+595z7t4LkLgsW5beJQIsGq4t5dPis8fmxMQ6dMF90A190C0rjpUqlSYBG+PC\nv9rt7yDG3tf2t/f/Z+uuU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gQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAA
2021-03-07 15:19:50 +01:00
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
"source": [
"par(mfrow = c(1, 3)) # Split screen\n",
"with(cars, boxplot(speed)) # Classic boxplot for single group\n",
"with(cars, boxplot(speed, horizontal = TRUE)) # Horizontal boxplot\n",
"with(cars, rug(speed, side = 1)) # Add truve values below\n",
"with(cbind(cars, group = sample(1:2, nrow(cars), replace = TRUE)), \n",
" boxplot(speed ~ group, col = c('lightblue', 'salmon'))) # Boxplot for two groups"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Wykres skrzypcowy"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Wykres skrzypcowy (*ang. violin plot*). Można go traktować jako wygładzoną wersję wykresu pudełkowego. Przydatny jest zwłaszcza w przypadku danych wielomodalnych. Jest to w zasadzie wykres pudełkowy, gdzie szerokość skrzypiec w punkcie $x$ odpowiada natężeniu obserwacji o wartości cechy zbliżonej do $x$ (estymator jądrowy gęstości).\n",
"\n",
"<img src=\"figs/violin.png\" width=\"400\">"
]
},
{
"cell_type": "code",
2021-03-10 17:34:54 +01:00
"execution_count": 9,
2021-03-07 15:19:50 +01:00
"metadata": {},
2021-03-10 17:34:54 +01:00
"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+l0JGcaai10y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ECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECA\nAAECB
"text/plain": [
"Plot with title “”"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
2021-03-07 15:19:50 +01:00
"source": [
"with(cars, vioplot::vioplot(speed))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Wykres słupkowy"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Wykres słupkowy (kolumnowy) (*ang. bar plot*) - używany raczej w przypadku danych jakościowych, przedstawia kolejne kategorie danych za pomocą słupków odpowiedniej wysokości. Może być poziomy lub pionowy (czasami występuje rozróżnienie, pionowy nazywany jest wtedy kolumnowym, a poziomy słupkowym). Czasami używa się również tzw. wykresu Pareto, gdzie słupki rysowane są od najwyższego do najniższego. "
]
},
{
"cell_type": "code",
2021-03-10 17:34:54 +01:00
"execution_count": 10,
2021-03-07 15:19:50 +01:00
"metadata": {},
2021-03-10 17:34:54 +01:00
"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\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QIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIE\nCBAgQ
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
2021-03-07 15:19:50 +01:00
"source": [
"blood <- c(70, 24, 10, 3)\n",
"barplot(blood, col = 1:4)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Wykres kołowy"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Wykres kołowy (*ang. pie chart*). Wartości liczbowe są przedstawiane za pomocą wycinków koła. Wykres kołowy występuje w rozmaitych wariantach graficznych. Typowy jest wykres płaski, ale można też utworzyć trójwymiarowy ,,tort'' lub ,,ser''."
]
},
{
"cell_type": "code",
2021-03-10 17:34:54 +01:00
"execution_count": 11,
2021-03-07 15:19:50 +01:00
"metadata": {},
2021-03-10 17:34:54 +01:00
"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\nXD7EFZiNyUDBhHnsFTBgE0SQIA9pfFtgo6cKG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BAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQ\nIECAA
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
2021-03-07 15:19:50 +01:00
"source": [
"par(mfrow = c(1, 2))\n",
"pie(blood, col = 2:5)\n",
"plotrix::pie3D(blood, explode = 0.1)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Muliplots"
]
},
{
"cell_type": "code",
2021-03-10 17:34:54 +01:00
"execution_count": 12,
2021-03-07 15:19:50 +01:00
"metadata": {},
2021-03-10 17:34:54 +01:00
"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/mdkmOC0z8VKnzcQ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BAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAg\nQIAAA
"text/plain": [
"plot without title"
]
},
"metadata": {
"image/png": {
"height": 540,
"width": 960
}
},
"output_type": "display_data"
}
],
2021-03-07 15:19:50 +01:00
"source": [
"layout(matrix(c(1, 2, 1, 3), ncol = 2, byrow = TRUE)) # Split screen\n",
"UsingR::squareplot(blood) # First plot\n",
"with(cars, boxplot(speed)) # Second plot \n",
"pie(blood) # Third plot"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Zadania"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"1. Dla zbioru danych *LakeHuron* (poziomy jeziora (w stopach) Huron (lata 1875-1972)):\n",
" - narysuj jak zmieniał się poziom wody w czasie,\n",
" - zastosuj funkcję *identify* aby oznaczyć punkty odpowiadające latom o najwyższym oraz najniższym poziomie wody.\n",
"2. W zbiorze danych *emissions* (emisja CO$_2$ a poziom PKB (26 państw)) z pakietu *UsingR* istnieje obserwacja odstająca. Znajdź ją używając funkcji *identify*, a następnie narysuj wykres, bez tej obserwacji. Zamiast punktów powinny być nazwy krajów. Użyj skali logarytmicznej dla obu osi.\n",
"3. Dla zbioru *chips* (grubość chipsów) z pakietu *UsingR* wykonaj wykres pudełkowy w zależności od miejsca pomiarów (powinno być 8 wykresów na jednym diagramie). Co można na ich podstawie powiedzieć o średniej i wariancji?\n",
"4. Wykonaj wykres pudełkowy (w zależności od żywienia) dla zbioru *chicken* (waga kurczaków w zależności od metody żywienia) z pakietu *UsingR*. Co można powiedzieć na temat średnich wag na podstawie tego wykresu?\n",
"5. Na bazie zbioru *carbon* (poziom tlenku węgla) z pakietu *UsingR*, wykonaj wykres pudełkowy dla każdego stanowiska pomiaru. Czy występują jakieś różnice, dlaczego?\n",
"6. Narysuj wykres funkcji sinus używając jako argumentów 200 wartości z przedziału $[-\\pi,\\pi]$ (nie rysuj osi). Następnie dodaj oś $Y$ przechodzącą przez początek układu współrzędnych, potem oś $X$ ze znacznikami co $\\pi/2$.\n",
2021-03-10 11:46:32 +01:00
"7. W zbiorze danych *survey* (wyniki ankiety (palenie, cechy fizyczne, płeć, wiek itp. wśród 237 studentów pierwszego roku na Uniwersytecie w Adelajdzie) z pakietu *MASS* znajduje się zmienna *Exer* zawierająca informacje na temat częstotliwości ćwiczenia przez studentów. Dla tej zmiennej wykonaj wykres słupkowy oraz kołowy (wraz z legendą). \n",
2021-03-07 15:19:50 +01:00
"8. Zbiór danych *orings* z pakietu *DAAG* zawiera dane na temat wypadków amerykańskich statków kosmicznych przed katastrofą promu Challenger (28.01.1986). Jedynie obserwacje 1, 2, 4, 11, 13 oraz 18 były analizowane przed katastrofą. Utwórz z tych obserwacji nowy zbiór danych oraz narysuj wykres całkowitej liczby wypadków w zależności od temperatury. Wykonaj podobny wykres dla całego zbioru danych i umieść oba wykresy obok siebie.\n",
"9. Zbiór danych *Manitoba.lakes* z pakietu *DAAG* zawiera informacje na temat powierzchni oraz wysokości n.p.m. 9 największych jezior w kanadyjskiej prowincji Manitoba. Narysuj wykres zależności powierzchni od wysokości n.p.m. Każde jezioro na wykresie powinno mieć nazwę. Ze względu na wartości odstające powierzchni warto skorzystać ze skali logarytmicznej.\n",
2021-03-10 11:38:01 +01:00
"10. Dla cechy *Sepal.Width* ze zbioru danych *iris* (cechy trzech gatunków kwiatów irysa) wykonaj wykres pudełkowy osobno dla każdego poziomu zmiennej *Species*. Zmodyfikuj wykres tak, aby przypominał poniższy rysunek.\n",
2021-03-07 15:19:50 +01:00
"\n",
"<img src=\"figs/lab1_1.png\" width=\"600\">\n",
"\n",
"11. Skonstruuj macierz o 10 wierszach i 10 kolumnach wypełnioną wartościami losowymi (rozkład jednostajny) z przedziału $[0,1]$. \n",
" - Narysuj ją za pomocą funkcji *image*. \n",
" - Zmień kolory na odcienie szarości.\t\n",
" - Wykonaj wykres konturowy za pomocą funkcji *contour*.\n",
"\n",
"12. W celu stworzenia wykresu 3d za pomocą funkcji *persp* potrzebujemy trzech zmiennych (x, y, z), gdzie z jest macierzą wartości, które chcemy narysować. Wykonaj poniższy wykres (przyjmij $z = (x + y)/2$ oraz $x,y\\in[0,1]$).\n",
"\n",
"<img src=\"figs/lab1_2.png\" width=\"600\">\n",
"\n",
"13. Wykonaj poniższy wykres (wykorzystaj funkcję *layout*) dla zmiennych ze zbioru *iris*.\n",
"\n",
"<img src=\"figs/lab1_3.png\" width=\"600\">\n"
]
}
],
"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",
"version": "3.6.1"
}
},
"nbformat": 4,
"nbformat_minor": 4
}