Displaying 20 results from an estimated 10000 matches similar to: "aspect ratio 1 and blank space"
2004 Mar 19
5
asp=1 and aspect ratio
Hi everyone
I want a square scatterplot with abline(0,1) going exactly through the
SW and NE corners. By "square" I mean that the plotting region is
exactly square, and that the axis limits are identical.
x <- 1:20
y <- x+rep(c(-1,1),10)
lims <- range(c(x,y))
None of the following do this:
plot(x,y) ; abline(0,1) #not square
plot(x,y,asp=1);abline(0,1) #diagonal
2008 Oct 02
1
Contour Plot Aspect Ratio
Hello there,
I have a fairly simple request (I hope!)
I have produced a filled contour plot like this:
library(grDevices)
library(gplots)
library(plotrix)
filled.contour(contour, axes=F, frame.plot=TRUE, color=terrain.colors, ylab=
"Length Along Flume (m)", key.title = title(main="Velocity\n(m/s)"),
key.axes = axis(4, seq(0, 0.6, by = 0.1)), asp=2, plot.axes = {
2006 May 25
3
missed ylim from plot.default
? stato filtrato un testo allegato il cui set di caratteri non era
indicato...
Nome: non disponibile
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20060525/ef972e9f/attachment.pl
2010 Dec 13
1
Plot's aspect ratio and pty
Dear All,
I've been playing with pty, and it seems it does not produce square
plots as it is expected to (or at least as I expect it to). Consider
this simple example:
par(pty="s"); plot(1:10, 1:10)
This should produce a square plot, right? Well, if you have a look at
the graph, it is not square! So, maybe the limits?
par(pty="s"); plot(1:10, 1:10, xlim = c(0,11),
2008 Jul 20
3
asp and ylim
#See David Williams' book "Weighing the odds", p286
y <- c(1.21, 0.51, 0.14, 1.62, -0.8,
0.72, -1.71, 0.84, 0.02, -0.12)
ybar <- mean(y)
ylength <- length(y)
ybarv <- rep(ybar, ylength)
x <- 1:ylength
plot(x,y,asp=1,xlab="position",ylab="ybar",type="n",ylim=c(-1,1))
segments(x[1], ybar, x[ylength], ybar)
segments(x,ybarv,x,y)
2008 May 22
1
plot 7 * 3 matrix on DIN A4 pdf
Hello,
I want to plot 21 scatter plots in a 7*3 matrix on a single A4 page
(using mfcol). Below is an example, which -by and large- looks very
close to the desired result. But I do not get it to fill out the whole
page. If I specify the a different page size, the plots still do not
fill out the whole page.
Anybody an idea what to do? Maybe adjusting indvidiual plot size (if
so, how?). Or is there
2006 Oct 11
4
Help on direction of axis in R needed
Hi!
I'd like to plot things with axes going from the
highest to the lowest value, so that e.g. high values
on the xaxis are plotted to the left and low values to
the right.
Could anyone tell me how this is done? I couldn't find
anything in the documentation.
Thanks a lot!
Silli
2002 Apr 17
4
Problem w/ axis and distortion in a plotting function
I have a function for plotting soil texture that I am having a problem with.
The function is:
plot.psd <- function(sand, clay, ...) {
conv.ter <- function(x, y) {
x.con <- 100 - x - y*cos(1/3*pi)
y.con <- y*sin(1/3*pi)
data.frame(x=x.con, y=y.con)
}
plot(conv.ter(sand, clay), xlim = c(0,100), ylim = c(0,100*sin(1/3*pi)),
axes = FALSE, xlab="",
2010 Sep 08
6
'par mfrow' and not filling horizontally
Greetings, Folks.
I'd appreciate being shown the way out of this one!
I've been round the documentation in ever-drecreasing
circles, and along other paths, without stumbling on
the answer.
The background to the question can be exemplified by
the example (no graphics window open to start with):
set.seed(54321)
X0 <- rnorm(50) ; Y0 <- rnorm(50)
2003 Jan 15
1
lattice: cloud: aspect ratio, labels, vertical lines
I am interested to know how to make for clouds:
- aspect ratio = 1
- labels attached to points
- vertical lines from the points to the x/y base plane
I tried:
t = c( 'A', 'B', 'C', 'D' )
x = c( 100, 0, 200, 100 )
y = c( 0, 100, 0, 100 )
z = c( 80, 0, 20, 40 )
q = data.frame( x, y, z )
rownames( q ) = t
print(cloud( z ~ x *
2010 Aug 19
2
Aspect Ratio
set.seed(1)
x <- rnorm(n = 1000, mean = 0, sd = 1)
plot(x = x, asp = 2000)
Could someone please explain what the 'asp' parameter is doing?
2009 Nov 17
1
Plotting graphs using FOR loop
I have the following codes but can anyone make it shorter i.e making these
FOR loop into one loop ...
thanks...
par(mfrow=c(2,4))
for(i in 16:23){
hist(data[,i],main=paste(colnames(data)[i],sep=""),ylab="Frequency",xlim=c(1,5),xlab="Score",ylim=c(0,100))
}
png("histogram.png")
dev.off()
par(mfrow=c(2,4))
for(i in
2005 Apr 19
2
Aspect ratio and limits
Suppose I have the following data I want to scatterplot:
> xy
[,1] [,2]
[1,] 0 0
[2,] 21 4
I start up a graphics window and fire away:
> plot(xy)
- but because the graphics window is square, the aspect ratio is
wrong. So I add:
> plot(xy, asp=1)
- now the aspect ratio is correct, but the Y range is about -8 to 11,
whereas my data has a Y range of 0
2005 Jun 16
2
heatmap aspect ratio
Hi all,
Does anyone know of a fairly easy way to "stretch" a heatmap
vertically? I've got 42 arrays and would like to be able to see as
many significant genes as possible (right now I can only get 50 genes
with it still being readable). In some comparisons there are several
hundred significant genes.
I've fiddled with the "asp" argument, but that doesn't
2004 May 02
1
contourplot, xyplot, aspect ratio, mfrow
Hi,
I am gradually moving from the classical R plot functions to the library Lattice
I have some questions about contourplot () and its arguments:
1/ I am working on geographical coordinates which makes necessary that the X (longitude) and Y (latitude) units be represented with
the same distance on screen. This was obtained in the classical R plots with plot.default(x,y, asp=1,...) and then
2009 Aug 27
2
setting par(srt) according to plot aspect ratio
How can I look up the aspect ratio of a plot, so I can use that to correctly
adjust the angle of text which is supposed to be parallel to a line in the
plot?
The following example code works for a 1:1 aspect ratio, but puts the text
at the wrong angle if the plot region is short and wide or tall and narrow.
I can't find a par() component containing the plot aspect ratio. It will
be for
2010 Apr 20
1
multiple plots problem
hello,
i try to plot 3 graphs which have the same x.axis underneath each other. i'd
like the plots to be aligned without margings between the boxes and draw a
single x axis beneath the lowest plot.
i managed to get the alignment by setting par(mar), but the middle box is
stretched
and i cant't figure out how to get around this. par(pin) was my guess, but
this doesn't do the job
2005 Jul 19
1
initial points for arms in package HI
Dear R-users
I have a problem choosing initial points for the function arms()
in the package HI
I intend to implement a Gibbs sampler and one of my conditional
distributions is nonstandard and not logconcave.
Therefore I'd like to use arms.
But there seem to be a strong influence of the initial point
y.start. To show the effect I constructed a demonstration
example. It is reproducible
2010 Mar 09
1
Obtaining the true aspect ratio for a lattice plot
I almost always supply my own aspect ratio when plotting using
lattice. When I plot these to pdf, I would like to specify pdf
dimensions that will result in minimal margins around the plot. In my
application, resorting to a pdf cropper after plotting is not an
option - I must do it in R. The problem is that I cannot determine
the correct aspect ratio for the overall plot (accounting
2009 May 12
1
Graphic aspect ratio
Hi
I've been playing with a 3x2 graphics device using the default size as it
appears on screen. This has given me tall thin plots which I can resize by
dragging the window and increasing the window width. However I was wondering
if I can force R to produce square plots or set the actual aspect ratio. asp
seems to affect data units, not on-screen pixel units.
thanks
mike
--
View this