Displaying 20 results from an estimated 7000 matches similar to: "par: mar and mgp dead?"
2003 Dec 24
1
par(mgp) - unexpected behaviour (PR#6045)
Full_Name: Nicholas Boers
Version: 1.8.1
OS: Windows XP Home Edition, Debian GNU/Linux 3.0
Submission from: (NULL) (24.68.84.10)
mgp[2] specifies the axis labels' margin line relative to that of the axis line
(mgp[3]). The `par' help does not document this behaviour.
The following code demonstrates my observation:
plot.new();
par(mgp = c(3, 2, 1));
box();
title(xlab =
2003 Dec 24
1
par(mgp) - unexpected behaviour (PR#6046)
Full_Name: Nicholas Boers
Version: 1.8.1
OS: Windows XP Home Edition, Debian GNU/Linux 3.0
Submission from: (NULL) (24.68.84.10)
mgp[2] specifies the axis labels' margin line relative to that of the axis line
(mgp[3]). The `par' help does not document this behaviour.
The following code demonstrates my observation:
plot.new();
par(mgp = c(3, 2, 1));
box();
title(xlab =
2001 May 09
2
R help files -> S-Plus; par('mgp')
Thanks to Brian Ripley I have been using R utilities for
some time for converting S-Plus UNIX nroff help files
to .Rd to .html files. .Rd files seem to be the most
natural format for help files and this format is probably easier
to maintain than nroff, so I would like to start
using .Rd files as my master documentation format
if anyone has a utility for going from .Rd to nroff.
I guess I could
2004 Sep 30
2
pointsize in png graphics
Dear all,
I'm trying to produce 2 png files, one consisting of an image plot and a
color-table (also an image plot) and the other one consisting of 4 image
plots and a color table. I'd like the color table to be exactly the same.
The way I proceded is the following:
for one plot and the color-table
png(file = png.file, width = 650, height = 800, pointsize = 16)
layout(matrix(c(1, 2),
2000 Mar 21
5
par help wrong: xlog & ylog (PR#497)
Full_Name:
Version: 1.0.0
OS: linux
Submission from: (NULL) (193.62.250.209)
?par lists and describes xlog and ylog, though these are obsolete. It does not
list
log. I found out about log from ?plot.defaults--so that help is OK.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send
1999 Dec 13
1
pointsize?
A while ago there was a thread on graphics. I complained that the plots
produced by dev.print had symbols and fonts that were too small. I said
I had been using par(cex=2), but the advice was to use pointsize. I have
tried ps, is that what was meant?
par(ps=40)
x<-rnorm(100)
y<-rnorm(100)
dev.print(file="~/junk.ps", horizontal=FALSE)
No matter how big I make ps (40,60...), the
2009 Dec 11
3
`mgp[1:3]' are of differing sign (PR#14130)
Full_Name: Cornell Gonschior
Version: 2.10.0
OS: Linux
Submission from: (NULL) (212.201.28.40)
Hi,
in the introduction to R, you can find the following sentence in the par()
chapter:
"Use tck=0.01 and mgp=c(1,-1.5,0) for internal tick marks."
I thought that's nice, because I wanted to have tick marks and tick labels
inside and the axis title outside.
But:
> plot(z, las=1,
2008 Jul 19
1
axis() ignores supplied value of argument mgp[3]?
It seems that when an argument 'mgp' is supplied to axis(),
the mgp[2] value (position of tick mark labels) is honoured
but the mgp[3] value (position of axis line) is ignored.
Example:
plot(1:5, xaxt='n', ann=FALSE)
par(mgp=c(0,2,1))
axis(1, at=2:4, mgp=c(0,-2,-3))
Axis line is plotted at margin line 1, tick mark labels at line -3.
Is this a bug?
J. R. M. Hosking
2009 Jul 16
1
axis label config mgp
I have long axis labels (8units) on the x axis and 2 unit number labels on
the y axis. I need to move the x axis title without moving the y axis
title. I have used mgp=c(title, label and line), but mgp moves both the x
and y titles. The following puts the y axis title way way out to the left.
Anyone know how to move just the x axis.
X11()
conif<-c("Control", "Switched
2002 Apr 16
1
Can one aply 'mgp' to individual axis?
Dear R-wizards!
I want to move the axis label of the y-axis a little bit
more apart from the border of the plot (otherwise, it would overlap
with my horizontal numbering). 'par(mgp(3.5, 1, 0))' does it properly.
Unfortunately, it also moves the x-axis label which does not look good.
Is there a way to specify 'mgp' for each axis separately or
is there another way to move just
2005 Jul 06
2
Graphics: calling par(mar) after frame()
The following code produces 6 plots on a page, but the first is
distorted and different from the others:
par(mfrow=c(3,2), las=2)
for (i in 1:6) {
frame()
par(mar=c(7, 7, 1, 1))
axis(2); box(); abline(h=seq(0,1,.5), col=2:4)
}
The first plot's axes are mis-aligned with the plotting area implied
by the box. It seems to be a result of calling par(mar) after frame().
Is this expected
2000 Sep 11
1
plots: screwed up aspect ratio
This is a new problem: Old versions of R worked fine. I am not sure when
it got broken. I am posting here instead of bugs in case this is not a
true bug.
New vanilla plots (I mean I don't fool around with par() etc) are screwed
up in several ways:
- the tick marks are twice as long as they should be
- the gap between the end of the tick and the top of the numerical labels
is twice as big as
2011 Oct 16
1
mgp and axis title positions
Hi all,
I consider myself a somewhat experienced user of R, but have struggled with this for a while now. to the point where I just end up pulling the entire graph together in powerpoint and fixing it up from there.
How does one adjust the horizontal/vertical positions of axis titles? I've tried using mgp in the par function, but that never produces anything satisfactory as x and y-axes are
2001 Mar 07
4
R.xpm?
I use AfterStep on Linux. I made an R.xpm file (attached)
and put this icon in the "wharf". To invoke R I click on the R icon.
I did not find an offical R.xpm, and so I am submitting this one
for your collective consideration....
The idea behind the icon is that it looks like a scatterplot, which is
"statistical". My main beefs with my R.xpm are that it doesn't have a
2011 Jun 09
1
what is the mistake?? the coding still not function. no result display
# lda.r
> #
> # Author: Amsha Nahid, Jairus Bowne, Gerard Murray
> # Purpose: Perform Linear Discriminant Analysis (LDA)
> #
> # Input: Data matrix as specified in Data-matrix-format.pdf
> # Output: LDA plot
> #
> # Notes: Missing values (if any) are replaced by the half of the lowest
> # value in the entire data matrix.
>
2011 Jun 21
1
(no subject)
hello,
i already include the error in blue color word.
i hope it can help you to understand my question.
if not burden you, please give me a guide how to correct the error or maybe you
can correct the coding cause error.
thank you.
> # lda.r
> #
> # Author: Amsha Nahid, Jairus Bowne, Gerard Murray
> # Purpose: Perform Linear Discriminant Analysis (LDA)
> #
> #
2006 Jun 09
1
Saving dns2.plot as a jpg image
Hello,
I am using R 2.2.1 with sn 0.4.0 and am trying to save a dns2.plot as a jpg
file.
Here is the latest version of the code I have tried:
x <- seq(0,200,length=200)
y <- seq(0, 35, length=200)
jpeg(filename = "C:/fig1.jpg", width = 5, height = 4,pointsize = 12, quality
= 100, bg = "white", res = NA)
2008 Aug 20
2
Positioning of axis titles
Hi,
I have created a plot using filled.contour() and have the problem that
one of the axis titles and an axis label are overlapping. I have tried
changing par()$mgp (with, e.g. par(mgp=c(4,1,0)) ), but this just
makes the title go off the screen. I can't work out how to make the
plot take up less space in the window, so I can hopefully change mgp
and sort the problem. Is changing mgp the only
2011 Apr 06
0
mgp.axis.labels
Hello,
I am trying to use mgp.axis labels to locate the x-xis at a different
distance from the one specified for the y-axis. I know I could use other
functions such as mtext or axis. But I am curious to know about how to use
'mgp'axis.labels' from the Hmisc package. I tried following the example in the
documentation without success.
Sample code:
x<-1:10
y<-1:10
2000 Oct 09
4
lm question
I have not really used lm before and I was hoping for some help on a
simple problem.
Here is a toy version of the problem I want to solve.
y x grp
-.9 1 a
-.8 2 a
-.7 3 a
-.7 1.5 b
-.5 2.5 b
-.3 3.5 b
-.19 2.7 c
-.11 3.7 c
-.41 4.7 c
I want to fit a model that has one y-intercept and three slopes, one for