[R] modify the name of axis of an R function
Martin Maechler
maechler at stat.math.ethz.ch
Fri Dec 16 10:48:16 CET 2011
>>>>> David Winsemius <dwinsemius at comcast.net>
>>>>> on Thu, 15 Dec 2011 09:56:31 -0500 writes:
> On Dec 15, 2011, at 1:53 AM, plocq wrote:
>> Hi,
>>
>> I use the function fpot of packages evd. If I call the
>> fit that I obtain "fit", I want to modify the name of the
>> axis and the main title that is produced by plot(fit1).
> Usually this would be accomplished with
> plot(fit, main="main title", xlab="X-axis lable",
> ylab="y-axis label")
>> To do this, I want to create a new function where I would
>> have the names modified.
> Seems unlikely that this would be needed.
>> The problem is that I can't find the function that
>> produce these plots... I tried to see in plot.uvevd but
>> it doesn't seems to be the good one. Can anybody help me?
>> Many thanks!
> The way to address this, if you are committed to this
> path, is to first determine the class of the fit-object
> and then to look for a plot method with methods(plot). If
> you see an S3 method you can call up the code with:
> evd:::plot.fit-class # when "fit-class" is the value you
> got with class(fit)
> If it's an S4 method, then it's much more convoluted, and
> over time I've learned not to try.
huh?
David, I'm disappointed.
Not at all much more convoluted, just different.
I think you should make a 2nd attempt, starting with
things like
showMethods(plot)
with versions
showMethods(plot, class = "...")
showMethods(plot, include = TRUE)
showMethods(plot, class = "...", include = TRUE)
or then directly
selectMethod(plot, "<class>")
----
and yes, this is all not relevant to evd where the methods are
S3 only...
Martin Maechler, ETH Zurich
> --
> David Winsemius, MD West Hartford, CT
More information about the R-help
mailing list