similar to: help with making a function of scatter plot with multiple variables

Displaying 20 results from an estimated 300 matches similar to: "help with making a function of scatter plot with multiple variables"

2008 Mar 31
1
Reorder the x-axis using lattice
Dear list, Is there a way to reorder the xaxis using lattice. Using the following data, the x-axis is ordered as BP GH MH PF RE RP SF VT but I would like the x-axis to be ordered as PF RP BP GH VT SF RE MH. Kön Skalor Tillfälle Medelvärde 1 Kvinnor BP 1-inskrivning 36.45283 2 Kvinnor GH 1-inskrivning 38.62255 3 Kvinnor MH 1-inskrivning 62.88889 4
2000 Feb 29
0
mapping of colornames into hsv: half way done
Ok, now we have the mapping of color names to color codes (see below) and conversion to rgb (something like Ben Bolker's function), but how to convert rgb to hsv? Thanks to Brian Ripley, Peter Dalgaard and Ben Bolker Details below Regards Jens etc/colors.big maps 455 names to rgb in S syntax etc/rgb.txt maps 657 names to rgb in C syntax, but unlike colors() it has mixed upper and
2011 Jul 28
2
not working yet: Re: lattice overlay
Hi Dieter and R community: I tried both of these three versions with ylim as suggested, none work: I am getting only single (pch = 16) not overlayed (pch =3) everytime. *vs 1* require(lattice) xyplot(Sepal.Length ~ Sepal.Width | Species , data= iris, panel= function(x, y, subscripts) { panel.xyplot(x, y, pch=16, col = "green4", ylim = c(0, 10)) panel.lmline(x, y, lty=4, col =
2007 Aug 10
4
help with counting how many times each value occur in each column
Dear list, I have the following dataset and want to know how many times each value occur in each column. >data [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,] -100 -100 -100 0 0 0 0 0 0 -100 [2,] -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 [3,] -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 [4,] -100 -100 -100 -100 -100 -100 -100 -100 -100
2009 Feb 26
1
ggplot2: labels points with different colors or idnumbers
Dear list,   Using ggplot2 I could produce both boxplot and points in the same plot but instead of points I would like to label the different subjects with different colors or their idnumbers. Is there away to do it? Also how can I put three plots on the same graph with ggplot2? mfrow=c(3,1) did not do the job.   > dat    group time   id  freq 1      1   00 0018  5.21 2      1   00 3026  3.13
2008 Feb 04
7
adding the mean and standard deviation to boxplots
Dear list, How can I add the mean and standard deviation to each of the boxplots using the example provided in the boxplot function? boxplot(len ~ dose, data = ToothGrowth, boxwex = 0.25, at = 1:3 - 0.2, subset = supp == "VC", col = "yellow", main = "Guinea Pigs' Tooth Growth", xlab = "Vitamin C dose mg",
2008 Jan 15
1
help with reshaping data into long format (correct question)
Dear list, I have the following data set id 1 2 3 4 5 6 7 8 9 10 disease a b c d e f g h i j age 23 40 32 34 25 32 22 35 29 21 city NY LD NY SG NY LD VG SA LD SG sex 1 1 2 2 2 2 1 1 1 2 treat_a y y y y treat_b n n n n n n ques1_1 2 4 5 6 8 3 1 2 4 5 ques1_2 6 4 5 12 10 9 8 4 5 7
2011 Apr 13
0
Clustering help in Heat Maps
Dear Experts, I am using the below script to generate the heat map of gene expression data. I am using Hierarchical Clustering (hclust) for clustering. Now I want to compare different clustering parameters such as *K-means* clustering, Model Based Clustering, I have two queries: 1. How to incorporate different clustering method in the same code? 2. Is this possible to implement pvclust in the
2009 Aug 06
1
adding color bar to a graph
Hi everybody, I am wondering how i can add a "stretch" color bar / legend to a graph that uses colorBrewer to define the colors in it. I will try to explain my graph, but i also uploaded it at: ftp://ftpext.usgs.gov/pub/er/fl/st.petersburg/Monica_pal/ The file is: robcor_training_pca.pdf - i will also attach this file in case some people accept attachments. So i took apart the
2008 Jan 15
0
Help with reshape data into long format
Dear list, I have the following data set id 1 2 3 4 5 6 7 8 9 10 disease a b c d e f g h i j age 23 40 32 34 25 32 22 35 29 21 city NY LD NY SG NY LD VG SA LD SG sex 1 1 2 2 2 2 1 1 1 2 treat_a y y y y treat_b n n n n n n ques1_1 2 4 5 6 8 3 1 2 4 5 ques1_2 6 4 5 12 10 9 8 4 5 7
2007 Feb 14
1
symbols hidden in polar.plot
Hi Folks, Here is my attempt at a simple polar plot. > pos <- seq(0,360,by=5) > tspk <- rep(c(1,0,1),c(13,47,13)) > require(plotrix) > polar.plot(tspk,pos,rp.type="s",point.symbols=17,point.col="green4") I only see half the symbols, the other half of each symbol is hidden under the circular grid. In fact if I change rp.type="r", I see the
2011 Jul 27
1
lattice overlay
Dear experts: I want to overlay lattice scatter plot: I do not know why the following code is not plotting subscripts ! Sorry if this question is too simple: require(lattice) xyplot(Sepal.Length ~ Sepal.Width | Species , data= iris, panel= function(x, y, subscripts) { panel.xyplot(x, y, pch=16, col = "green4", ylim = c(0, 10)) panel.lmline(x, y, lty=4, col = "green4")
2009 Feb 27
2
add absolute value to bars in barplot
Hello, r-help at r-project.orgbarplot(twcons.area, beside=T, col=c("green4", "blue", "red3", "gray"), xlab="estate", ylab="number of persons", ylim=c(0, 110), legend.text=c("treated", "mix", "untreated", "NA")) produces a barplot very fine. In addition, I'd like to get the
2009 Oct 07
3
graphics
Dear Sir, I am using the following cos which creates a 3 panel figure on one image. However the legend function i am using only allows the legend to be placed within the axes of one of the graphs. The plots however do not allow for a logend to be places within the axes do to the location of points on the graph. I can add the legend later using imaging software such as paint but i lose
2010 Feb 03
1
color blending and transparency
I am using ggplot and posted this question at that helplist. It was suggested that I try a more general R-help list for a possible solution to this problem. Within ggplot, I am using geom_area with red and blue and expect where they overlap should be purple. But instead, it's dark red. Playing with alpha and with different colors doesn't seem to solve the problem. Here's a very
2010 Dec 02
4
2D Random walk
I've wrote some code to simulate a random walk in 2 dimensions on a lattice. Basically I want to add something in to make it plot it point by point so you can see what is going on. Heres my code for the random walk in 2d RW2D<-function(N) { i<-0 xdir<-0 ydir<-0 xpos<-vector() xpos[1]<-xdir ypos<-vector() ypos[1]<-ydir for (i in 1:N-1)
1998 May 06
1
R-beta: R-0.61.3 "Color Allocation Error"
Running R under Solaris 2.5.1 I get "Color allocation error". the offending line is lines(x,col="green4",lty="dotted") from the "graphics" demo Any suggestions? The same program runs fine under linux, BTW. Ina --------------------- Ina Dau Computer Administrator - Room 101 - Pearson Building - UCL email: i.dau at ucl.ac.uk Phone: +44-171-4193636 snail:
2008 Jan 28
1
x-axis
Hi, I want to plot a graph and here is my code: ec<-rep(0,length(e)) fc<-rep(0,length(f)) plot(e,ec,type="p",col=1,pch=19) points(f,fc,col=2,pch=20) legend(1.0e+08,1.0,c("dog", "human"),text.col="green4",pch=c(19,20),col=c(1,2)) my major problem here is the x-axis is too large in scale and its very hard for me to read the
2006 Aug 30
1
How to put title Vertically
Dear all R users, Suppose, Dear all R users, Suppose, pauto.cor = pacf(lh, plot=F) max.lag = max(pauto.cor$lag) min.lag = min(pauto.cor$lag) centre = (max.lag - min.lag)/2 pauto.cor = pauto.cor$acf pauto.cor = pauto.cor[-1] par(mar=c(3,0,1,1)) barplot(pauto.cor, axes=F,xlim=c(max(pauto.cor), min(pauto.cor)), space=0, col="green4",border="green",horiz=T) #This plots
2008 Jan 24
1
adjustment on the x-axis scale width
Hi, I have sucessfully plotted the graph by using the following command: ec<-rep(0,length(e)) fc<-rep(0,length(f)) plot(e,ec,type="p",col=1,pch=19) points(f,fc,col=2,pch=20) legend(1.0e+08,1.0,c("dog", "human"),text.col="green4",pch=c(19,20),col=c(1,2)) Below are the values for e and f...the questions is how am i going to adjust