Displaying 20 results from an estimated 20000 matches similar to: "text on a plot"
2009 Nov 02
2
How to execute a funcition which name is stored in a string?
Hi, everybody
Is there any way to execute a function, which name is stored in a string.
such as:
a <- "ls()"
foo(a) ## same as ls() itself.
Or, to execute a R command, which is stored in a string
such as:
a <- "m1 <- matrix(1:9,3,3)"
foo(a) ## same as the assignment itself
2009 Dec 01
1
Aligning Diagonally Oriented Labels Under Bar Chart
I searched the forms (i.e., R Search)?and come up with the following suggested link:
?http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-create-rotated-axis-labels_003f
I tried to implement what I believe was being implied by that URL and came up with the below:
barplot(WorldPhones[1,],
??????? ylim=c(0, 50000),
??????? axes=FALSE, ann=FALSE,
???????
2009 May 04
2
rotate texts
Hi all,
I'm hoping to add texts into a plot. I'm using text() to do it. I wonder if
the text() allow me to make the text vertically printed?
Thanks in advance for help,
phoebe
[[alternative HTML version deleted]]
2009 Sep 07
3
lean text label below barplot table
Hi, everyone:
I am plotting an graph with bar plot, but the label after every bar is too
long, I wanna if I can draw the label lean to an angle
thanks
--
Xiaogang Yang
Sensorweb Research Laboratory
http://sensorweb.vancouver.wsu.edu/
Washington State University Vancouver
[[alternative HTML version deleted]]
2006 Feb 04
2
srt --- slope text with function?
[resent, plus small addition; I do not understand why gmail sent a
weird charset.]
Dear R wizards:
I would love to write a general function that matches the slope of a plotted
line in an xy-plot at a particular x,y location. something like
x<- (1:10)^2; y<- 40:50;
plot( x,y, type="l", xlim=c(0,90) )
srt.at5 = text.at.current.plot.with.slope( x, y, 5);
text(
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
2009 Aug 27
2
how to index a list with a string?
Hi, everybody. I have a list obj L, sth like
$`aaa`
[1] "5753"
if the string 'aaa' is a returned value of a function foo(). what is
the right syntax form of L$foo()
I'm new to R, thanks in advance.
2008 Mar 01
1
jpeg and margin text
Hi guys,
I use R 2.6.2 and Windows XP.
I’ve got the following question: I wrote a lot of text into the margin of a
plot. When I use the “jpeg”-function, only a little part of the margin text
is displayed in the final jpeg? Any ideas to change it?
Source-Code:
datenbankdaten<-data.frame(LETTERS[1:20],
2004 Sep 07
2
using text on the x axis ticks rather than numbers
Hello,
is there a way in which I can use text labels rather than numbers on
the x axis ticks? I basically have a vector of (say) 8 points and I want
to plot these sequentially. Thus the x axis would have ticks at 1 .. 8.
Rather than having the labels 1 .. 8 I would like to have some arbitrary
text labels.
Ideally I would like the labels to be rotated (say at 45 degrees) so
that they don't
2004 Sep 07
2
using text on the x axis ticks rather than numbers
Hello,
is there a way in which I can use text labels rather than numbers on
the x axis ticks? I basically have a vector of (say) 8 points and I want
to plot these sequentially. Thus the x axis would have ticks at 1 .. 8.
Rather than having the labels 1 .. 8 I would like to have some arbitrary
text labels.
Ideally I would like the labels to be rotated (say at 45 degrees) so
that they don't
2011 Jan 20
1
Scale of 2nd y-axis
Dear list,
My query follows on from a question I posted a few days ago. I have the following 2 sets of data:
wetMeans[1] 9.904762[2] 6.344828[3] 6.346154[4] 6.855769[5] 9.074324[6] 9.953988[7] 13.482966[8] 14.546053[9] 10.841584[10] 9.752033[11] 6.739336[12] 8.955056burnMeans[1] 0.06214286[2] 0.05396552[3] 0.04096154[4] 0.05302885[5] 0.05831081[6] 0.07392638[7] 0.29969940[8] 0.25596217[9]
How to plot 2 continous variables on double y-axis with 2 factors: ggplot2, gplot, lattice, sciplot?
2013 Feb 25
3
How to plot 2 continous variables on double y-axis with 2 factors: ggplot2, gplot, lattice, sciplot?
Hi,
I have a data set with two continous variables that I want to plot MEANS (I
am not intrerested in median values) on a double-y graph. I also have 2
factors. I want the factor combinations plotted in different panes.
Dummy dataset:
mydata <- data.frame(factor1 = factor(rep(LETTERS[1:3], each = 40)),
factor2 = factor(rep(c(1:4), each = 10)),
y1 =
2008 Jun 20
5
Plotting barplot and scatterplot on same device - x-axis problem
Hi R-users
I'm a relative newbie and uses R mostly for graphical purpose. I have a
layout problem when plotting a scatterplot and a barplot using
par(new=TRUE). The baseline of the x-axis is not positioned equal for the
two plotting functions (see picture) and I have been unable to find out how
this is changed.
http://www.nabble.com/file/p18025066/pic.jpeg
I have added the script if this
2007 Oct 21
6
exporting text output to pdf
Hello,
I am new to R and I am trying to figure out how to print text output from an operation like table() to a pdf file. Is there a simple command to do this, or do you need to work with connections at a rudimentary level?
Thanks you,
Jesse
[[alternative HTML version deleted]]
2012 Apr 10
1
Rotating margin text
R 2.14.1
OS X
Colleagues,
I am making a graphic with two y-axes. I create the label for the right-side axis with:
mtext(side=4, line=1, "Some text")
The label is rotated 90° counterclockwise. I would prefer that it be rotated 90° clockwise. However, srt is not supported for mtext and las does not offer this option. Is there some other means to rotate the text string?
Thanks in
2009 Jun 12
2
formatting numbers along axes as percents for perspective plot
Hello, I'm producing a 3D plot using the persp function. All my values for X, Y, and Z are decimals ranging from 0 to 1. I'd like to be able format the three axes so that the tick values are 0% 20% 40%, etc... instead of just being 0 .2 .4. Does anyone know how to do this?
Many thanks,
Steve
[[alternative HTML version deleted]]
2011 May 03
3
Axis trouble
Hello Everyone,
I am having problem in defining specific axis for
plotting a vactor.
vecAVG <- c(0.2, 0.4, 0.6, 0.2, 0.4)
names(vecAVG)<-c("brain","heart","kidney","lung","blood")
par(mar=c(12,4.1,4.1, 2.1))
2003 Aug 16
1
equivalent of Splus command axis(..., srt=45, adj=1) in R
Dear R-users
moving from Splus to R (under Windows), I notice that command "srt" within a
plot in the original Splus code is ignored by R.
For example, if a plot something and then include the line of code
axis(1, at=Time, labels=Text, srt=45, adj=1)
the srt=45 command within the axis() command fails to draw Text at 45
degrees on the x-axis in R but it works properly in Splus.
I will
2009 Oct 30
4
opacity under dispersion command under plotrix
Is there anyway to make the lines in the dispersion command come forward in
a plot and allow the fill in the dispersion parameter be transparent so all
of the lines I am using to note confidence intervals are shown?
-------------------------------------------
Joe King, M.A.
Ph.D. Student
University of Washington - Seattle
206-913-2912
jp@joepking.com
2010 Jun 02
4
Draw text with a box surround in plot.
text() can draw text on a plot.
Do we have a way/function to draw text with a box surround it?
Thanks,
-james