In response to the question posted here, Farid Cher provided a slick modification to choro.legend that enabled R users to control the amount of space inserted between legend colors and their description. I am trying to use Farid's modification to choro.legend, but regardless of the value I set for the space_reduction attribute, I get the following error message:
Error in legend(x = px, y = py, legend = rep(" ", length(res)), fill = sh$cols, : 'text.width' must be numeric, >= 0
My function call looks like:
choro.legend(-85.80, 45.3, tneffort.shades, title='Trapnet lifts per year', cex=0.6, bty="n", fmt = "%0.0f", space_reduction=4000)
Can anyone identify the source of the problem? Apologies to the community for initially posting this question as a comment to the original post.