[R] labelling a plot in binom library function call
kridox at ymail.com
Wed Apr 2 04:20:40 CEST 2014
The "binom" package is using "ggplot2" to plot the density. Thus, you
have to follow the "ggplot2" syntax:
R> binom.bayes.densityplot(hpdc) + ggtitle("my plot")
On Tue, Apr 1, 2014 at 7:41 AM, Chris <chris.barker at barkerstats.com> wrote:
> Hi, I'm using a function in the binom library. I'd like to add a title(s) to the plot generated by "binom.bayes.densityplot".
> I get an error message when trying to use the title function
> The error message is: "Error in title(main = "my plot") : plot.new has not been called yet" occurs after running the title command".
> Example code:
> hpdc <- binom.bayes(
> x = 0:10, n = 10, type = "central", conf.level = 0.8, tol = 1e-9)
> title(main="my plot")
> I was also unsuccessful in passing a plot title to the function call.
> And issuing a "plot.new()" before the title command clears the plot.
> Thanks in advance for suggestions.
> Chris Barker, Ph.D.
> Adjunct Associate Professor of Biostatistics - UIC-SPH
> President and Owner
> Statistical Planning and Analysis Services, Inc.
> 415 609 7473415 609 7473
> skype: barkerstats
> Send SMS
> Add to Skype
> You'll need Skype CreditFree via Skype
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help