Home > Blockchain >  how to change xlim and ylim on a Taylor diagram in r
how to change xlim and ylim on a Taylor diagram in r

Time:09-30

I'm new to R and basically teaching myself programming. I am struggling to increase the scale of a Taylor Diagram. I have been at it for hours,

I tried.

# display the diagram with the better model
oldpar <- taylor.diagram(obst, MOHCREMO2015, ref.sd = TRUE,
                         grad.corr.lines = c(-0.2,-0.4,-0.6,-0.8,-0.9,-0.95,-0.975,
                                             -0.99,-1,0.2,0.4,0.6,0.8,0.9,0.95,0.975,0.99,1),
                         col = "darkgreen", pch = 3, show.gamma = TRUE,
                         xlab = "", ylab = "Standard Deviation",
                         main = "Swallendam", 
                         ylim = c(0,6),xlim = c(0,6))

Error in plot.default(0, xlim = c(0, maxsd * 1.1), ylim = c(0, maxsd * :
formal argument "xlim" matched by multiple actual arguments

I want to produce multiple diagrams with identical scales. Any suggestions will be appreciated. :)

CodePudding user response:

I think the unfortunate answer in this case is that you can't change xlim/ylim with plotrix::taylor.diagram(), but perhaps you could make a modified version that you could specify yourself.

xlim and ylim are set internally to maxsd * 1.1 where maxsd is 1.5x the maximum standard deviation for ref or model. While ... is passed to plot() you can't specify xlim and ylim twice, which is why you get the error "formal argument "xlim" matched by multiple actual arguments"

  • Related