similar to: Align expression and text in mtext()

Displaying 20 results from an estimated 5000 matches similar to: "Align expression and text in mtext()"

2006 Aug 14
1
mtext uses the typographical descender to align text
<> Hello One sometimes (quite often really ) marvel at the choice of defaults in R's graphic engine. For some obscure reason, mtext uses the typographical descender (bottom of letters) to align text. That is: "gG" will end up slightly higher that "GG". Depending on the font, "Q" might end up higher than "O". (for explanation of baseline
2007 Sep 02
2
Different behavior of mtext
Dear R Users, I am quite surprised to see that mtext gives different results when it is used with 'pairs' and with "plot'. In the two following codes, it seems that the 'at' argument in mtext doesn't consider the same unit system. I would appreciate your comments on this issue. Sebastien ##### Pairs mydata<-data.frame(x=1:10,y=1:10) par(cex.main=1,
2013 Jan 07
1
Changing mtext direction, or using text for the margin?
Hi all, I have read through the archives, but can't find a solution to this problem. I need the text direction on "dependent B", plotted in margin 4, to go top to bottom (opposite what it is now). Here's some sample code: #plot with mtext example par(mgp = c(2,1,0), mfrow=c(2,2), las=1, mar=c(2,2,2,2), omi= c(0.5,0.2,0,0.2)) a<-1:10 b<-7:16 c<-21:30 plot(a~b,
2009 Jul 29
1
Drawing lines in margins
Hi all, Quick question: What function can I use to draw a line in the margin of a plot? segments() and lines() both stop at the margin. In case the answer depends on exactly what I'm trying to do, see below. I'm using R v. 2.8.1 on Windows XP. Cheers, Alan I'm trying to make a horizontal barplot with a column of numbers on the right side. I'd like to put a line between the
2004 Aug 19
3
mtext adj= wrong with several las= (PR#7188)
Dear all, Our quite basic function mtext() does wrong adjustments in some parameter configurations. This gets obvious when using multi line texts: There is no way to properly adjust text perpendicular to axis 2, for example. Best Jens Oehlschl?gel m <- matrix(1:9, 3) colnames(m) <- c("several\nlines", "several\nlines", "several\nlines") par(mfrow=c(2,2))
2012 Apr 06
1
Saving multiple plots using tiff function
Dear R experts, I am trying to save three plots using tiff graphics devices; however the following code only produces two files (Rplot002.tif and Rplot003.tif) showing figures 1 and 3. Here is a simplified ex code tiff(filename ="Rplot%03d.tif",width=24,height=20,units="cm",res=300, pointsize=10, compression = "lzw") plot(1) mtext("Fig
2007 Aug 24
3
changing text direction of mtext
Hello, Does anyone know if it's possible to change the text direction of mtext? I'd like to use 'mtext(side=2)' but the text should be 'left-to-right'. I couldn't find an argument for that in the help files. Thanks for any suggestions Tobias -- View this message in context: http://www.nabble.com/changing-text-direction-of-mtext-tf4321931.html#a12307342 Sent from
2009 Oct 05
0
Help in the mtext function
Hi Can anyone please help me in understanding the utility of "padj" and "outer (logical)" values in the '*mtext function*' given below are the output I generated on using the below code which is different from the formula description on r help > par(mfrow=c(2,1),xpd=NA) > y1 <- rnorm(100) > plot(y1,ann=F,axes=F,type="l") >
2005 May 12
2
Batch mode problem: figure margins too large (code corrected for word wrap)
First of all, I apologize for the triple post, but I did not see that the word wrap on the r-help list site would render my code unusable. So here it is again. Hoping that this time it will work if you cut and paste it in your Rgui. I have a program that works well in Rgui but that does not work in a batch file (Execution halted). Here's the code (it will work on your R, but you need
2007 Sep 25
2
Adjust barplot to the left
Hello, I have the following problem: I created an ecdf and a barplot. Unfortunatly, the bars are not where I would like them to be (please see picture below). http://www.nabble.com/file/p12877530/problem.gif That's my code: #------------------------ par(mfrow=c(2,1), mar=c(2,3,3,2)) #ECDF x = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2) F2.5 <- ecdf(x) plot(F2.5,
2012 Jan 18
2
How do I exactly align the right hand side of "mtext" relative to a plot device? Beyond "adj".
Hi, I have a problem with aligning text which I'm adding to a plot using "mtext". I would like to specify the position of the right hand end of the text string, relative to the device (in the left-right direction). I've been looking at the use of the argument "adj". But this can't be used to specify the rightmost point of the text. Neither does it specify exactly
2005 Jul 26
1
problem with Hershey fonts
This was reported to me by a colleague in China, so I may not be reproducing exactly what they are seeing (which I suspect is rw2011), but this is what I see: > version _ platform i386--netbsdelf arch i386 os netbsdelf system i386, netbsdelf status major 2 minor 1.1 year 2005 month 06 day 20 language R > help(Hershey) : : If the 'vfont' argument
2017 Jun 20
1
Help with the plot function
Dear all, I found the last example of this link ( https://sites.ualberta.ca/~lkgray/uploads/7/3/6/2/7362679/6c_-_line_plots_with_error_bars.pdf) very similar to the one I need to make for my paper, and I think I got what I wanted by applying some of the suggestions of this mail list. Here it is the code I devised (maybe there will be further improvements from the list): YEAR <- c(1996 ,
2008 Jul 08
1
shading an area in a edf
Hi, I've got the following edf: *** x = c(1.6,1.8,2.4,2.7,2.9,3.3,3.4,3.4,4,5.2) F2.5 <- ecdf(x) plot(F2.5, verticals= TRUE, do.p = TRUE, lwd=3, ylab = "", xlab = "", xlim = c(1,5.5)) abline(h= (0:5)*0.2) #mean abline(v=mean(x), lwd=2) mtext(text=expression(bar(x) == 3.07), side=1, adj=0.462, padj=3, cex=1) *** Now I would like to
2006 Jun 15
1
How to change the margin widths in png-plots?
Hello, I have tried to change the margin widths so that mtext (here "sd of consecutive pc intervals", look at the picture) and plot(...,xlab="bar") fits to the picture. Here is an example: http://users.utu.fi/attenka/margins.png This doesn't help: par(mar=c(5.1, 7.1, 4.1, 2.1)) And here are the commands: png(filename="/Users/kone/Vaitostutkimus/Pictures/
2017 Jun 20
0
Help with the plot function
Hi You are quite close. With slight modification of your code: par(mfrow = c(2, 1)) par(cex = 0.6) par(mar = c(0, 0, 0, 0), oma = c(4, 4, 0.5, 0.5)) par(tcl = -0.25) par(mgp = c(2, 0.6, 0)) plot(BUD~YEAR, type="o", ann=F, axes=F, pch=19, ylim=c(60,100),data=g1) axis(4, las=2) mtext("Bud Break (Julian Day)", side=4, padj=4) arrows(g1$YEAR,g1$BUD, g1$YEAR,g1$BUD + g1$BUD_SE,
2006 Jun 04
1
Problems using lwd in GDD
hi I'm using the GDD package (in a 64bits fedora machine using R 2.3.0) to save in a png file some plots and i noticed that changing the lwd parameter does not change my line width I tried the same script in a Windows based R (2.2.1 r36812), using no GDD, and it worked. Does anybody has a clue? My testing script is something dumb like this: library(GDD) GDD("pres24.png",
2011 Nov 15
1
Plot alignment with mtext
I would like the text plotted with 'mtext' to be alighned like it is for printing on the console. Here is what I have: > print(emt) ME RMSE MAE MPE MAPE MASE original -1.034568e+07 1.097695e+08 2.433160e+07 -31.30554 37.47713 1.5100050 xreg 1.561235e+01 2.008599e+03 9.089473e+02 267.05490 280.66734
2006 Apr 12
1
using GDD fonts
Hi I was searching for some X replacement for my job in R and i found the GDD I installed it and I match all the system requirements. My problem (maybe a dumb one) is that every plot comes with no font and i cant find a simgle example of a plot WITH FONT DETAIL in the list can anybody help me? a simple example: library(GDD) GDD("something.png", type="png", width = 700,
2017 Jun 20
2
Help with the plot function
Dear friends, I have the following dataframe: YEAR <- c(1996 , 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 ) T_MAR <- c(2.8, 6.5, 5.4,2.4, 4, 4.1, 3, 4.4, 4.5) T_APR <- c(5.7, 7.8, 7.7, 4.6, 4.7, 6.2,5.7, 5.9, 7) T_MAY <- c(7, 8.8, 10, 6, 5.5, 7.6, 8.5, 7.3, 10.2) BUD <- c(87, 98, 93, 85, 89, 91, 87, 92, 92) BUD_SE <- c(3.6, 2, 2.4, 4, 2.4, 2.4, 4, 2.4, 3) g1 <-