Displaying 20 results from an estimated 4000 matches similar to: "Wishlist: strwidth allow for rotation of text (PR#7931)"
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 Feb 08
2
rotating axis / mtext labels
Hello list.
Is it possible to use par(srt=45) to rotate text by 45 degrees along the
x-axis of a plot. Using:
<code>
x_names<-c("C57 Nv", "C57 Vacc", "129 Nv", "129 Vacc", "IFNgR Nv", "IFNgR Vacc")
par(srt=45)
mtext(font=2, x_names, side=1, line=1, at=l, cex=1.2)
par(srt=0)
</code>
doesn't seem to work in R 2.2.0
2005 Oct 23
1
Coloring leaves, twigs and labels in plot.dendrogram()
Core developers,
I couldn't find any simple way to send a vector of colors to apply to each
terminal in plot.dendrogram() or plot.hclust()---I asked R-help about it a
few weeks ago and didn't get any response---so I hacked that functionality
into the plot.dendrgram code (see below for hacked function plus
examples)....
Is there any chance this functionality could be added to the
2006 Oct 17
2
plotting text with very small negative rotation hangs (PR#9301)
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig308510A16A445880F353C5C9
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
to trigger the bug:
plot(0:1,0:1)
text(0.5,0.5,"abc",srt=3D-1e-9)
this doesn't happen for positive, small srt,
or for negative srt with magnitude greater
than about 1e-8 (the example in
1999 Aug 16
2
axis ignores srt/crt (PR#249)
Rotated text for axis labels should be possible with one of
par(srt=90)
axis(1,at,labels)
par(srt=0)
or
axis(1,at,labels,srt=90)
(or similar with crt instead of srt)
None of these works in pre0.65 or in 0.64.2
_
platform sparc-sun-solaris2.7
arch sparc
os solaris2.7
system sparc,
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
2004 Dec 02
3
Wishlist: simple legend options (PR#7400)
Full_Name: Elizabeth Purdom
Version: 1.9.1
OS: Windows XP
Submission from: (NULL) (171.64.102.199)
It would be nice if legend had the option of some default locations you could
choose instead of entering specific coordinates, like "topleft",
"topright","topcenter", etc. based on par("usr") coordinates. I know I've wanted
it so often I've made my
2002 Sep 16
0
mosaicplot enhancements (PR#2023)
This is a feature request for mosaicplot, including the
suggestion for the code changes (mosaicplot.R) and docs
(mosaicplot.Rd) by Wolfram Fischer and myself,
diff'ed to 1.6.0 beta (2002-09-14):
Uwe Ligges
.../src/library/base/R/mosaicplot.R:
====================================================
11a12,13
> ### Changes by W. Fischer and U. Ligges:
> ## - Deparsing x in for main
2008 May 27
5
Rotated text on a regression line
Dear all,
I stumbled over a problem recently when trying to use srt with text() on a
windows device.
What I intended to do was to plot a simple regression line, and to rotate
a piece of text such that the text has the same angle as the regression
line.
However, the text is always plotted in a slightly wrong angle:
####
x=1:10 #create arbitrary x and y values
y=x*2-rnorm(1:10)
2011 Apr 16
2
Rotating the x-axis labels of a barplot
Dear listserv,
Here is my latest formatting problem. I would like to rotate the x-axis labels
by 45 degrees on a _barplot_. Apparently this is slightly different from the
example given in the R FAQ, which is for rotating the x-axis labels on a
scatterplot
(http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-create-rotated-axis-labels_003f).
I have adapted that code, as best I could, and
2000 Dec 02
2
axis label rotation
Hello,
I recently switch over from Splus to R and I have not been able to
generate right axis labels that face inwards. This is accomplished
in Splus with the command srt=270 but this option is not supported
in R. In addition the par argument las=0 or 3 does not rotate the
right axis labels.
The editor of a journal is demanding that the right axis labels face
inwards in the figures I recently
2006 Nov 07
1
R freezes with text(...., srt = -1e-8) (PR#9347)
Full_Name: Emmanuel Paradis
Version: 2.4.0
OS: Linux
Submission from: (NULL) (193.49.41.124)
Adding text to a plot makes R freeze if 'srt' is given a very small negative
value, eg:
plot(1, type = "n")
text(1, 1, "some text....", srt = -1e-8)
But if 'srt = -1e-6' (or smaller) or 'srt = -1e-19' (or greater), this works.
This seems to be OS-dependent:
2005 Jun 10
1
Wishlist: axis( ) could take vector of colors (PR#7930)
Hi,
This is not a bug, but a simple enhancement suggestion: that axis( ) also
allow option "col" to take a vector of colors equal to the length of
"labels". Currently it allows it, in the sense that there is no error
message, but the function will use just the first element of the vector.
Example
> plot(1:5,exp(1:5),axes=F,type="o")
>
2012 Feb 02
2
Vertical string with horizontal letters
I'm trying to format text on a plot such that the string is vertical but the letters are horizonal. I tried
text(1,1,label="output", srt=270)
This gives the string rotation I want, but that rotates the entire "output" so the letters are also rotated. I've also tried
text(1,1,label="output", srt=270, crt=270)
to no avail. par()$crt doesn't seem to affect
2004 Dec 04
1
Wishlist: heatmap/image legend (PR#7402)
Full_Name: Elizabeth Purdom
Version: 1.9.1
OS: Windows XP
Submission from: (NULL) (171.64.102.199)
It would be great if heatmap and/or image had the option of printing a legend
bar on it somewhere that would indicate the ranges given by the colors in the
heatmap (i.e. a very small image rectangle with the same colors as in the
heatmap). Because heatmap is using layout, it seems pretty
2002 Aug 14
1
strwidth
Dear plotting experts,
I need to determine the width of a string before plotting it to the
current device because I want to adjust `mai' to have
the necessary space available. It seems to me that this is an "hen and
egg" problem:
R> a <- "test"
R> strwidth(a)
Error in strwidth(a) : plot.new has not been called yet
# ok, I need an open device
R> plot(1:2,
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
2002 Nov 15
1
Plotting in the margin
Hi,
I would like to place a line (tilted at an angle) in the margin of an R
plot. Is there any way to place such an annotation outside the plotting
area?
As an alternative, being able to plot a rotated character (the pipe, |) in
the margin would be sufficient. The problem is that mtext doesn't work
with the srt option.
As a further alternative, if I could put a legend in the margin, I
2023 Mar 30
2
single character in R, and how to manipulate it
Hi there,
I just noticed that "crt" is a graphical parameter, which is stated as follows in the help page of "par":
A numerical value specifying (in degrees) how single characters should be rotated. It is unwise to expect values other than multiples of 90 to work...
However, I did not find any code example to demo the usage of "crt", and even know how to present a
2005 Nov 29
1
rotated ylab with xyplot
hi all,
in R, what's the best way to have a rotated ylab in a graph plotted with
either xyplot or xYplot? I tried this but it didn't work.
xyplot(y~x,data.frame(x=1:10,y=runif(10)),ylab=list(srt=90,crt=90,rot=90,label="my label"))
more generally, how do you output a text at an angle in a lattice graph?
what would be a good reference for R lattice graphics? I need more