d. sarthi maheshwari
2007-Feb-21 06:15 UTC
[R] Splom plot:how to plot with different symbols?
Hi, Kindly let me know if I posted a wrong question in the forum. I want to draw a splom plot with different symbols in plot. My command is as follows: splom(~ log10(splomData[2:3]), groups = programs, data = splomData, panel = panel.superpose, key = list(title = paste(splomLoop,"Programs of Hog Analysis (Sorted by LR(GB))"), panel = panel.superpose, columns = splomLoop, points = list(pch = c(1:splomLoop), #this will display different symbols in legend but not in actual graph col = rainbow(splomLoop, s=1, v=1), text = trim(as.character(ProgramNameList[1:splomLoop,1]))))) Kindly help. Thanks & Regards Sarthi M. [[alternative HTML version deleted]]
On 2/20/07, d. sarthi maheshwari <samay.sar at gmail.com> wrote:> Hi, > > Kindly let me know if I posted a wrong question in the forum. > > I want to draw a splom plot with different symbols in plot. My command is as > follows:> > splom(~ log10(splomData[2:3]), groups = programs, data = splomData, > panel = panel.superpose, > key = list(title = paste(splomLoop,"Programs of Hog Analysis (Sorted by > LR(GB))"), > panel = panel.superpose, > columns = splomLoop, > points = list(pch = c(1:splomLoop), #this will display different > symbols in legend but not in actual graph > col = rainbow(splomLoop, s=1, v=1), > text = trim(as.character(ProgramNameList[1:splomLoop,1]))))) > > Kindly help.I can't check since you haven't provided a reproducible example, but I would suggest something along the lines of splom(~ log10(splomData[2:3]), groups = programs, data = splomData, panel = panel.superpose, par.settings list(superpose.symbol list(pch = 1:splomLoop, col = rainbow(splomLoop, s=1, v=1))), auto.key list(title = paste(splomLoop,"Programs of Hog Analysis (Sorted by LR(GB))"), columns = splomLoop, text = trim(as.character(ProgramNameList[1:splomLoop,1])))) -Deepayan> Thanks & Regards > Sarthi M. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch 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. >
I believe you can add these lines before your splom() command: super.sym <- trellis.par.get("superpose.symbol") super.sym$pch <- 1:length(super.sym$pch) # change this # to specify symbols trellis.par.set("superpose.symbol",super.sym) Best regards, --- "d. sarthi maheshwari" <samay.sar at gmail.com> wrote:> Hi, > > Kindly let me know if I posted a wrong question in the forum. > > I want to draw a splom plot with different symbols in plot. My command is > as > follows: > > splom(~ log10(splomData[2:3]), groups = programs, data = splomData, > panel = panel.superpose, > key = list(title = paste(splomLoop,"Programs of Hog Analysis (Sorted by > LR(GB))"), > panel = panel.superpose, > columns = splomLoop, > points = list(pch = c(1:splomLoop), #this will display different > symbols in legend but not in actual graph > col = rainbow(splomLoop, s=1, v=1), > text = trim(as.character(ProgramNameList[1:splomLoop,1]))))) > > Kindly help. > > Thanks & Regards > Sarthi M. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch 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. >____________________________________________________________________________________ Get your own web address.