Many Thanks Dennis, The distributions are simulated ordinal data all bounded in the same upper and lower limit, and I wanted to plot how the distribution changes through time. Since the distributions are often multimodal boxplots were not useful so I made some violinplots... My practical solution which I'm testing right now is to create a matrix of frequencies and then plot these as a series of horrizontal barplots (after normalising each distribution) , using the offset parameter to control the temporal sequence....It actually works fine, but I was wondering if there were better ways...
Enrico On 20 Dec 2010, at 01:47, Dennis Murphy wrote: > Hi: > > You can get a violin plot in lattice rather straightforwardly. It's easiest > if time is an ordered factor, but you can also do it if time is numeric; in > the latter case, the code associated with Figure 10.14 in the Lattice book > provides a template to start with: > http://lmdvr.r-forge.r-project.org/figures/figures.html > > To get horizontal violin plots, use time as the y variable and start by > replacing panel.boxplot with panel.violin; see the help page of the latter if > more specific options are required. It also contains an example using a panel > function. > > I don't know how you expect to get horizontal histograms without setting the > time variable to be a factor. If you have enough time periods, the result > will not be pretty. If you have a fairly large number of time periods, the > best distributional displays are boxplots, violin plots, beanplots or some > variation of that general concept. > > Since neither data nor code were offered, one can only speculate so far as to > what your intentions might be. A reproducible example with data and code > would undoubtedly elicit more useful responses. > > HTH, > Dennis > > > On Sun, Dec 19, 2010 at 4:03 PM, Enrico R. Crema <enryu_cr...@yahoo.it> wrote: > Dear List, > > I have a set of distributions recorded at an equal interval of time and I > would like to plot them as series of horizontal histograms (with the x-axis > representing time, and y-axis representing the bins) since the distribution > shifts from unimodal to multimodal in several occasions. What I would like to > see is something close to a violinplot, but I do not want a kernel density > estimate... > Any suggestions or advice will be great! > > Thanks in Advance, > Enrico > ______________________________________________ > 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 > and provide commented, minimal, self-contained, reproducible code. > [[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 and provide commented, minimal, self-contained, reproducible code.