Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. if(!require(library(plotrix))){install.packages('plotrix') }
  2. library(plotrix) ## A package for drawing ellipses ##
  3.  
  4.  
  5. plot(1, ty='n', ann = F, axes = F, xlim = c(-4, 6), ylim = c(-2.5, 2) ) ## platform for ellipses
  6.  
  7. axis(side = 2) ## HERE is my question ## ???
  8.  
  9.  
  10. draw.ellipse(x = rep(1, 11), y = rep(-1.2, 11),
  11. a = seq(1, 6, by = .4), b = seq(1/4.5, 6/4.5 , by = .4/4.5 ),
  12. lty = 2, border = 'gray60' ) ## Draw multiple Concentric ellipses ##
  13.  
  14.  
  15. AA <- seq(-4, 6, len = 13) ## A range of values on the x-xis just like "xlim" ##
  16. BB <- dcauchy( AA, 1, .95)*5 ## The Height for the AA according to a distribution ##
  17.  
  18. segments(AA, rep(-1.2, length(AA) ), AA, BB, lty = 3, lwd = 2, col= 'green4' )
  19.  
  20. curve(dcauchy(x, 1, .95)*5, -4, 6, add = T, col ='magenta', lwd = 3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement