Displaying 20 results from an estimated 10000 matches similar to: "how to control exact positions of axis"
2012 Jan 08
2
need help with axis ticks
hi,
i am using par(mrow=c(6,6)) function to get 6x6 plots on one screen. the
problem that i am having is that the axis tick labels are far away from the
ticks and going into previous plots (see attached figure). i need to know
how can i reduce the distance between the ticks and their values (y axis
values).the part of the code that i am using (after reading in the data) to
create the top row is:
2008 Apr 14
2
Plotting with exact axis limits
Hello,
If I make a plot, say something simple like
plot( runif(100) )
then the origin (0,0) is not at the bottom-left corner of the box
surrounding the plot. The axis limits are "padded" slightly. This is
ordinarily a good feature, because it makes plots look better. But now I
would like to make a plot with the origin exactly on the bottom left.
Through trial and error, I have
2012 Dec 13
3
Combined Marimekko/heatmap
Hi all,
I'm trying to figure out a way to create a data graphic that I haven't ever seen an example of before, but hopefully there's an R package out there for it. The idea is to essentially create a heatmap, but to allow each column and/or row to be a different width, rather than having uniform column and row height. This is sort of like a Marimekko chart in appearance, except that
2006 Dec 27
4
axis and times() problem
Dear R-Group,
the first example is working as expected, but I need the plot without
the box,
normally no problem, but I am not able to get the x-axis formatted as
times with the axis, command.
I tried a lot of things, nothing was working so I used the most easy
axis command in the second example here ....
# working
library(chron) # for times()
library(graphics)# for axis
2006 Dec 27
4
axis and times() problem
Dear R-Group,
the first example is working as expected, but I need the plot without
the box,
normally no problem, but I am not able to get the x-axis formatted as
times with the axis, command.
I tried a lot of things, nothing was working so I used the most easy
axis command in the second example here ....
# working
library(chron) # for times()
library(graphics)# for axis
2004 Mar 15
4
setting x-y axis at origin
Hello -
I'm just getting into 'R' and am having trouble setting up the x-y axis
to share (0,0). In the example posted here:
http://geocities.com/chris_ciotti/Images/part1.pdf, each axis has a 0
which I do not want.
Any help on getting a graph starting at (0,0) would be greatly
appreciated.
--
chris ciotti (chris_ciotti at yahoo.com)
PGP ID: 0xE94BB3B7
2012 Oct 01
2
Reading labels for very large heatmaps
Hello,
I have a large (919 X 919), hierarchically clustered heatmap that I would
like to read the labels off of. I have tried saving the figure in pdf
format and enlarging it until I can see the labels, but if I make the labels
small enough to read (so that they don't overlap) using cexRow and cexCol,
they do not appear in the pdf. The limit seems to be anything below cexRow
or Col = 0.06.
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
2010 Feb 07
4
x-axis plot problem
Hi all,
I tried to have plot of many vector in one plot and i have got a nice plot
but i have problem with x-axis. I want to have month and year only(Jul.07
means July 2007) in x-axis without appearing other number behaind it.
I would appercit any help.
The R code:
F<-c(7.49,6.91,6.78,6.99,7.44,7.42)
M<-c(4.81,4.51,5.21,4.65,4.75,3.86)
P<-c(7.49,15.03,15.19,15.32,15.42,15.45)
2007 Oct 24
1
Adding a second y axis and specifying yaxs="i"
Hello All,
I have plotted a barplot and placed a line plot over top using
par(new=TRUE).
In the first plot I have specified that yaxs="i" and xaxs="i". However
when I add a new axis to side 4 (right) and try to specify yaxs="i" it
does nothing and the axis line begins above the x axis when I want the
two points to meet. Can anyone tell me how to specify the
2005 Apr 01
3
plot axis appearance problem
Hello,
When I plot any data with simple plot command in
R, for example :-
plot(time,co2,ylim=c(350,380),xlim=c(1993,2003),xlab=NA,ylab=NA,type="p",col=5)
Then the first value of x-axis(350) and
y-axis(1993) never starts from origin, always they
sifted from the origin. Is there any command that
I can correct this in the ploted figure and both
the axis values start from origin.
2009 Jan 05
1
adding a curve with xaxs="i"
I want the curve to touch the y axis like the curve touches the upper boundary.
How can I eliminate the margin between axis and curve on the left side?
x1 <- c(1,2,3,4,5)
x2 <- c(2,4,6,8,10)
mod <- lm (x2~x1)
hm <- function (x) (mod$coe[1]+x*mod$coe[2])
plot.new()
# ...
box()
curve (hm,lty=1,add=T,xaxs="i",yaxs="i")
(R 2.8.1)
--
Sensationsangebot verl?ngert: GMX
2007 Jun 26
4
boxplot and bxp do not respect xlim by default (PR#9754)
Full_Name: Steve Ellison
Version: 2.4.1
OS: Windows, Linux
Submission from: (NULL) (194.73.101.157)
bxp() allows specifcation of box locations with at=, but neither adjusts xlim=
to fit at nor does it respect xlim provided explicitly.
This is because bxp() now includes explicit xlim as c(0.5, n+0.5), without
checking for explicitly supplied xlim (or ylim if horizontal).
This also prevents
2011 Jan 28
1
Adding image to plotting area
Hello,
I've drawn a black rectangle over the plotting area, and when I add an image() heatmap, it doesn't take up all the area, but is set inward from the black rectangle. Can anyone suggest how to make it stretch out to the entire area ?
Minimal example :
y <- matrix(runif(2000*20), nrow = 2000)
y[100:200, 10] = NA
plot.new()
usr <- par('usr')
rect(usr[1], usr[3], usr[2],
2011 Feb 16
3
image() with a vector
Hi,
I have a vectors x and z, for example,
x <- 0:20
z <- round(runif(20,1,7))
y <- 0.5
and I want to display z as an image. However if I then call image() with a vector
image(x,y,t(z),zlim=c(1,7),col=heat.colors(7),xlab="Year",ylab="Action",yaxt="n",xaxs="r",yaxs="r")
then I get the error
Error in image.default(x, y, t(z), zlim =
2006 Aug 08
1
parameter yaxs / function hist (graphics)
Dear R users,
The parameters xaxs and yaxs (function par, package graphics)
seem not to work with the function hist (package graphics),
even when the parameters xlim and ylim are defined.
Is there any way to make yaxs="i" and xaxs="i" work properly
with the function hist, mainly to produce histograms that
"touch" the horizontal axis? The R documentation and the
R
2010 May 26
2
xlim/ylim and actual axis length
Dear plotting wizards,
when plotting in R, the actual lengths of the axes are slightly
greater than the ranges of the x/y variables or xlim/ylim values.
how do I control the amount by which the axes are enlarged? Is
there a way to enforce that the lengths of the axes equal
xlim/ylim?
example:
plot(0:100,0:100,pch="+")
it can be observed, that the x- and y-axis join at approx.
2010 Feb 19
1
color graph in multiple plots
Hi,
I would like to distinguish my plots using colors but I got error message. How do I correct that?
plot(ecdf(z), main ="CDF for observed and simulated weighted sum",type="l",lwd=2,col="blue",
xlab="Weighted sum (mm)", ylab="Cumulative Percent", xlim=c(0,15), xaxs ='i', yaxs ='i',ylim=c(0,1))
par(new=TRUE)
2003 Jan 16
1
graphics
Dear R community,
I need to plot the results of some simulations I did using QTL
Cartographer. I am plotting LOD scores over three chromosomes. The three
plot have to be one next to the other.
The procedure I am using is:
par(mfrow=c(1,3))
plot(x$x, x$y, ylim=c(0,35), type="l", col="blue", las=1, xaxs="i",
yaxs="i", xlab="X Chromosome",
2006 Mar 13
1
Newbie error or bug?
Hi
I used R for the first time yesterday. I wanted to plot the aliasing
effect of sampling a 5.5KHz sinusoid at only 8KHz (below the Nyquist
limit). So I wrote a small R script that a) plots 1msec worth of a
5.5KHz sin wave b) plots 1msec of the resulting 2.5KHz alias and c)
plots the 8 sampling points on the 5.5KHz source wave. I think I have
found a bug. The script is as follows: