Hi, I need to draw hmm's in R.I also need to include a small plot near each state of the hmm.How can I do this? -- Rajesh.J [[alternative HTML version deleted]]
Hi Rajesh, As you was little clean on your asking, try give a look at one of those pages. http://finzi.psych.upenn.edu/R/library/msm/html/msm.html http://finzi.psych.upenn.edu/R/library/msm/html/hmm-dists.html http://finzi.psych.upenn.edu/R/library/mhsmm/html/hsmmspec.html http://finzi.psych.upenn.edu/R/library/mhsmm/html/hmmfit.html http://finzi.psych.upenn.edu/R/library/RHmm/html/HMMSim.html May be some of then may contain things of your interest. Bests milton On Fri, Jul 10, 2009 at 2:43 AM, rajesh j <akshay.rajesh@gmail.com> wrote:> Hi, > > I need to draw hmm's in R.I also need to include a small plot near each > state of the hmm.How can I do this? > > -- > Rajesh.J > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Rajesh, To add a plot next each graph node I would open a new figure, with smaller size (see ?par) a. The plotmat function returns the position of all elements (in the example in pp). pp$comp contains the position of the boxes. b. Choose the position of the new figure (fig) and tell R not to clean the frame (new=TRUE) c. create the plot d. restore the size of the original figure (0,1,0,1) something like this: pos1 <- pp$comp[1,] fig <- c(pos1[1]+0.2,pos1[1]+0.4,pos1[2]-0.1,pos1[2]+0.1) par(new=TRUE,fig=fig) plot(1,2,pch=16,ylab="",xlab="") par(fig=c(0,1,0,1)) Karline [[alternative HTML version deleted]]