title: How do you pass arguments to a function called within another function?
body: <p>I am using an orphaned R library (<a href="http://cran.r-project.org/web/packages/wmtsa/index.html" rel="nofollow noreferrer"><em>wmtsa</em></a>). One of it's functions creates a continuous wavelet transform (<code>wavCWT()</code>) that returns a wavelet object and it can be plotted by calling the traditional <code>plot()</code> function. Unfortunately, the way the function is written does not allow me to change some typical plot parameters. In particular, I cannot set <code>axes=F</code> and I am forced to have the axes plotted all the time. This is not helpful as I want to add extra layers to my device and the axes are different and it they are offset. </p>
  
  <p>Is there a way to pass the argument to the method that is calling the plot() function? </p>
  
  <p>If this is not possible I am afraid I will have to modify the source code. If this is the case, where should I look in order to modify the methods of this kind of object?</p>
  
  <p>I found the <a href="https://r-forge.r-project.org/scm/viewvc.php/*checkout*/pkg/R/wav_xform.R?root=wmtsa" rel="nofollow noreferrer">source</a> of the methods but my hacking skills are limited and I am a bit lost.</p>
  
  <p>Example:</p>
  
  <pre><code> library(wmtsa)   # assuming you have installed the package wmtsa
   wavCWT(sin(rnorm(1000)))
   plot(W, power.stretch=0.5)
  </code></pre>
  
  <p>produces this plot:</p>
  
  <p><img src="https://i.stack.imgur.com/Htkrj.png" alt="enter image description here"></p>
  
  <p>but if I try to remove axes with <code>axes=F</code> I get the following message:</p>
  
  <pre><code>plot(W, power.stretch=0.5, axes=F)
  Error in plot.default(NA, NA, xlim = xlim, ylim = ylim, type = "n", xaxs = xaxs,  : 
  formal argument "axes" matched by multiple actual arguments
  </code></pre>