Displaying 20 results from an estimated 171 matches for "mgp".
Did you mean:
map
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, tck=0.01, mgp=c(1,-1.5,0))
Warnmeldungen:
1: In plot.window(...) : `mgp[1:3]' are of differing sign
2: In plot.x...
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 m...
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 = "x");
axis(1);
Based on the R...
2007 Jun 19
2
axis labels in multiple plots
Hi,
I'am trying to make a multiple bar plot over a map and I'm having difficulties with the distance
between axes labels and the axis. Trying to control this with mgp does not help because it
controls both axes simultaneously. For example, with default values (mgp = c(3, 1, 0)) y-axis
labels are ok, but x-axis labels are not. Setting mgp = c(3, 0, 0) gives good x-axis labels but
the y-axis labels are over the axis. Since I'm using subplot() from TechingDem...
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 = "x");
axis(1);
Based on the R...
2001 May 09
2
R help files -> S-Plus; par('mgp')
...a utility for going from .Rd to nroff.
I guess I could use .Rd -> html but the html would not
fully meet all the needs for S-Plus 6 help files.
Other approaches and ideas are most welcome.
Frank Harrell
P.S. I didn't get any reaction to my proposal to have
x- and y-axis specific par('mgp') parameters when
par(las=1). I hope that R-core will consider that.
--
Frank E Harrell Jr Prof. of Biostatistics & Statistics
Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences
U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat
-.-.-...
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 Wires", "Salt", "Conductive Board", "Needle
Siz...
2000 Feb 15
1
par: mar and mgp dead?
I just installed 99.0a, and I can't set mar and mgp:
> par(mar(2,2,.1,.1))
Error in par(mar(2, 2, .1, .1)) : couldn't find function "mar"
I had the same happen with mgp.
Are these bugs or a problem in my installation (everything else seems
OK)?
Is R core going to kill mar and mgp? If so, how should I fix the
huge margins and huge...
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 the y-axis label on its own?
Thanks for looking into my problem. I hope there is a so...
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
documenta...
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 way to position axis
titles/labels?
Regards,
Nicky Chorley
2011 Oct 16
1
mgp and axis title positions
...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 modified simultaneously. It would appear that you can specify mgp in the axis function, but that doesn't seem to work at all.
It is particularly frustrating when you need to adjust axis title positions separa...
2007 Aug 08
2
Relocating Axis Label/Title --2
...ngth=100)
y<-exp(-D_mean^2/5)
pdf("my.pdf")
plot(D_mean,y,type="l",yaxt="n",lty=2,lwd=2,col="black",
ylab = list(expression(paste(dN/dlogD[agg]," ["*cm^-3*"]"))),
xlab = expression(paste(D[agg]," [nm]")),
cex.lab=1.2
)
axis(2, mgp=c(0, 0.2, -2))
dev.off()
With mgp() I can tune the distance between the ticks and the tick
labels, but how can I move the axis label? I would like to move the
one along y to visualize correctly the exponent "3".
Kind Regards
Lorenzo
On 08/08/07, Lorenzo Isella <lorenzo.isella at...
2001 Apr 19
2
controlling plot spacing?
Suppose I have the bottom axis of a plot that looks like:
----+----+----+----+----+----+----
| | | | | |
1 2 3 4 5 6
Axis title
1. How do I reduce the gap between the ends of the ticks and the axis
labels (numbers)?
2. How do I vary the gap between the bottom of the axis labels and the top
of the axis title?
I have looked in various places
2011 Sep 12
1
Centering lines on barplot centers.
Hello,
I am trying to port one of my plotting S+ functions to R and I am having
difficulties!!! I am including here only the troublesome code!
I first produce a barplot, saving the positions of the bar's centers.
par(mar = c(6.1, 5.1, 4.1, 4.1), mgp = c(3, 3.0, 0))
ticks.loc <- barplot(sum.of.weights, col = 5, xlab = "", ylab = "",
axes = FALSE, axisnames = FALSE)
pretty.bar <-pretty(c(0, sum.of.weights), 6)
pretty.lab <- paste(pretty.bar, "%", sep = "")
axis(sid...
2004 Sep 30
2
pointsize in png graphics
...he 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), ncol = 2, nrow = 1, byrow = T),
widths = c(6, 1), heights = 1)
par(mar = c(0.2, 0.2, 0.2, 0.2), mgp = c(2, 1, 0), las = 0)
...
dev.off()
for 4 plots and the color-table
png(file = png.file, width = 650, height = 800, pointsize = 16)
layout(matrix(c(1, 2, 5, 3, 4, 5), ncol = 3, nrow = 2, byrow = T),
widths = c(3, 3, 1), heights = c(1, 1))
par(mar = c(0.2, 0.2, 0.2, 0.2), mgp = c(2, 1, 0),...
2002 Mar 19
3
plot with the axes at xlim and ylim
I'd like to make a plot with the axes drawn at the values of xlim and
ylim. The default plot draws the axes slightly outside these values. I
have been experimenting with the par(mgp) setting, but specifying
par(mgp=c(2,0,-1)) gives me
"invalid value specified for graphics parameter "mgp".".
A more complicated mathod that almost seems to work is doing the plot
with "axes=F" and then adding the axes with "axis" statements:
xlim <- c...
2010 Feb 05
1
About graphics
Hi,
I'm building a graph (barplot) in which the X axis label
disappears.
I tried to use the option mgp of par() and I could not get
the desired result.
Note that want the axis labels horizontally.
caes = c(37,20,19,16,75,103)
names(caes) = c("Pinscher", "Pastor \n Alem?o", "Poodle",
"Rottweiller", "SRD", "Outros")
caess = sort(caes, dec...
2002 Jul 01
3
manipulating axis labels in grid and lattice
I am trying to use wireframe at the moment and the axis labels are
overlapping with the tick labels. It seems that gpar does not yet
utilize the mgp argument. Is there anyway to manipulate the position of
the axis labels?
The best I can manage so far is to manipulate the cex so as to shrink
everything down.
thanks, Carlo Maley
--
Dr. Carlo C. Maley
Staff Scientist
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. C1-157
Seattl...
2008 Aug 06
4
defining the distance between axis label and axis
Hi,
How can I make the distance between an axis-label and the axis bigger?
I haven't found anything in par()...