Re: [R] Graphics question: How to create a changing "smudge factor" for overlapping lines?

2010-06-16 Thread Tal Galili
Hi Paul, Thank you for the ggplot2 suggestions. Please note that during the last few hours, Hadley has put up his own ggplot2 implementation of the clustergram. I updated about it in the original post: http://www.r-statistics.com/2010/06/clustergram-visualization-and-diagnostics-for-cluster-analys

Re: [R] Graphics question: How to create a changing "smudge factor" for overlapping lines?

2010-06-16 Thread Paul Hiemstra
Hi Tal, I you use ggplot you can use the alpha command to make lines transparent. The nice thing is that when they overlap, the transparency adds up. I use this a lot to visualize outcomes from ensemble modelling (e.g. time series of RMSE). A small example: library(ggplot2) dat = data.frame

Re: [R] Graphics question: How to create a changing "smudge factor" for overlapping lines?

2010-06-15 Thread Tal Galili
Hello Hadley, Tormod and every one else. I just published a post on my blog, giving the code and presenting an example of it's use (on the Iris data set) http://www.r-statistics.com/2010/06/clustergram-a-graph-for-visualizing-cluster-analyses-r-code/ I welcome any comments (pitfalls, suggestions

Re: [R] Graphics question: How to create a changing "smudge factor" for overlapping lines?

2010-06-15 Thread Tal Galili
Hi Hadley, I wrapped the code into a function. I made it so all the lines would always start from the cluster mean. And I tried to give more meaning to the colors by giving the color according the the order of the first principal component of that observation. What do you think ? Tal # -

Re: [R] Graphics question: How to create a changing "smudge factor" for overlapping lines?

2010-06-15 Thread Hadley Wickham
> The glitches are the cases where you would have a bundle of lines belonging > to a specific cluster, but had spaces between them (because the place of one > of the lines was saved for another line that in the meantime moved to > another cluster). I think that display looked just fine! > I just

Re: [R] Graphics question: How to create a changing "smudge factor" for overlapping lines?

2010-06-15 Thread Tal Galili
Hi Hadley, Thanks for replying. The glitches are the cases where you would have a bundle of lines belonging to a specific cluster, but had spaces between them (because the place of one of the lines was saved for another line that in the meantime moved to another cluster). I just came up with a so

Re: [R] Graphics question: How to create a changing "smudge factor" for overlapping lines?

2010-06-15 Thread Hadley Wickham
> My current solution is to use a constant jitter (based on "seq") on all the > k number of clusters, but that causes glitches in the produced image (run my > code to see). What are the glitches? It looks pretty good to me. (I'm not sure if the colour does anything apart from make it pretty thou

[R] Graphics question: How to create a changing "smudge factor" for overlapping lines?

2010-06-15 Thread Tal Galili
Hello all, I am trying to create a Clustergram in R. (More about it here: http://www.schonlau.net/clustergram.html) And to produce a picture similar to what is seen here: http://www.schonlau.net/images/clustergramexample.gif I was able (more or less) to write the R code for creating the image, b

Re: [R] Graphics Question

2010-02-18 Thread RICHARD M. HEIBERGER
## The grouped boxplot is one of the features included in the HH package. ## You will need to install HH if you do not yet have the HH package ## A similar example is posted on my website ##http://astro.ocis.temple.edu/~rmh/HH/bwplot-color.pdf ## This is fake data which I hope mimics the struc

[R] Graphics Question

2010-02-18 Thread Lanna Jin
Hello All, I'm having some issues controlling graphics in R. I was wondering if anyone may help me tackle this problem: Given a data frame "X" with variables "Year", "Factor" (w/ n groups), and "Freq" How do I create a single graphic with the following plots aligned in a vertical stack? 1. box

Re: [R] R graphics question: "binary" bar chart

2008-02-19 Thread Jim Lemon
Stephan Spat wrote: > Hello! > > I would like to visualize the hospitalization within one year of several > patients using a bar chart. For each patient the stay in a hospital > should be illustrated with a dark colour a if there is a stay at home > between 2 hopital stays, it should be illustrate

Re: [R] R graphics question: "binary" bar chart

2008-02-18 Thread Henrique Dallazuanna
If I undestand your question you can try something about like this: x <- matrix(rbinom(75, 1,.6), nc=3) image(x, col=c("gray", "white"), axes=F) axis(1, at=seq(0,1, l=nrow(x)), labels=paste("Day", 1:nrow(x))) axis(2, at=seq(0,1, l=ncol(x)), labels=paste("P", 1:3, sep="")) On 18/02/2008, Stephan

[R] R graphics question: "binary" bar chart

2008-02-18 Thread Stephan Spat
Hello! I would like to visualize the hospitalization within one year of several patients using a bar chart. For each patient the stay in a hospital should be illustrated with a dark colour a if there is a stay at home between 2 hopital stays, it should be illustrated with a bright colour. e.g. P