File:Polygon frequence 0001.png
Summary
| Description |
Euskara: 1:Bi maiztasun poligono alderatzea. R kodea:
>Atermo=c(11.26,3.73,0.18,0.81,6.07,0.20,4.13,0.38,1.98,2.83,1.27,1.47,0.07,
3.11,0.42,0.94,1.76,1.08,1.17,6.88,3.11,1.55,0.06,6.62,0.84,3.82,4.39,1.90,7.58,0.53)
>Btermo=c(7.64,0.69,3.89,4.89,2.37,0.09,1.08,0.64,3.08,3.82,1.96,1.28,4.57,
2.34,0.37,4.61,0.68,0.06,3.91,3.35,0.92,3.23,0.80,2.20,2.35,3.69,2.28,2.98,4.33,3.83)
>tarteak=c(0,0.2,0.5,1,5,12) #Tarteak nahi dugun eran definitu
>histA=hist(Atermo,breaks=tarteak,border=FALSE,ylim=c(0,0.7),xaxt="n",yaxt="n",
main="",xlab="Tenperaturak",ylab="Dentsitatea")
#Histograma eratu baina ikusezin eginez, ardatzen izenak kendu eta jarri nahi ditugunak,
titulua kendu, y ardatzaren mugak zehaztu.
>histB=hist(Btermo,breaks=tarteak,border=FALSE,ylim=c(0,0.7),xaxt="n",yaxt="n",
main="",xlab="Tenperaturak",ylab="Dentsitatea")
#Aukeran "plot.graph.freq" agindua erabil daiteke ("agricolae" paketean dago),
baina orduan "frequency=3" aukera adierazi behar da, dentsitateekin egin dezan.
> axis(1,pos=0,at=c(0.2,0.5,1,5,12),cex.axis=0.7)
#x ardatza 0tik abiarazi eta balio-markak jarri, tamaina jakin batez
> axis(2,pos=0) #y ardatza 0tik abiarazi
>library(agricolae)
> polygon.freq(histA,col=c("red"),lwd=4,frequency=3)
> polygon.freq(histB,col=c("blue"),lwd=4,frequency=3)
> title("Hozkailuko bi termometroak alderatzea") #Izenburua jarri
> legend(7,0.6,c("A termometroa","B termometroa"),col=c("red","blue"),lwd=4,cex=0.8)
#Gakoa jarri puntu jakin batean
|
| Date | |
| Source | Own work |
| Author | Joxemai |
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.