mi primer gráfico
TRANSCRIPT
![Page 1: Mi primer gráfico](https://reader036.vdocuments.pub/reader036/viewer/2022062503/5880888b1a28ab35718b61dd/html5/thumbnails/1.jpg)
Mi primer gráficoCON EL “R”
![Page 2: Mi primer gráfico](https://reader036.vdocuments.pub/reader036/viewer/2022062503/5880888b1a28ab35718b61dd/html5/thumbnails/2.jpg)
1. Crear dos objetos altura y frecuencia
• alt<-c(170,171,175,177,165,164,166,178,167,168,169,172,174,173)
• frec<-c(4,5,3,2,2,1,2,3,2,2,2,3,3,4)
![Page 3: Mi primer gráfico](https://reader036.vdocuments.pub/reader036/viewer/2022062503/5880888b1a28ab35718b61dd/html5/thumbnails/3.jpg)
2.Definir el eje de abscisas (eje Y) como la frecuencia, y el eje de ordenadas (eje X)
como la altura.
x<-c(alt)y<-c(frec)
![Page 4: Mi primer gráfico](https://reader036.vdocuments.pub/reader036/viewer/2022062503/5880888b1a28ab35718b61dd/html5/thumbnails/4.jpg)
3.Probar distintos tipos de gráficos. TIPO “O”
plot(x,y,type="o")
![Page 5: Mi primer gráfico](https://reader036.vdocuments.pub/reader036/viewer/2022062503/5880888b1a28ab35718b61dd/html5/thumbnails/5.jpg)
TIPO “h”
plot(x,y,type="h")
![Page 6: Mi primer gráfico](https://reader036.vdocuments.pub/reader036/viewer/2022062503/5880888b1a28ab35718b61dd/html5/thumbnails/6.jpg)
TIPO “b”
plot(x,y,type="b")
![Page 7: Mi primer gráfico](https://reader036.vdocuments.pub/reader036/viewer/2022062503/5880888b1a28ab35718b61dd/html5/thumbnails/7.jpg)
TIPO “p”
plot(x,y,type="p")
![Page 8: Mi primer gráfico](https://reader036.vdocuments.pub/reader036/viewer/2022062503/5880888b1a28ab35718b61dd/html5/thumbnails/8.jpg)
O En mi opinión, este tipo de gráfico (tipo h) es el más sencillo para trabajar. Ya que a simple vista se puede obtener una conclusión de una manera mas rápida.
O Le añado el título, subtítulo y el nombre de cada eje.