Tmap: Suggestion: change tm_scale_bar and tm_compass argument names for text size

Created on 10 Jun 2019  路  5Comments  路  Source: mtennekes/tmap

The argument names within various tmap functions are sometimes inconsistent and it forces one to double-check what things are called more often than could be necessary.

I suggest trying to homogenize the argument names for the size of text:

  • in tm_scale_bar, the size of text is set with the argument size
    This is very vague and does not follow the double word with a dot format used elsewhere (e.g. in text.color in that same function)

  • in tm_compass, the size of text is set with fontsize and size refers to something else
    This is a little at odds with text.color in that same function

  • in tm_layout, there are the more sensible arguments title.size, etc.

My suggestion is to rename both size in tm_scale_bar and fontsize in tm_compass to text.size.

enhancement

All 5 comments

Note: I would be happy to submit a PR if you think that this suggestion has some value.

Please do make a PR.

Could you make the original arguments still work, but marked and documented as deprecated? (So with a warning)

Could you make the original arguments still work, but marked and documented as deprecated? (So with a warning)

It would be good indeed. I have never done that, but I will look into how to do this.

I will try to submit a PR within a week or so, as time allows.

Just took the opportunity to fix this issue myself (just took me 2 minutes).
Many thanks for this suggestion!

It should work, please reopen this issue is necessary.

Oh! Amazing!

Sorry things have been very busy for me these days and I could not find the time to look into it. And thank you so much @mtennekes for making the changes!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Nowosad picture Nowosad  路  4Comments

Nowosad picture Nowosad  路  4Comments

MatthieuStigler picture MatthieuStigler  路  3Comments

Si-Chong picture Si-Chong  路  4Comments

robsalasco picture robsalasco  路  4Comments