Sunday 15 July 2012

r - Hod do I plot contour plot for the given data -



r - Hod do I plot contour plot for the given data -

how plot contour info set?

phi n 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 100 0.5772 0.5762 0.5757 0.5752 0.5748 0.5742 0.5737 0.5716 0.5656 0.5594 300 0.5769 0.5761 0.5754 0.5747 0.5736 0.5728 0.5718 0.5682 0.565 0.5492 500 0.5763 0.5755 0.5748 0.5746 0.5732 0.572 0.5713 0.5674 0.5606 0.5449 1000 0.5755 0.5752 0.5742 0.5739 0.5723 0.5709 0.5689 0.5658 0.559 0.5422 3000 0.5753 0.5747 0.574 0.5737 0.5719 0.5707 0.5687 0.5652 0.5575 0.5419 5000 0.5749 0.5743 0.5738 0.5734 0.5714 0.5698 0.5679 0.5646 0.5566 0.5401

0.0, 0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9 phi values

just utilize contour() function. need organize info have numeric vectors n , p1 , numeric matrix x (depending on how have info stored, utilize indexing [ select appropriate rows , columns, , perchance as.matrix() convert info frame matrix.

summary(n) ## min. 1st qu. median mean 3rd qu. max. ## 100 350 750 1650 2500 5000 summary(p1) ## min. 1st qu. median mean 3rd qu. max. ## 0.000 0.225 0.450 0.450 0.675 0.900 summary(x) ## num [1:6, 1:10] 0.577 0.577 0.576 0.576 0.575 ... ## - attr(*, "dimnames")=list of 2 ## ..$ : null ## ..$ : null

then need is:

contour(n,p1,x)

see ?contour more details.

r

No comments:

Post a Comment