similar to: Drawing lines in margins

Displaying 20 results from an estimated 400 matches similar to: "Drawing lines in margins"

2005 May 25
1
Plot: Distance between tick and tick label on y-axis
Hello, I want to reduce the distance between my ticks and their labels. I managed to do it for the x-axis, but the y-axis puzzles me. Here's an example where there is no space between the x-asix ticks and labels. par(las=1) plot(runif(50), type="l",xaxt="n",yaxt="n",ylab="", bty="l") axis(2) axis(1,padj=-1.5) #However, axis(2,padj=-1.5)
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
2005 Jan 31
2
how to move x-axis labels down
Hi, In the code below, the labels I put on the x-axis are too high (they cross the axis). Can anyone tell me how to move them down? I've tried adj=, padj=, mar=, and various other things, but cannot move them down. Thanks. -Ben labs <- paste('sample', 1:10) plot(1:10, xaxt='n', xlab='') axis(1, at=1:10, labels=labs, padj=1, las=2) # las is a par() parameter
2010 Apr 30
2
Flattening and unflattening symmetric matrices
Here's an easy question: I'd like to convert a symmetric matrix to a vector composed of the upper.tri() part of it plus the diagonal, and convert it back again. What's the best way to achieve this? I'm wondering if there are some built in functions to do this easily. I can encode fine: v <- c(diag(A),A[upper.tri(A)]) but I don't see an easy way to recover A from v
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 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,
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,
2018 Apr 08
1
How to script the script sample into script "OR", please advice
Dear User R It's been a pleasure talking with you. I am newcomer use R. Would you please help me how to translate the script below to "R" script? * Area under receiver operating characteristic (AU-ROC) predict r1m1p, p roctab malaria r1m1p, graph summary * Area under receiver operating characteristic (AU-ROC) curve predict r1m2p, mu roctab malaria r1m2p, graph summary
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
2011 Dec 09
1
Align expression and text in mtext()
Dear R-helpers, I have trouble aligning an expression with a subscript, and text, in margin text: par(mar=c(6,6,1,1)) b <- barplot(1:3) mtext(c("A","B","C"), at=b, side=1, line=1, cex=1.3) mtext(expression(italic(C)[a]~(more~text)), at=0, line=1, side=1,cex=1.3) As explained in the help files and elsewhere, I understand that the expression is aligned by the
2012 Feb 12
2
plotting dates, incorrectly scaled x-axis?
Hi, I want to plot with axis.Date(), but something is scaled incorrectly. The red vertical line in is put on a totally wrong position. (sample below) Do you have an idea what I'm doing wrong? Thx Christof x11(width=30, height=20) x<-seq(as.Date("2010-02-27"), as.Date("2011-03-28"),"month") y <- seq(0,100,length=length(x)) plot(y ~ x,
2012 Oct 26
2
connect points in charts
Hi is there a automatic way that long distances between points are not connected. I have something like plot(x,y,type="o",...) atx <- seq(as.Date("2009-04-01"),as.Date("2011-04-01"),"month") axis.Date(1, at=atx,labels=format(atx, "%b\n%Y"), padj=0.5 ) but I do not want lines between points whose distance is greater than two weeks. thx
2018 Apr 08
2
Syntax roccomp-using R
*Dear Bert, * Thank you very much for your feedback and the useful link https://rseek.org/ and https://www.r-bloggers.com/calculating-auc-the-area-under-a-roc-curve/. Actually, I want to know different performance between Stata and R, in multilevel logistic regression. For this purposes, I replicate ".do" file use Stata in
2010 Jul 06
1
plotmath vector problem; full program enclosed
Here's another example of my plotmath whipping boy, the Normal distribution. A colleague asks for a Normal plotted above a series of axes that represent various other distributions (T, etc). I want to use vectors of equations in plotmath to do this, but have run into trouble. Now I've isolated the problem down to a relatively small piece of working example code (below). If you would
2002 Jul 31
2
Bug in legend?
This is a bit obscure but caused me some grief... R1.5.1/MS Windows There seems to be a peculiarity in legend associated with the use of expression text. It seems as if expression text is used in (eg) an mtext call then if the call to legend also includes expression text and a subscript then the legend box and line spacing depends on the value of cex used in the previous call to mtext,
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 ,
2009 Aug 19
0
font size on graphics
Dear R users, My question is about finding the proper font size for graphics. For this i had written a code that creats 4 diferent graphics and saves them as a png file. >From these PNG.graphics , i select one of the proper size and past it to a word document. I have experimented with lots of settings yet:nd lost my track a bit. there are cex; cexaxis cexlabes and so on, i lost track of
2009 Aug 19
0
font size on graphics question (correction in example,sorry)
Dear R users, My question is about finding the proper font size for graphics. For this i had written a code that creats 4 diferent graphics and saves them as a png file. >From these PNG.graphics , i select one of the proper size and past it to a word document. I have experimented with lots of settings yet:nd lost my track a bit. there are cex; cexaxis cexlabes and so on, i lost track of
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",
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/