[R-SIG-Mac] problem with plot math
murdoch.duncan at gmail.com
Wed Jan 29 13:37:51 CET 2014
On 14-01-29 6:06 AM, Roberta Rezende wrote:
> I have the exactly same session info.
> So, I restarted the computer and it works now.
> Sorry for this inconvenience. I’ll try everything before asking silly questions…
I'd guess the most likely thing is that your margins were too narrow
because of some previous operation. Closing and reopening the graphics
window should restore the default margins, you probably don't need to
restart R, RStudio or the whole computer.
You can see the current margins by using par("mar"). The default
setting is c(5.1, 4.1, 4.1, 2.1), i.e. a bit more than 5 lines at the
bottom, 4 on the left and top, and 2 on the right.
> Thank you
> On 29 Jan 2014, at 11:52, Ingmar Visser <i.visser at uva.nl> wrote:
>> Your first example works for me with nice labels including "x bar"
>> etc, using this configuration:
>> R version 3.0.2 (2013-09-25)
>> Platform: x86_64-apple-darwin10.8.0 (64-bit)
>>  en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>> attached base packages:
>>  stats graphics grDevices utils datasets methods base
>> Best, Ingmar
>> On Wed, Jan 29, 2014 at 11:39 AM, Roberta Rezende
>> <roberta.rezende at icloud.com> wrote:
>>> Hi everyone,
>>> I'm a newbie and I'm studying R.
>>> I'm using Mavericks 10.9.1, R 3.0.2 with Rstudio.
>>> I've tried this simple example:
>>> x <- rnorm(100)
>>> y <- x + rnorm(100, sd = 0.5)
>>> plot(x, y,
>>> xlab=substitute(bar(x) == k, list(k=mean(x))),
>>> ylab=substitute(bar(y) == k, list(k=mean(y)))
>>> but my plot only has the plot, with no labels at all.
>>> If I try the follow example, it works
>>> plot(0, 0, main = expression(theta == 0),
>>> ylab = expression(hat(gamma) == 0),
>>> xlab = expression(sum(x[i] * y[i], i==1, n)))
>>> It is like it can't do math, but it can plot values given.
>>> May I have to install something else?
>>> Thank you for your help
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac at r-project.org
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
More information about the R-SIG-Mac