-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fine control of axis types in axes/xaxt/yaxt (#190)
* support character descriptions of different axis types in axes/xaxt/yaxt * set frame.plot default to NULL, handle all defaults of axes/xaxt/yaxt/frame.plot early on in tinyplot.default, default of frame.plot is only TRUE if both axes are drawn with axis lines * auxiliary Axis() interface with different parameter combinations based on type * tinyAxis() in separate file, improved comments
- Loading branch information
Showing
3 changed files
with
69 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
## auxiliary Axis() interface with different parameter combinations based on type | ||
tinyAxis = function(x = NULL, ..., type = "standard") { | ||
type = match.arg(type, c("standard", "none", "labels", "ticks", "axis")) | ||
if (type == "none") { | ||
invisible(numeric(0L)) | ||
} else { | ||
args = list(x = x, ...) | ||
if (type == "labels") { | ||
args$tick = FALSE | ||
} else if (type == "ticks") { | ||
args$lwd = 0 | ||
if (!("lwd.ticks" %in% names(args))) args$lwd.ticks = 1 | ||
} else if (type == "axis") { | ||
args$lwd.ticks = 0 | ||
} else { | ||
args$tick = TRUE | ||
} | ||
do.call("Axis", args) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.