harrelfe / Hmisc

Harrell Miscellaneous
Other
208 stars 81 forks source link

Support for argument pass through for axis() #45

Closed vhorvath closed 8 years ago

vhorvath commented 8 years ago

I came across this package as a recommendation to put minor tick marks on axes at [http://www.statmethods.net/advgraphs/axes.html]. I found minor.ticks() great, but my graphs needed a little more customization. I noticed that this could easily be implemented, by adding two more optional arguments, one for each axis. I implemented these minor changes and updated the documentation in my fork, here I suggest to pull these changes, because it adds functionality without the expense of breaking compatibility.

For future versions I also propose here an alternative to the minor.tick() function, which would essentially implement the interface that axis() and axTicks() use. To avoid confusion and retain compatibility I propose the name add.minor() and it could be called as follows add.minor(side, n, ...). This function would implement most of what is included currently in minor.ticks(), but with the ability to customize the axes through the standard axis() arguments. This function could also be used within the current minor.ticks() function in place of the current ax() sub-function so that the code base would only need updates in one place.

harrelfe commented 8 years ago

Thanks for this excellent contribution. Please make sure your authorship is credited in the help file.

vhorvath commented 8 years ago

Thank you for maintaining this package! I updated the help file with an example and the credit. Created a new pull request.