similar to: Basic graphics question

Displaying 20 results from an estimated 5000 matches similar to: "Basic graphics question"

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
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),
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")
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
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,
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:
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
2009 Mar 17
1
Need a little help setting the upper median using "layout"...
The code I'm using is shown below. I would like to have a larger median at the top of the plot so that I can show the entirity of "title_text". Several times I tried messing with "par(mar", but that seemed to make matters worse. By any chance can anyone provide any insight as to the best way to increase the top/upper/northern margin, so the entirity of the title is
2000 Feb 02
1
Outer margin (oma) settings for pairs()
I propose the following small changes to pairs.default. The point is to allow control of the outer margin settings, so that there is for example room for legends. [Note also the issue re the setting of par()$usr on exit] ---------------------------------------------------------------- (1) Replace function (x, labels, panel = points, main = NULL, font.main = par("font.main"),
2008 Sep 25
2
ggplot, qplot in loop
Dear List, yes, me again trying to work with qplot ;-) I would like to make several single plots within a loop, like this (simplified and so on...): trials <- c("A","B","C") mycolours <- ("wheat","darkolivegreen","lightgreen",
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
2012 Mar 02
1
acf() plot of matrix cuts y-axis labels
Hello all, I found a funny problem with y-axis labels when plotting acf(matrix) - the labels are too close to one of the margins and cut in half. Here's the problem: test<-matrix(rnorm(200),ncol=4) acf(test) This doesn't fix the problem: test<-matrix(rnorm(200),ncol=4) par(mar=c(3,3,2,0.2),oma=c(0,0,0,0)) acf(test) This does fix the margin. I understand why, but not sure why ONLY
2005 Nov 19
1
Crop white border for PDF output
Hi, I produce a series of diagrams with R in order to include them in my documents (LaTeX). However, there is a white border around the diagrams. For some that do not have anything written at the very bottom, the white border is relatively large. The rather big space between figure and caption at the final document looks not nice. It would be best not to have any white border. I played with
2006 Jul 11
1
Misunderstanding with lines (or elsewhere)
Misunderstanding with lines(...) : http://7d4.com/r/ I would like the y coordinate of the horizontal line to be 1/4, and also the line to begin at x=0 and end at y=1. I'm obviously missing something ... so if anybody could help. Many thanks. test = function() { bmp('test.bmp', width=100, height=100) m = matrix(0, 2, 2) par(new=T, fig = c(0,1,0,1), mai=c(0,0,0,0), mar=c(0,0,0,0),
2008 May 21
2
'Extracting' plot area
Hi! Does anyone know hot to save (to png, pdf, ...) only plot area. That is without box around, titles, axis, ... I tried: par(mar=c(0,0,0,0)) and it works for internal viewer (linux and windows). But when I save the image in png it adds that annoying margin around plot area. Any ideas? by, Tine
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,
2010 Feb 12
2
Multiple figures margin problem
Hello All, I am trying to make a figure with 3x2 plots in it. Let us name the plots as such: 1 2 3 4 5 6 I begin my script with: par(mfcol=c(3,2)) par(oma=c(0,0,0,0)) --> This is for a postscript figure so I really don't need the outer margins. d=5 par(mar=c(d,d,d,d)) --> This applies to all the 6 plots. Now if d=0, plots 1-2,3-4 and 5-6 will have no gap between them and
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
2005 Dec 06
2
figure with inset
I am trying to plot a figure within a figure (an inset that shows a closeup of part of the data set). I have searched R-help and other sources but not found a solution. What I would like to do is (1) produce a plot (2) specify a window that will be used for the next plot (in inches or using the coordinate system of the plot produced in (1) (3) overlay a new plot in the window specified under (2)