Displaying 20 results from an estimated 20000 matches similar to: "Text in plots"
2008 Aug 07
1
Mtext doesn't display characters in italic when I use a greek symbol
Following on from my previous mail!
plot(1:10,1:10)
mtext("title", side=3, adj=0, font=3, cex=1.5)
This works as expected and puts the font in italics.
tag <- "A)"
suffix <- "genea::"
plot(1:10,1:10)
mtext(bquote(.(tag) ~ Delta * .(suffix)), side=3, adj=0, font=3,
cex=1.5)
Here, the font isn't in italics, it's normal.
I presume this is some
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
2012 Apr 03
1
Mixed italic and non-italic in text
Hi,
I need to italicize the journal in a citation but have thus far failed. How
can I make 'Journal of Something' below italic but leave the rest?
mtext( "See Author1 and Author2 (2007) , \"Title\", Journal of Something ,
pp. 1-50.", side = 3, outer = T, line=-0.75, cex = 0.7, at= 0.04, adj = 0,
font = 1, family = "Times")
--
View this message in
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 Apr 03
1
Italicize journal article in mid text
Hi,
I need to italicize the journal in a citation but have thus far failed. How
can I make 'Journal of Something' below italic but leave the rest plain?
mtext( "See Author1 and Author2 (2007) , \"Title\", Journal of Something ,
pp. 1-50.", side = 3, outer = T, line=-0.75, cex = 0.7, at= 0.04, adj = 0,
font = 1, family = "Times")
Thanks
--
View this
2010 Apr 19
1
How to embed italic Greek letters in a eps file?
Hi,
I need to add on a plot text containing italic Greek characters using
the function mtext (i.e. I cannot use Hershey vectors). The characters
are nicely displayed when the file is saved as png but not when saved as
eps. See code below as example:
#postscript('test.eps')
png('test.png')
plot(1,1, type = 'n')
mtext(side = 3, line = 2,
2011 Jul 29
2
Changing font type within y axis labels
I wish place the following axis label in such a manner that some of the
text is plain and the scientific name is in italics (i.e. a mixture of
two font types)
Using plot:
mtext("Total Landings of Pecten maximus (tonnes)",font,=3, side=2,
line=3)
makes everything italic, but how do I apply the font change to only
"Pecten maximus"?
Rgds
Phil
2013 Jan 23
1
italic font for legend text when using expression function for symbols
Hello,
I'm trying to add a symbol (Delta) to plot legend with text using
"expression(paste())" but this disables the text.font that allows to use
bold or italic text.
as follows:
x=c(1:10)
y=c(1:10)
plot(x,y)
legend(1,10,legend=c("A","B","C",expression(paste(Delta, D))),
pch=c(24,18,17,16),cex=2,text.font=3,bty="n")
Any suggestion to
2010 Jan 23
1
Failure to produce italics in jpeg
Colleagues,
Using R 2.10.1 in OS X (Snow Leopard), I created JPEG documents that
were intended to include italicized text. In the JPEG versions, the
italics appear in bold-face. The identical code (except for the call
to the device) yields italics in PDF. A minimal example is:
PDF version:
> pdf("plot.pdf")
> plot(1,1)
> mtext(bquote(italic(P) < .(0.005)))
>
2011 Jun 30
1
Italicized greek symbols in PDF plots
I know that this has been asked before in other variations but I just can't
seem to figure out my particular application from previous posts. My
apologies if I have missed the answer to this question somewhere in the
archives. I have indeed looked.
I am running Ubuntu 11.04, with R 2.12.1 and ESS+Emacs.
For journal formatting requirements, I need to italicize all the greek
letters in any
2010 Jun 22
1
Warped Text in mtext in a Quartz-Window
Hello,
With one procedure, I get a strangely warped text in the mtext-area of a quartz-window, while with an other the text comes out OK - see attached PDF.
(Number of Trials is the x-Axis label, which always comes out OK)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Warped Text.pdf
Type: application/pdf
Size: 24420 bytes
Desc: not available
URL:
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
2009 Mar 09
1
Adding text to both grid and base graphs
Dear all,
I'm stuck with the following problem:
I generate graphs using both the grid system (with lattice) and the base
system. I'd like to be able to identify these graphs later on with a bit of
identifying text (e.g. a date and some comments). Adding text to these
graphs cannot be done using a common system if you want to save them as emf
files. I now use:
mtext("labelling
2001 Aug 01
1
italics and not in main=
R 1.3.0, windows
I've checked archives, and examples in text, mtext, and title.
I am trying to include italicized text in the main title of a figure:
....,
main = "[italics here] species name [italics stop] more plain text"
TIA,
Henry
*****************************
Martin Henry H. Stevens
HStevens at muohio.edu
tel: (513) 529 - 4206
FAX: (513) 529 - 4243
338 Pearson Hall
Botany
2007 Aug 16
3
multiple colors within same line of text
Hi, I'm interested in using mtext(), but with the option of having multiple
colors in the same line of text.
For example, creating a line of text where:
Red is red and blue is blue
How do you create a text argument that lets you do this within mtext()?
Thanks,
Andrew
MGH Cancer Center
[[alternative HTML version deleted]]
2009 Mar 05
3
text at the upper left corner outside of the plot region
Hi,
is there a way to place text at the upper left corner (or another
corner) of the plot?
I want to place it really at the upper left corner of the whole plot
(the file I get),
not at the upper left corner of the plot-region.
I tried text() and mtext(), and corner.label() of the plotrix package
but it didn't work out.
thanks!
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
2012 Apr 06
1
Saving multiple plots using tiff function
Dear R experts,
I am trying to save three plots using tiff graphics devices; however the
following code only produces two files (Rplot002.tif and Rplot003.tif)
showing figures 1 and 3. Here is a simplified ex code
tiff(filename ="Rplot%03d.tif",width=24,height=20,units="cm",res=300,
pointsize=10, compression = "lzw")
plot(1)
mtext("Fig
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 Jul 28
1
text() and vector arguments like adj
Hello,
I remarked that the function
## Default S3 method:
text (x, y = NULL, labels = seq(along = x), adj = NULL,pos = NULL, offset = 0.5, vfont = NULL,cex = 1, col = NULL, font = NULL, ...)
accepts vectors of arguments (of the same length) except for the parameter adj.
When passing a vector of information for adjusting the labels, only the first value
is taken.
Any special reason for this ?