similar to: par(mfrow=c(3,4)) problem

Displaying 20 results from an estimated 8000 matches similar to: "par(mfrow=c(3,4)) problem"

2018 May 30
0
par(mfrow=c(3,4)) problem
Hi, You're mixing base plot and ggplot2 grid graphics, which as you've discovered doesn't work. Here's av strategy that does: https://cran.r-project.org/web/packages/egg/vignettes/Ecosystem.html This vignette has a good overview, well as info specific to that package. Sarah On Wed, May 30, 2018 at 4:43 AM greg holly <mak.hholly at gmail.com> wrote: > Hi all; >
2018 Feb 12
3
plotting the regression coefficients
Hi After melt you can change levels of your factor variable. Again with the toy example. > levels(temp$variable) [1] "y1" "y2" "y3" "y4" > levels(temp$variable) <- levels(temp$variable)[c(2,4,1,3)] > levels(temp$variable) [1] "y2" "y4" "y1" "y3" > And you will get graphs with this new levels ordering.
2018 Feb 12
2
plotting the regression coefficients
Hi Petr and Richard; Thanks for your responses and supports. I just faced a different problem. I have the following R codes and work well. p <- ggplot(a, aes(x=Phenotypes, y=Metabolites, size=abs(Beta), colour=factor(sign(Beta)))) + theme(axis.text=element_text(size = 5)) p1<-p+geom_point() p2<-p1+theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),
2018 Feb 12
0
plotting the regression coefficients
Petr, there was a thinko in your response. tmp <- data.frame(m=factor(letters[1:4]), n=1:4) tmp tmp$m <- factor(tmp$m, levels=c("c","b","a","d")) ## right tmp[order(tmp$m),] tmp <- data.frame(m=factor(letters[1:4]), n=1:4) levels(tmp$m) <- c("c","b","a","d") ## wrong tmp[order(tmp$m),] changing levels
2018 Feb 12
2
plotting the regression coefficients
Hi Maybe there are other ways but I would split data to several chunks e.g. in list and use for cycle to fill multipage pdf. With the toy data something like library(reshape2) library(ggplot2) temp <- melt(temp) temp.s<-split(temp, cut(1:nrow(temp), 2)) pdf("temp.pdf") for (i in 1: length(temp.s)) { p <- ggplot(temp.s[[i]], aes(x=par1, y=variable, size=abs(value),
2008 Jan 12
2
Lattice equivalent of par(mfrow = )
Dear r-helpers, Does anyone have a straightforward example of putting together three unrelated (expect for a common y-axis) xyplot() figures in what would be in base graphics a par(mfrow = c(1, 3)) arrangement? _____________________________ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400 Charlottesville, VA 22904-4400 Parcels: Room 102
2018 Feb 08
2
plotting the regression coefficients
Hi Petr; Thanks so much. Exactly this is what I need. I will play to change color and so on but this backbound is perfect to me. I do appreciate your help and support. Regards, Greg On Thu, Feb 8, 2018 at 1:29 PM, PIKAL Petr <petr.pikal at precheza.cz> wrote: > Hi > > I copied your values to R, here it is > > > > > dput(temp) > > > > temp <-
2018 Feb 16
2
Putting 733 discrete categories on Y-axis in qqplot2 as they are
Hi Petr; I would like to get a plot with names as they are in the original file. They are chemical names and I have 733 in the my file. For example, let me give to chemical names "*2-hydroxybutyrate/2-hydroxyisobutyrate*" and "*palmitoyl-arachidonoyl-glycerol (16:0/20:4) [1]**" .So, what should I put [c(2,3,1)] part in the command: iris$MySpecies<-factor(iris$Species,
2018 Feb 10
0
plotting the regression coefficients
Hi Peter; The R code you provided works very well. Once again thanks so much for this. The number of variables in my data set that should appear on the y-axis is 733 and they are not numerical (for example the name of one variable is *palmitoyl-arachidonoyl-glycerol (16:0/20:4) [1]**. So, the plot looks very messy in one page. How can I make the plot to print out on multiple pages? Regards,
2018 Feb 13
0
plotting the regression coefficients
Hi scale_colour_gradient(?red?, ?blue?) should do the trick. Actually I found it by Google ggplot colour http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/ http://www.sthda.com/english/wiki/ggplot2-colors-how-to-change-colors-automatically-and-manually#gradient-colors-for-scatter-plots question. So you could find it too and probably far more quickly then myself as I have also other duties. Cheers
2018 Feb 12
0
plotting the regression coefficients
Hi Petr; Thanks so much. This is great! Although last Sunday, alternatively, I have solved the problem using the following statement at the very end of the program. * ggsave('circle.pdf', p4, height = 70, width = 8, device=pdf, limitsize = F, dpi=300).* This works very well too. Asa my categorical variables are in my Y axis, my R program reorders the names on Y-axis. However, I would
2018 Feb 08
4
plotting the regression coefficients
Hi Dear all; I would like to create a plot for regression coefficients with each independent variable (x) along the side and the phenotypes (y) across the top (as given below). For each data point, direction and magnitude of effect could be color and significance could be the size of the circle? Is this possible? I would greatly be appreciated your help. Thanks, Greg y1 y2 y3 y4 y5 y6 x1
2018 Feb 19
0
Putting 733 discrete categories on Y-axis in qqplot2 as they are
Hi When you load external file to R, character variables are converted to factors by default and alphabetically sorted. I have limited connection to internet, so I cannot find the answer, you could try it yourself. Maybe you could try not to convert vector with names to factor, which, for plotting issue is not different from factor coding. See ?read.table for details However I am not sure if it
2018 Feb 16
2
Putting 733 discrete categories on Y-axis in qqplot2 as they are
Hi Petr; Thanks. I do save the result in pdf by using the following command. ggsave("z7.pdf", p4, height = 95, width = 8, device=pdf, limitsize = F,dpi=300) I can achieve the y axis with 733 levels. But I need get the plot WITHOUT reordering the names. Regards, Greg On Fri, Feb 16, 2018 at 3:39 PM, PIKAL Petr <petr.pikal at precheza.cz> wrote: > Hi > > >
2018 Feb 08
2
plotting the regression coefficients
Hi Petr; Thanks for your reply. It is much appreciated. A small example is given below for 4 independent and 4 dependent variables only. The values given are regression coefficients.I have looked ggplot documents before writing to you. Unfortunately, I could not figure out as my experience in ggplot is ignorable Regards. Greg y1 y2 y3 y4 x1 -0.19 0.40 -0.06 0.13 x2 0.45 -0.75 -8.67 -0.46 x3
2018 Feb 16
0
Putting 733 discrete categories on Y-axis in qqplot2 as they are
Hi What do you mean ?without reordering the names?. Factor variable is ordered according to its levels and you can freely change the ordering. This is why factors are useful and worth to use in many cases instead of character vectors. See this result > iris$MySpecies<-factor(iris$Species, levels(iris$Species)[c(2,3,1)]) > p<-ggplot(iris, aes(x=Sepal.Length, y=Species)) >
2004 Feb 20
1
unexpected postscript output with par(mfg)
Hi, a colleague of mine encountered some unexpected behavior regarding the postscript output from R. It's difficult for me to tell whether or not this is an R problem or a ghostview/gv/interpreter problem. Just to note, I think it's exactly the same situation reported here: http://finzi.psych.upenn.edu/R/Rhelp02/archive/25436.html The following code produces a working plot (no
2018 Feb 08
0
plotting the regression coefficients
Hi I copied your values to R, here it is > dput(temp) temp <- structure(list(par1 = structure(1:4, .Label = c("x1", "x2", "x3", "x4"), class = "factor"), y1 = c(-0.19, 0.45, -0.09, -0.16), y2 = c(0.4, -0.75, 0.14, -0.01), y3 = c(-0.06, -8.67, 1.42, 2.21), y4 = c(0.13, -0.46, 0.06, 0.06)), .Names = c("par1", "y1",
2003 Jul 11
1
Title obscured when using par(mfrow) (PR#3463)
I want to put multiple plots on a page using par(mfrow), then a single title at the top. This should work, but doesn't: R> par(oma=c(0,0,4,0), mfrow=c(3,4)) R> for (i in 1:12) {plot(1); title(i)} R> ## text(10,10, ".") R> par(mfrow=c(1,1), oma=c(0,0,1,0)) R> title("Main Title") The main title does not appear. However, uncommenting the third line
2017 Jun 20
2
Help with the plot function
Hi, Bert: Yes, I studied the functions you suggested, but I didn't get to adapt it to my example whose reproducible code I sent in my first email. Here it is the code of the functions I studies: ## par par(mfrow = c(2, 3)) par(cex = 0.6) par(mar = c(3, 3, 0, 0), oma = c(1, 1, 1, 1)) for (i in 1:6) { plot(1, 1, type = "n") mtext(letters[i], side = 3, line = -1, adj = 0.1, cex =