similar to: RE: [R] Graphics-Device-Size vs. Window-Size

Displaying 20 results from an estimated 20000 matches similar to: "RE: [R] Graphics-Device-Size vs. Window-Size"

2000 Nov 08
1
Graphics-Device-Size vs. Window-Size
I want to layout on screen a graphic bigger than the screen (width=16.53543, height=11.69291) but strwidth() and strheight() give wrong results. > x11(width=42/2.54, height=29.7/2.54, pointsize=12) > plot(1,1, type="n", xlim=c(0, 1), ylim=c(-1, 0), xlab="", ylab="", axes=FALSE) > strwidth("Whatever") [1] 0.08471151 > # Now resize the window and
2000 Nov 08
1
Graphics-Device-Size vs. Window-Size
I want to layout on screen a graphic bigger than the screen (width=16.53543, height=11.69291) but strwidth() and strheight() give wrong results. > x11(width=42/2.54, height=29.7/2.54, pointsize=12) > plot(1,1, type="n", xlim=c(0, 1), ylim=c(-1, 0), xlab="", ylab="", axes=FALSE) > strwidth("Whatever") [1] 0.08471151 > # Now resize the window and
2001 Jan 10
0
Re: some problems with windows(rescale=) (PR#794)
Part 1) is basically that the initial rescaling is done if the window is too large to fit on the screen. That's true and obvious (no scrollbars) and intentional and on the help page. As ever, you need to report bugs on what is documented, not what you would like. This will be changed for 1.2.1, but was several hours' work. I have also cleaned up the scrollbar behaviour. Part 2) I just
2010 Mar 27
1
string width calculation
Colleagues, I am trying to create a PDF document in which I use margin text with two different fonts. The resulting text might be: XXXXXyZZZ where X and Z are one font and Y is the other. My plan was to do this in the following manner: mtext("XXXXX ZZZ", cex=2, adj=0.5, family=SOMEFONT) mtext("Y", cex=2, adj=??, family=DIFFERENTFONT) My question regards how to calculate
2008 Jun 30
2
Plotting question: Problem with strwidth in 2.7.1
R users, I have a problem with function strwidth in 2.7.1. I'm trying to set the plot margins in a way that horizontal column labels will fit to the graph. tmp.t is a list of data.frame objects. This code works well in 2.6.0. ...snip.. library(gplots) for (i in names(tmp.t)) { bmp(filename=paste(i, "_", Sys.Date(), ".bmp", sep=""), width=1038,
2000 Dec 28
1
some (may be related) problems with windows(rescale=) (PR#794)
############################################################################### Before reporting 4 problems with windows(rescale=) I want to congrat on R1.2 and to thank r-developers for quickly adding the rescale workaround to the windows version. Happy New Year Jens Oehlschlaegel ###############################################################################
2007 Aug 14
1
{grid} plain units with non NULL data arguments
In help(unit) I read: The 'data' argument must be a list when the 'unit.length()' is greater than 1. For example, 'unit(rep(1, 3), c("npc", "strwidth", "inches"), data=list(NULL, "my string", NULL))'. In the newest R-versions it is not anymore allowed to let strings in the data-argument for plain units, otherwise one
2002 Sep 03
1
Properly initializing a plot
I have many functions for high-level plotting that early on in their code do something like strwidth('string', units='inches') before plotting. I do this before plot() to set the correct margins with par(mai=...), to leave room for wide text on the left or right margins. If the plotting device is not opened strwidth( ) causes an error that plot.new() needs to be called. I can
2000 Nov 15
1
Graphics-Device-Size vs. Window-Size: R design flaw
Dear Prof. Brian Ripley, thank you for answering. > Can we step back a bit? I think we could probably do better > than we do. > No one envisaged people resizing graphics windows when the system was > designed (as far as I can see), and locking aspect ratios (which > S-PLUS now does) when re-sizing looks sensible to me. We > might seriously > want to consider scrollable
2007 Jan 24
4
Text position in Traditional Graphics
R 2.4.1 on Windows XP. Question: In traditional graphics, is it possible to find out the height of a line of text in units that can be used in arithmetic and then in calls to text()? Context: I have written a function that draws a plot and then, depending on whether some arguments are TRUE or FALSE, draws various lines of text in the plot. The text lines may be turned on or off individually
2012 Feb 29
1
Computing line= for mtext
I want to right-justify a vector of numbers in the right margin of a low-level plot. For this I need to compute the line parameter to give to mtext. Is this the correct scalable calculation? par(mar=c(4,3,1,5)); plot(1:20) s <- 'abcde'; w=strwidth(s, units='inches')/par('cin')[1] mtext(s, side=4, las=1, at=5, adj=1, line=w-.5, cex=1) mtext(s, side=4, las=1, at=7,
2012 Sep 06
1
Change margin size of complex barplot
Dear R-help members, with the help of one of you the following R-Code was developed. No I have the (probably simple) problem that I want to increase font size of "text" and "ylab" names from 1 to 2. Unfortunately I'm not able to adjust the margin so, that the plot is appers complete (all names readable) on a 8:14 Inch scale plot. Some times I get the error message that
2005 Jun 01
1
panel.axis() & grid/lattice settings
Hello, I wish to customize the tick marks and labels of axes in panels produced by high-level lattice functions, namely xyplot. I know I can use the scales argument to specify values for rot, cex, etc. in the top-level call. However, I am interested in determining values for cex and rot based on the current panel / viewport and device. More specifically, I would like to make adjustments when
2005 Jun 02
0
Thanks! (was panel.axis() & grid/lattice settings)
Deepayan, Paul: Thanks very much for the very useful leads. I just spent some time this afternoon implementing your suggestions and my early test results are very encouraging. Paul, I understand the potential device re-sizing issue with the convert family of functions in grid, and will be in touch in case it becomes problematic for my applications. I very much look forward to your upcoming
2007 Nov 07
1
strwidth and strheight for rotated text
Dear All, I would like to plot text with a box around it. I used strwidth and strheight to compute the size of the box which is plotted with rect: z <- rnorm(10) # horizontal text works plot(rnorm(10)) x1 <- 5 y1 <- 0 label <- "Label" cha <- paste(" ", label, " ", sep = "") xh <- strwidth(cha, cex = par("cex")) yh <-
2006 Apr 11
1
Graphics device size
Dear All, When working with composite plots many times I have to manually adjust the graphics display window size to get the best results (in Windows XP). I can then find the size of the adjusted window in inches using par("din"). Now I would like to export the adjusted graphs as png's and have them look as close to the original display as possible. The problem is that the png
2004 Nov 20
1
Error with strwidth after lattice graphic drawn
In platform i386-pc-linux-gnu arch i386 os linux-gnu system i386, linux-gnu status major 2 minor 0.1 year 2004 month 11 day 15 language R I'm getting an error when using strwidth after a lattice graphic is drawn: library(lattice) xyplot(runif(20) ~ runif(20)) strwidth('xxx') Error in strwidth("xxx") : invalid graphics state Any help
2001 Jan 15
1
Memory problem 2 (PR#815)
Dear R-developer, Just some more details on the problem I reported several minutes ago. On an NT machine (4.0 SP6) I got the following for the same task: > version _ platform i386-pc-mingw32 arch x86 os Win32 system x86, Win32 status major 1 minor 2.0 year 2000 month
2010 Apr 15
2
graphic question
Hello, I have a simple question that I could not really figure out. I am plotting labels within a graph using the text function. I first plot the first label by specifying the x and y coordinates on the graph. Then to plot the second label next to it, I am using te strwidth function to get the width of the previous label in user coordinate then add the maximum width to the x value. However, this
2001 Jan 15
1
Re: AW: par(par()) corrupts devices (PR#807)
> From: "Dr. Jens Oehlschlägel" <jens.oehlschlaegel@bbdo-interone.de> > Date: Mon, 15 Jan 2001 13:58:00 +0100 > > Dear Prof. Ripley, > > I do not insist that features are bugs, so I stop sending this to r-bugs > and cc r-devel instead > > > I am replying to this from the archive: I did not actually receive a > copy. > > But it is right