similar to: Help with layout

Displaying 20 results from an estimated 9000 matches similar to: "Help with layout"

2013 Oct 04
3
Trying to avoid nested loop
Dear R users. I'm trying to avoid using nested loops in the following code but I'm not sure how to proceed. Any help would be greatly appreciated. With regards,Phil X = matrix(rnorm(100), 10, 10) ## Version with nested loopsresult = 0 for(m in 1:nrow(X)){ for(n in 1:ncol(X)){ if(X[m,n] != 0){ result = result + (X[m,n] / (1 + abs(m - n))) } }} ## No loop-sum(ifelse(M
2013 Dec 02
3
legend position
Hi all. I'm ploting a raster and I can't find the proper way to move the legend. For example, r = raster(system.file("external/test.grd", package="raster"))plot(r) How can I put the legend at the desired position? Thank in advance,Phil [[alternative HTML version deleted]]
2012 Jul 10
2
how can I show the xlab and ylab information while using layout
hi R-users: I want to draw three plot into one figure by layout and the script has been shown below. But I find R does not show the xlab and ylab information completely as shown the figure attached. How can I midify the script.? thank you . xxlab<-paste(cpmd," (",ro,"%)",sep=" ") yylab<-paste(rfmd," (",co,"%)",sep=" ")
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 Apr 11
2
Questions related to plotting boxplots of time series data
List, I have looked through several R books and searched the web to find answers to my questions with no results. I have a ensembles of time series data (essentially from Monte Carlo simulations) which I would like to summarize as a time series of boxplots. I don't know how to do this and I am not sure how I should structure the data to get what I want. Another related question: while
2008 Feb 15
2
Controling width of boxes in boxplots
Hi, I want to add boxplots to a scatterplot: plot(x,y, xlim=c(80,120),ylim=c(80,120)) boxplot(y,add=TRUE,at=118) boxplot(x,add=TRUE,at=118,horizontal=TRUE) How can I control the width of the boxes (say, I'd like them to be of width 3 in the variables' scales). I've tried the "width" parameter but failed. Thanks in advance, Marcin
2007 Jan 14
4
Controlling size of boxplot when it is added in a plot
Greetings, I am trying to add a boxplot to the bottom of a histogram, right between the histogram bars and the x axis. Here is the code I am using at the moment (the par line is probably not relevant for our discussion): hs <- hist(x, breaks = 20, plot = F) par(mar = c(3,3,2,1)) hist(x, breaks = 20, main = NULL, ylim = c(-2, max(hs$counts))) boxplot(x, horizontal = T, axes = T, add =
2001 Jul 27
2
boxplot question
I'm graphing a series of boxplots of grouped data inside a function that passes the data.frame, the names vector, and a title vector. Because both the data subset changes with each successive pass through the function, occasionally the names vector turns up with only one group to plot. This is an expected result. However, when the names argument in boxplot has only a single name, it
2007 Oct 15
4
boxplot() confuses x- and y-axes (PR#10345)
Full_Name: Bob O'Hara Version: 2.6.0 OS: Windows XP Submission from: (NULL) (88.112.20.250) Using horizontal=TRUE with boxplot() confuses it as to what is an x- or y-axis. At least, xlim= and ylim= are the wrong way round, log="x" (or "y") and xaxt= work as expected, I haven't looked at anything else. Some code to see if you can reproduce the bug (or discover
2010 Jun 18
1
ggplot2 boxplot: horizontal, univariate
In ggplot2, I would like to make a boxplot that has the following properties: (1) Contrary to default, the meaningful axis should be the horizontal axis. Lattice does this, for instance, by library(lattice);bwplot(~mtcars$mpg) (2) It is *univariate*, i.e., of a single vector, say mtcars$mpg. I do not wish to make separate plots for the different values of mtcars$cyl. (3) Nothing on the
2002 Jun 07
2
offset labeling boxplots
Hello everybody, often I plot boxplots with different number of boxes (up to 200 boxes). I'd like to give every box a readable label on the x-axis. Therefore, I decrease the fontsize of the names and plot them vertical. But if you zoom into the plot (pdf) you will find an offset between the tickmark and the label - the label is shifted to the right. If you vary the box.count in the
2013 Mar 21
2
Displaying median value over the horizontal(median)line in the boxplot
Hi, set.seed(45) test1<-data.frame(columnA=rnorm(7,45),columnB=rnorm(7,10)) #used an example probably similar to your actual data apply(test1,2,function(x) sprintf("%.1f",median(x))) #columnA columnB # "44.5"? "10.2" par(mfrow=c(1,2)) lapply(test1,function(x) {b<-
2013 Mar 13
4
boxplot
Hi, I try to boxplot following data on the subset of (V1,V3,V5,V7) and (V2,V4,V6,V8) V1 V2 V3 V4 V5 V6 V7 V8 2 4 6 7 12 33 43 53 how can I use boxplot function to plot it? thanks, William
2007 Apr 06
5
Labelling boxplot with fivenumber summary
I am very new to R so forgive me if this seems basic but I have done extensive searching and failed to come up with the answer for myself. I am trying to label a boxplot I have created with the values for the median, upper and lower quartiles and max and min values. I have been unable to do this or find anything on the net to say how it might be done. Is this possible and if so how? Regards,
2006 Apr 14
4
Newbie stuff (.new method)
Hi- Ruby 1.8.2 Rails 1.1 so I''m trying to build my first rails app and I''m trying to understand how the helper methods work. For instance .new & .save . For instance, I''ve created a table of Objects, and generated a scaffold. I see that in the controller, there are calls to Object.new and Object.save. I''m assuming that these are methods inherited
2012 Aug 16
2
multiple boxplots on the same figure - reducing space in between
Hi I have two vectors of integers and I am plotting a box plot that contains both vectors. I have done the following: vec1 < -scan("file1") vec2 < -scan("file2") boxplot(vec1, vec2, range=0, horizontal=TRUE, names=c("One","Two"), boxwex=0.15) I managed to get both boxplots on the same figure but there they are wide apart. Is there a way to reduce
2004 May 04
2
Superposing data on boxplot
Hi folks, I have a vaiable Y and an associated factor Z at several (13) levels. boxplot(Y~Z) produces a nice array of boxplots, one for each level of Z, and each duly labaelled with its level of Z. I would like to superpose on each boxplot the actual data points which it represents, i.e. do something conceptually (though not in real R) expressed as points(Y~Z) or points(Z,Y) It can
2011 Nov 17
1
Small inconsistency with boxplot
Dear R-core team, I think I found a small inconsistency in the boxplot function. I don't want to post it as a bug since I'm not sure this might be considered as one according to the FAQ --- and this is not a major problem. Don't hesitate to tell me if I'm wrong. If you try to do a boxplot on a matrix and set the "at" argument to some vector different from 1:n, n is the
2010 Feb 18
2
Error message when using error.bars(x,add=TRUE)
Hey hey, I`m analyzing a data set containing the element contentrations of various samples... I wanted to construct notched boxplots and got quite ugly results for some of the boxplots. The notches are often larger then the hinges which resulted in weird looking edges (even though I`m using a log-boxplot). To avoid this problem I thought about using "normal" log-boxplots and adding some
2012 Sep 08
4
method or package to make special boxplot
Hi, All, I am trying to use R to make the following type of boxplot while I couldn't find a way to do it. My dataset looks like X1 Y1 X2 Y2.... SPLIT. The split highlights my experiment details and both x and y are continuous numerical values. I need to plot y vs. x with split as legend and boxplot has to be used for all splits. May I ask how to get it? Currently available boxplot only