Displaying 20 results from an estimated 10000 matches similar to: "cex= and plot(), title(), mtext()"
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,
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 Sep 02
2
Impact of cex changing as a function of mfrow
R 2.15.1
OS X (MLion)
Colleagues,
I am aware that changes in mfrow / mfcol in par() affect cex (from help: In a layout with exactly two rows and columns the base value of ?"cex"? is reduced by a factor of 0.83: if there are three or more of either rows or columns, the reduction factor is 0.66).
I generate a multipage PDF in which mfrow varies such that cex is impacted. This affect
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
2007 Sep 02
2
Different behavior of mtext
Dear R Users,
I am quite surprised to see that mtext gives different results when it
is used with 'pairs' and with "plot'. In the two following codes, it
seems that the 'at' argument in mtext doesn't consider the same unit system.
I would appreciate your comments on this issue.
Sebastien
##### Pairs
mydata<-data.frame(x=1:10,y=1:10)
par(cex.main=1,
2012 Jul 03
1
Problem using mtext to write onto a jpeg
Dear all,
I am trying to write figures directly to a file using the jpeg() function.
this_ylab=expression(paste("P",sep="")~lambda)
this_xlab=expression(rho)
jpeg("file_name.jpeg",width=100,height=100,units="mm",res=300)
plot(input_values,output_values,pch=16,cex=cex_pt,xlab="",frame.plot=T,ann=F,axes=F)
axis(side=2)
2007 Feb 24
1
Bold Substring in mtext (newbie question)
Hi everyone,
I suspect this is an easy task however I've not been able to accomplish it. I'd like to create an mtext title which has certain words bold, the rest not bold. So far I've been able to create one which is all bold, one which is all not bold and one which has bold and not bold superimposed on one another. Any suggestion would be appreciated.
Many thanks,
Joe Retzer
# Not
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,
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
2012 Jun 20
2
Figure title
Hi,
I created several figures and their titles should appear like this:
Figure 1: Monte Carlo results for alternative estimators of structural
parameters (N = 100, T = 5)
Because N and T change across figures, my code includes the following lines:
N.set <- 100
T.set <- 5
mtext(“Figure 1: Monte Carlo results for alternative estimators of
structural
2008 Nov 21
1
cex.lab etc. ignored in plot.ts for multiple plots (PR#13315)
Full_Name: Yan Wong
Version: 2.8.0
OS: Mac OS X 10.4
Submission from: (NULL) (78.149.183.231)
When plotting multiple time series in a single plot, via
plot.ts(plot.type="multiple"), the cex.lab, col.lab, and font.lab arguments are
ignored
> plot(ts(data.frame(a=1:10, b=1:10)), plot.type="single", cex.lab=0.5,
col.lab="red") #tiny red axis labels
>
2010 Oct 07
2
text/mtext axis labels on graphs
Hello everyone
I have problem with axis labels on graphs, I have my code as below:
plot(0,0,xlim=c(1,ncol(PA)),ylim=c(1,nrow(PA)),main="Stratigraphic
Range",xlab="Time
Bins",ylab="Taxa",cex.axis=1.5,cex.lab=2,cex.main=2.5,mgp=c(5,1.5,0),xaxt="n")
text(1:(length(strat_name)), y= 0, adj=1,
srt=45,labels=strat_name,xpd=TRUE, cex=1) #adds text to x
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),
2012 Jun 02
1
mtext bug
Sir,
I have hit a the limits of my understanding of text / par / opar etc...
I have a few related xts data frames which have multiple columns, and have
written a for-loop to make a set of charts - however i do not get any
margin text when i run the loop.
when i test the code outside of the loop the margin text appears - however
when i run the loop the margin text does not appear ... what gives?
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
2012 Apr 24
2
Positioning main title
Hello,
I have a barplot where each row has quite long texts and I have used "par"
to make some room in the left:
par(mar=c(0, 17, 3, 0), oma=c(0, 0, 0, 0))
barplot2(prueba, main = l, col=colores, horiz=TRUE,las=1, cex.names=.7)
My problem is that main text appears justified to the plot. I want to put it
in the middle of the image, and find a way to sort it out with mtex
par(mar=c(0,
2005 Oct 10
4
plot - no main title and missing abscissa value
Hi all.
I have defined a plot thus:
par(mar=c(5,5,4,5),las=1, xpd=NA)
plot(Day, Ym1Imp, ylim=c(0,100), type="b", bty="l", main="Ym1
Expression", cex=1.3, xaxt="n", yaxt="n") #plot implant data
axis(side=1, at=c(0,1,3,5,7,10,14,21), labels=c(0,1,3,5,7,10,14,21)) #
label x axis
mtext("Day", side =1, at=10, line=3, cex=1.2) # title x
2012 Sep 05
2
cex.lab ignored in plot.zoo for multiple plots
Hello everyone,
a problem with the plot.zoo function. In the parameters of the function,
cex.lab is ignored. I tried to reduce the size of the yaxis labels by at
least 50%.
------------------
Example:
sample <- as.zoo(EuStockMarkets)
par(las=1)
plot.zoo(sample, plot.type="multiple", main="Time Series", xlab="Date",
yaxt="n", cex.lab=0.5,
2007 Oct 24
2
Graphics - plotting two graphs
Hi,
I wanted to plot 2 lines on a single graph. Each graph has one axis that can be common. The code that I'm using is:
-------------------------------------------------------
par(mfrow=c(1, 1))
x1 <- c(2, 4, 6, 8, 10, 12)
x2 <- c(10, 20, 30, 40, 50, 60)
y1 <- c(10,12,15,22,34,21)
y2 <- c(40, 130, 150, 145, 40, 30)
par(las=1, mar=c(4, 4, 2, 4))
plot.new()