Displaying 20 results from an estimated 9000 matches similar to: "format scientific + plotmath potential bug"
2010 Aug 01
3
Constructing arguments for plotmath
Colleagues,
I am encountering difficulty adding formatted text to a graphic. Specifically, I want to add a superscript in the middle of a text string but I would like to format the text string on the fly. The commands:
plot(1,1)
ARG <- bquote('TEXT'^'\u00ae')
mtext(ARG, line=-2, side=1)
yield the desired output.
However, my goal is to paste together a string, then pass
2023 Jun 08
2
need help with plotmath and/or plotting unicode characters
R 4.2.3
OS X
Colleagues
This should be easy -- but not for me.
I want to plot text similar to this:
N ? XX: YY
where XX can be either 1 or 50 and YY is an integer
I envision that there would be two solutions:
UNICODE: If I can generate "?" via unicode, the problem is solved:
mtext(side=3, paste0("N ", UNICODE, " ", XX, ": ", YY))
PLOTMATH:
2012 Aug 15
3
How to join two plotmath type expressions
If I have two variables set, one of which holds an expression, for example:
> label <- 'Temperature'
> unit <- expression(paste(degree,'C'))
how can I join them together for use in mtext (or equivalent)? The
following is conceptually what I want to do, but will obviously not work:
> plot(0:1)
> mtext(paste(label,unit))
Preferably, I would like this to work
2008 Apr 02
1
Trouble combining plotmath, bquote, expressions
I'm using R-2.6.2 on Fedora Linux 9.
I've been experimenting with plotmath.
I wish it were easier to combine expressions in plotmath with values
from the R program itself. There are two parameters in the following
example, the mean "mymean" and standard deviation "mystd". I am able
to use bquote to write elements into the graph title like
mu = mymean
and R will
2008 Jun 25
0
Use plotmath expressions read from a text file in mtext/bquote
Hello R-help List
I am writing some R scripts to create graphs of water quality trends
that will be called by a web service running R. The axis titles will
need to change as the input data (ie. water quality variable) changes
according to a user's choice made via a web page. The way I am
currently passing call-specific parameters to the R script is via a text
file created on the fly by the
2013 Jul 01
1
Male and female signs as subscript in plot
Hello,
I'd like to add labels to my plot that include a male or female symbol as
subscript.
I'm working in Windows Vista and R 3.0.0.
I am able to add the male symbol to the plot as regular text (NOT as
subscript), e.g. with:
mtext("Male\u2642")
This displays the word "Male" followed by the male symbol on the plot.
But "\u2642" does not work when I try to
2010 Jul 06
1
plotmath vector problem; full program enclosed
Here's another example of my plotmath whipping boy, the Normal distribution.
A colleague asks for a Normal plotted above a series of axes that
represent various other distributions (T, etc).
I want to use vectors of equations in plotmath to do this, but have
run into trouble. Now I've isolated the problem down to a relatively
small piece of working example code (below). If you would
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 =
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 Jun 03
1
Would like to add this to example for plotmath. Can you help?
Greetings:
I would like comments on this example and after fixing it up, I need
help from someone who has access to insert this in R's help page for
plotmath.
I uploaded a drawing
http://pj.freefaculty.org/R/Normal-2009.pdf
that is created by the following code
http://pj.freefaculty.org/R/Normal1_2009_plotmathExample.R
This will be a good addition to the plotmath help page/example.
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),
2006 Dec 12
3
expression()
Hi,
I'm trying to use expression() to write a text to a graphic in the margin.
Using:
mtext(expression(beta),side=1,line=2)
writes a perfect beta greek character, but I need to add a subindex
"max", and I'm trying:
mtext(paste(expression(beta),"max"),side=1,line=2)
simply writes "beta max" in the plot.
Please, Could you tell me what I'm doing wrong?
2010 Nov 02
1
R install in Ubuntu maverick issues
I am trying to install the maverick version. The lucid version works
flawlessly, but this one promts this messages.
The following packages have unmet dependencies:
r-base: Depends: r-base-core (>= 2.12.0-1maverick0) but it is not going to
be installed
Depends: r-recommended (= 2.12.0-1maverick0) but it is not going
to be installed
Recommends: r-base-html but it is not going
2011 Mar 26
2
Wine can't initialize OpenGL
My wine used to work fine - I'm using Lucid and wanted wine 3.16 because of a bug fix, and I figured the maverick debian would probably be fine, and I installed it, and OpenGL suddenly didn't work. So I used "completely remove" in Synaptic to uninstall the maverick version of wine and went back to the lucid 3.15 version, and it still didn't work. I replaced everything in my
2010 Jan 21
1
Displaying Equation With Numerator and Demomenator On A Plot...
Is there a way to display something like the quadratic equation, i.e. with a numerator and demonator on a plot?
I think there is a way to create the equation in Latex, but wasn't sure if this format would translate to plotting.
\begin{equation}
? x = \frac{b +/- sqrt(b^2 - 4*a*c)}{2*a}
\end{equation}
?
My searched turned up the following:
2010 Feb 16
3
margin text warning message NAs coercion
Readers,
I tried to the following commands:
plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D))
mtext(expression(A[1]~B[2]),"additional text",side=3,line=1)
I receive the text that I want, but the command terminal shows the
following response:
Warning message:
NAs introduced by coercion in: mtext(expression(A[1]~B[2]),"additional
text", side = 3,
What is my mistake
2011 Jan 09
1
Getting total bar's label & value labels in a barplot
Hi,
I have been trying to get the label under the total column - i.e. a mean value of columns 2 to 6 - in a barplot I generate with this script:
t1 <- tapply(A, B, sum)
t1[8] <- mean(t1[2:6])
t1 <- as.table(t1)
barplot(t1, ylim=c(0,3000))
mtext("Var1", side = 1, line = 3)
mtext("Var2", side = 2, line = 3)
I have been trying to use
axis(1, at=1:8,
2010 Oct 01
2
Internal error - invalid parameters recieved
Hello,
I've upgraded to maverick from lucid (a clean install). I've been getting the same error for many applications running from wine, each in it's own bottle. Garena starts with the error but I can't log in, Heroes 3 runs without a glitch and suddenly crashes with the same error, Microsoft Office same thing, just crashes out of the blue, I can't install ie7 or ie8....same
2023 Jan 16
3
Printing special characters
R 4.2.2
OS X
Colleagues
A file that I have read includes strings like this:
"EVENT ? 30 sec"
When I include the string in a graphic using:
mtext(STRING, ?)
it appears as:
"EVENT ... 30 sec"
Is there a simple work-around (short of reformatting all the strings, then using plotmath)?
Dennis
Dennis Fisher MD
P < (The "P Less Than" Company)
Phone / Fax:
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