-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fine control of axis types in axes/xaxt/yaxt #190
Conversation
Unrelated bonus question which I noticed when preparing the example enough. Is it intentional that for the
|
…/frame.plot early on in tinyplot.default, default of frame.plot is only TRUE if both axes are drawn with axis lines
This looks great, thanks @zeileis. I'm out with the family atm but will be and to review properly when I'm back home. |
While mowing the lawn I thought that it would be better to handle all defaults of This still produces the same plots as above except for the bottom left panel which is now drawn without a frame. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zeileis This is great. Your plot examples look very slick!
My only minor request is to make tinyAxis()
its own unexported function (as you suggested).
Just in case |
Closes #182 . |
Thanks @zeileis! |
As discussed in #182 I have tried to implement character specifications of different axis types. The docs of the relevant arguments in
tinyplot.default
now say:axes
: logical or character. Should axes be drawn (TRUE
orFALSE
)? Or alternatively what type of axes should be drawn:"standard"
(with axis, ticks, and labels; equivalent toTRUE
),"none"
(no axes; equivalent toFALSE
),"ticks"
(only ticks and labels without axis line),"labels"
(only labels without ticks and axis line),"axis"
(only axis line and labels but no ticks). To control this separately for the two axes, use the character specifications forxaxt
and/oryaxt
.xaxt
,yaxt
: character specifying the type of x-axis and y-axis, respectively. Seeaxes
for the possible values.Illustration:
Note that the plot in the bottom left panel is maybe unexpected. The reason is that
frame.plot
is solely selected based onaxes
(which isTRUE
here) and not based onxaxt
/yaxt
. One could consider changing that but I felt that the selection of the defaults is already involved enough for a first proposal.Feel free to make any changes or discard the PR if it's not useful (in this way).