Displaying 20 results from an estimated 30000 matches similar to: "Aspect Ratio"
2010 Nov 17
3
aspect ratio 1 and blank space
Hi,
I need to produce an ordinary scatter plot and it is vital that the aspect ratio equals 1.
I set the axis as:
plot(x, y, type="n", asp=1, ,ylim=c(-80,70),xlim=c(0,100)).
The problem is that I get some 'additional' blank plot area (basically, the lower bound of xlim becomes quite negative).
The xlim is not the range of the x-data, but I need the 0 there for further
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
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 = {
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
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
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 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
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
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
2011 Oct 02
1
plot: how to fix the ratio of the plot box?
Dear all,
this should be trivial, but I couldn't figure out how to solve it... I would like to have a plot with fixed aspect ratio of 1. Whenever I resize the Quartz window, the axes are extended so that the plot fills the whole window. However, if you have different extensions for the different axes, the plot does not look like "a square" anymore (i.e., aspect ratio 1). The same
2003 Mar 15
1
plots to metafile and x/y ratio
Dear all,
I have a problem which I'm not sure if it is due to my machine or if I'm
doing something wrong.
I'm ploting a little map using plot(val, type="l", asp=1) where val is
the object with the latitude/longitude data.
In the screen the figure is perfect, and I can copy to the clipboard and
paste it to other places. I can also saved using png() or jpeg(),
althoug
2007 Mar 25
1
controlling panel.width and panel.height in viewports
Dear all,
I'm trying to get a series of lattice levelplots to appear in
viewports in a particular way but struggling to exert fine control
over their appearence. There are two conditions: (a) I only want the
levelplot to appear (I don't want axes, colour key, etc) in the
viewport and (b) I want the levelplot to expand to the maximum
allowable space in the viewport while observing
2007 May 15
1
Getting default aspect ratio from lattice
How can I get the value of the aspect ratio that is used in a lattice
plot? In a levelplot for instance, the native units per cm of my x and
y axes are different, and I need to know the aspect ratio so that I can
correctly plot vectors. I know how to set the aspect in a high-level
lattice function but I can't quite figure out how to get it. I would
like call to levelplot() without printing
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)
2002 Jul 19
3
controling graphic window size and asprec ratio in windows
i am using the rarcinfo package
to draw maps.
for maps, th aspect ratio is quite important.
how can i control the aspect ratio and the size of a graphics window
in the mswindows version of R and more generally in R in general.
i would like to e able to both set the size before or while the window
is corrected,
and also for a window which already exists.
--
--
Erich Neuwirth, Computer Supported
2004 Jul 14
4
aspect ratio ?
Can someone enlighten me on what the status is of aspect ratio in theora
is ?
The ti structure has aspect_num and _den values, which I assume give the
intended display aspect ratio (e.g. 4/3).
The sample files on the bittorrent seem to say both values are 0 for all
files. I'd think it should at least be made impossible to have a 0 as
the denominator.
The library doesn't check the
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 *
2008 Jan 11
1
ggplot2, coord_equal and aspect ratio
Hi everyone, Hi Hadley,
I am a heavy user of coord_equal() in ggplot2 since most of my data is
spatial, on x,y coordinates. Everything works. However by enforcing an
aspect ratio of 1 for the plotting region, coord_equal() usually
wastes a lot of space if the region of interest is not a perfect square.
For example:
x=runif(10)
a=data.frame(x=x*3,y=x)
ggplot(data=a, aes(x=x,y=y)) +
2007 Jun 05
1
ggplot aspect ratio
Is there a way to control the aspect ratio of plots using ggplot?
Specifically, I'm using the formula=a~b argument to produce a grid of
plots, but the overall width of the result seems to vary for reasons
that are obscure to me.
This affects not only the appearance of the plots but the amount of
space available for the title (which seems to be right justified
relative to the right edge of the
2008 Feb 29
1
Poor encoding quality with etheora and aspect ratio problem
Hello,
I wrote a theora video encoder based on etheora (and the examples
provided with it) for Processing IDE (processing.org). I have some
problem with the quality of encoded frames.
eg. http://poux.be/tmp/movie.ogg
And when I play the movie with mplayer or totem, the video resolution
is changed from 640x480 to 854x480 (when i use
ETHEORA_ASPECT_NORMAL in etheora_enc_setup). And if I try to