Displaying 20 results from an estimated 6000 matches similar to: "using "\t" in mtext"
2005 Jan 10
4
Graphical table in R
I would like R to produce some tabulated data in a graphical output. When
I say tabulated data, what I mean is a table with rows and columns. This
would be useful when reading in a big file, performing some analysis on
it, and then wanting to display the results as a table.
Something like
plot(x,...)
where x is a matrix
For example, the result could look (approximatly) like...
2008 Apr 21
2
"spreadsheet" in plot
Hello,
how can I print a table (lets say my table xtable contains 3 rows and 3
Columns, the fileds consists of text) directly in a plot? when I use
mtext(xtable), he tries to write everything on the same place.
Thank you in advance,
Stephan
--
[[alternative HTML version deleted]]
2011 Oct 25
1
textplot in layout
Hello,
Someone (Erik) recently posted about putting text on a plot. That thread
didn't help. I'd like to put text directly below the 'sub' text (with no
gap). The code below is the best I can do. Note the large undesirable gap
between 'sub' and 'test'. I'd like the word 'test' to be just below the top
box() boarder (directly below 'sub').
year
2010 Apr 22
1
Multicolor main title in a plot or mtext
Dear R-users, the problem I'm facing today is to write a
multicolor main title in a plot.
I would like to have 3/4 colors to help people in the
audience to visually realize what is what in a 4x2 plot array
On top of each plot I would like to have two lines.
The 1st line will indicate what is plotted
The 2nd line will indicate a a reference
Graphically speaking I would like a result similar
2011 Nov 15
1
Plot alignment with mtext
I would like the text plotted with 'mtext' to be alighned like it is for
printing on the console. Here is what I have:
> print(emt)
ME RMSE MAE
MPE MAPE MASE
original -1.034568e+07 1.097695e+08 2.433160e+07 -31.30554 37.47713
1.5100050
xreg 1.561235e+01 2.008599e+03 9.089473e+02 267.05490 280.66734
2000 Nov 07
2
par(las=.) gives wrong "adj" for mtext() (PR#726)
For R Version 1.1.1 and R-devel (Linux)...
Sorry, there's no time to fix myself now
{e.g., after starting a new device} :
par(las=3); plot(1:10); par(las=1) ; mtext("mtext")
Gives a left-adjusted (as for adj = 0) mtext,
even if par("adj") is still 0.5
Note that I'm also not convinced that mtext() should follow par("las")
as it does in the
2007 Oct 08
1
How put description under the graph (using different lines)
Hello,
I need to use barplot' graphs, but under the graph I need to put different
things. The structure of this graph must be:
MY GRAPH
------------------------------------------------------
description 1
----------------------- -------------------------
description2 description3
where:
-description 1, description 2 and description 3 are
2006 Aug 14
1
mtext uses the typographical descender to align text
<>
Hello
One sometimes (quite often really ) marvel at the choice of defaults in
R's graphic engine.
For some obscure reason, mtext uses the typographical descender (bottom
of letters) to align text. That is: "gG" will end up slightly higher
that "GG". Depending on the font, "Q" might end up higher than "O".
(for explanation of baseline
2013 Feb 18
2
mtext unicode failure
Readers,
How to solve this unicode input error please?
> postscript("~/tmp/test.eps",width=100/25.4,height=100/25.4,horizontal=FALSE,onefile=TRUE,paper="special")
> testx<-seq(1:5)
> testy<-seq(1:5)
> plot(testy~testx)
> mtext('text (O?)\n more text',side=3,line=1)
Warning messages:
1: In mtext("text (O?)\n more text", side = 3, line =
2011 May 11
1
mtext text size (cex) doesn't match plot
Hi,
I am using mtext instead of the ylab argument in some plots because i
want to move it away from the numbers in the axis. However, the text
in the X axis,
for example:
par(mar=c(5, 5.5, 4, 2));
plot(data, main="plot name", xlab= 'X axis', ylab="",
font=2, cex.lab=1.5, font.lab=2, cex.main=1.8);
mtext('Y axis', side=2, cex=1.5, line=4,
2007 Aug 24
3
changing text direction of mtext
Hello,
Does anyone know if it's possible to change the text direction of mtext?
I'd like to use 'mtext(side=2)' but the text should be 'left-to-right'.
I couldn't find an argument for that in the help files.
Thanks for any suggestions
Tobias
--
View this message in context: http://www.nabble.com/changing-text-direction-of-mtext-tf4321931.html#a12307342
Sent from
2001 Feb 22
1
cex= and plot(), title(), mtext()
using R 1.2.1 under LinuxPPC, using the default X11 graphics device, i
can't get the cex= argument for plot() and title() to have any effect.
works for text(), though. the text size for plot() and title() _is_
correct if par(cex=size) is called first. oddly, mtext() seems to pay
attention to cex=, but to ignore the value set by par().
for example,
> plot(1:5, 1:5,
2004 Aug 19
3
mtext adj= wrong with several las= (PR#7188)
Dear all,
Our quite basic function mtext() does wrong adjustments in some parameter
configurations. This gets obvious when using multi line texts: There is no
way to properly adjust text perpendicular to axis 2, for example.
Best
Jens Oehlschl?gel
m <- matrix(1:9, 3)
colnames(m) <- c("several\nlines", "several\nlines", "several\nlines")
par(mfrow=c(2,2))
2003 Feb 03
2
Mtext and xyplot
Dear all;
I wish to create a graphic object combing an xyplot() and an mtext(). My
code looks like following,
gmv <- {
trellis.device("windows", bg="white", width = 7, height = 7)
xyplot(Mvol ~ Age | Nl * Th , data = Hft1,
prepanel = function(x, y) prepanel.loess(x, y, span = 1),
xlab =list(label = "Age (Years)", font = 2),
2013 Jan 07
1
Changing mtext direction, or using text for the margin?
Hi all,
I have read through the archives, but can't find a solution to this problem.
I need the text direction on "dependent B", plotted in margin 4, to go
top to bottom (opposite what it is now). Here's some sample code:
#plot with mtext example
par(mgp = c(2,1,0), mfrow=c(2,2), las=1, mar=c(2,2,2,2), omi=
c(0.5,0.2,0,0.2))
a<-1:10
b<-7:16
c<-21:30
plot(a~b,
2010 Jun 13
1
losing line of mtext when saving to png format
I have a simple graph (oode below) which looks fine on the screen but when
I save it in png format the title (actually the last mtext line) is cut off.
I am pretty sure that I am doing something very stupid but
other than playing around with the png height and width commands which don't seem to help I have no idea of what to look for.
Any suggestions or cures would be appreciated.
Thanks
2010 Sep 28
1
confirming behavior of "by"
Hi,
I'm using "by" to summarize by multiple groups, and want to extract the
returned into a pretty dataframe. I'm trying to find a simple way to
name the rows of the data frame. I'd like it to be something like
index1.val1.index2.val2 where the index1 and index2 are the names of the
indices and the val1 & val2 are names of possible values of the index.
(the
2011 Dec 09
1
Align expression and text in mtext()
Dear R-helpers,
I have trouble aligning an expression with a subscript, and text, in margin
text:
par(mar=c(6,6,1,1))
b <- barplot(1:3)
mtext(c("A","B","C"), at=b, side=1, line=1, cex=1.3)
mtext(expression(italic(C)[a]~(more~text)), at=0, line=1, side=1,cex=1.3)
As explained in the help files and elsewhere, I understand that the
expression is aligned by the
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,
2006 Jul 31
2
math symbols and text with mtext()
Dear R users,
Two questions:
1) Is there a way to simplify the mtext() line below ?
beta=c(1,-1)
m=5
plot(1)
mtext( bquote(paste( beta == .(paste( "(", paste(beta, collapse=", "), ")" )) )), outer=TRUE,line=-3)
2) How do I get the embedded carriage return "\n" below to work, i.e for the text that follows it to appear on the next line?
beta=c(1,-1)
m=5