similar to: 'Extracting' plot area

Displaying 20 results from an estimated 10000 matches similar to: "'Extracting' plot area"

2010 Nov 15
1
plot.dendrogram() plot margins
Hello, Is it possible to remove those extra margins on the "sample" axis from plot.dendrogram: par(oma=c(0,0,0,0),mar=c(0,0,0,0)) ddr<-as.dendrogram(hclust(dist(matrix(sample(1:1000,200),nrow=100)))) stats:::plot.dendrogram(ddr,horiz=F,axes=F,yaxs="i",leaflab="none") vs. stats:::plot.dendrogram(ddr,horiz=T,axes=F,yaxs="i",leaflab="none")
2010 Nov 25
1
overlap cdf plots and add colors and etc
Hi r-users, I would like to overlap 2 ecdf plots.  I tried this below and it gives me two plots of ecdf but just both just in black. par(mar=c(4,4,2,1.2),oma=c(0,0,0,0),xaxs="i", yaxs="i") plot(ecdf(datobs)) lines(ecdf(gam_sum_gen)) Then I try to add colors etc and also the legend but fail. par(mar=c(4,4,2,1.2),oma=c(0,0,0,0),xaxs="i", yaxs="i")
2013 Feb 14
1
fill colour in grid
Dear all r-users,   I have this code below to draw two squares, small and big square.  I would like to colour the small square with red and the big square with blue for example.  I tried using polygon but fail.  Thank you so much for your help.     par(mar=c(4,4,2,1.2),oma=c(0,0,0,0),xaxs="i", yaxs="i") plot.new() plot.window(xlim= c(0,8),
2007 Mar 06
1
Obtaining figures with exactly placed points
Dear list, I have to plot some geometrical shape given as list of points. My need is the following: let's say my shape is a 1 inch large square; how can I plot it with R in a graphic format that gives me an image *exactly* 1 inch large? I tried to set oma, mar and fin parameters, but with no success. I'm currently using the xfig driver for the final images are to be included in latex
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 Feb 12
2
shaded area graph and extra plot
R-help, I'm using the code below to plot a shaded area graph. At the same time I want to plot a second series on the y-axis (from par(new=T) on) but as the two series have different x-axis range (first 1994:2007 and second 1996:2007) the corresponding x's do not match. How can this be sorted out? Thanks in advance ############################################# plot.new()
2007 Jan 11
1
zero margin / marginless plots
Hi, I'd like to produce a marginless or zero margin plot so that the pixel coordinates represent the mathematics. xy<-data.frame(x=c(0,1,1,0,0),y=c(0,1,0,0,1)) png('junk.png',width=300,height=300) par(mar=c(0,0,0,0)) plot(xy$x,xy$y,xlim=c(0,1),ylim=c(,1)) dev.off() The resultant file has about a 10 pixel margin around these lines, and I'm not sure what parameter or function
2000 Nov 27
4
Margin question
I am trying to produce a postscript plot consisting of rectangles and text labels in R. It is going very well, but I have been unable to get small margins on the page. I read the documentation on the 'mar' and 'oma' options, but they claim that the margins should default to being 0.25in wide, in fact on my plot they are more like 1in each! Here is the smallest R script that
2009 Jul 26
2
moving text labels in plot
Hi R users I need to specify some parameter input in plot code to move Y text label to left. plot(temp, develo_rate, xlab = expression(paste("Temperature (C"^o,")")), ylab = expression(paste("Development rate (d"^-1,")")),las=1,pch=19, xlim=c(0,32),ylim=c(0,0.03),xaxs = "i", yaxs = "i") Plot result is added. any help? Ivan
2006 Jan 24
1
Basic graphics question
I have a toy example given here: par(fig=c(0,1,0,0.05)) par(mar=c(0,0,0,0)) par(plt=c(0,1,0,1)) par(oma=c(0,0,0,0)) par(ann=F) plot(c(0,1),c(0,1),type='n',xlab='',ylab='',main='') rect(0,0,1,1,col='gray75') What parameter am I missing to make the gray rectangle use the entire figure region? I am trying to build a plot from
2003 Apr 23
3
Changing the size of the bounding box
Greetings all: I have to create a graph that has very specific dimensions for publication purposes. The graph is a semilog scaled graph and the axes must range from 1 to 1,000,000 on the y axis and 0 to 100 on the x axis. The x axis should be exactly 8 inches and the y axis should be exactly 5.25 inches. I've been able to set the plot area to 8 x 5.25 using the par(pin=c(8,5.25)). The
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 =
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
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:
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)
2010 Nov 22
2
xlim=c(min(x), max(x)) still produces extra margin on both sides of x axis in plot()
code: op <- par(bg='black',fg='gray',col='gray',col.axis='gray',col.lab='gray',col.main='gray',col.sub='gray',mai=c(0,0,0,0), tck = 0.01, mgp = c(0, -1.4, 0), mar=c(0,0,0,0)) plot(x,y,ylim=c(-20,20),xlim=c(min(x),max(x)),pch='X',col = rgb(1,1,1, 0.5),yaxt="n", ann=FALSE) abline(v=c(min(x),max(x)), lty=3,
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
2008 Oct 19
1
convert lines to inches
Hi, how can I convert the unit "lines" of par("mar") into inches? par("mai") could help, but does not (see code below). I want to plot a curve in a predefined size in pdf (I add some margin space to the plot width&height, everything is in cm): pdf("test.pdf",width=(20+2+4)/2.54,height=(10+3+1)/2.54) plot(10:30,
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
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