title: Change position of legend in plot of pec object
body: <p>I am trying to plot the prediction error curve from pec package but I can't change the legend position and size. There's an example from pec package:</p>
  <pre><code>library(rms)
  library(pec)
  data(pbc)
  pbc &lt;- pbc[sample(1:NROW(pbc),size=100),]
  f1 &lt;- psm(Surv(time,status!=0)~edema+log(bili)+age+sex+albumin,data=pbc)
  f2 &lt;- coxph(Surv(time,status!=0)~edema+log(bili)+age+sex+albumin,data=pbc,x=TRUE,y=TRUE)
  f3 &lt;- cph(Surv(time,status!=0)~edema+log(bili)+age+sex+albumin,data=pbc,surv=TRUE)
  brier &lt;- pec(list(&quot;Weibull&quot;=f1,&quot;CoxPH&quot;=f2,&quot;CPH&quot;=f3),data=pbc,formula=Surv(time,status!=0)~1)
  print(brier)
  plot(brier)
  </code></pre>
  <p>But shows a big the legend in the middle of plot.</p>
  <p><a href="https://i.stack.imgur.com/ofahQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ofahQ.png" alt="enter image description here" /></a></p>
  <p>I also tried:</p>
  <pre><code>plot(brier, legend = &quot;topright&quot;)
  class(brier)
  </code></pre>
  <p>But don't show legend.</p>
  <p><a href="https://i.stack.imgur.com/LpuRD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LpuRD.png" alt="enter image description here" /></a></p>
  <p>How can I change the position of legend? And also ¿is it posible to plot this graph using ggplot?</p>