[R] Trying to Learn Details of Grid Graphics, Help Page Errors
biii m@iii@g oii de@@ey@ws
biii m@iii@g oii de@@ey@ws
Wed Sep 22 16:21:45 CEST 2021
Hello,
I'm trying to learn the details of grid graphics. Specifically, I'm trying
to create a check that will give a warning or error if text goes outside of
the visible plot area. (See
https://github.com/tidyverse/ggplot2/issues/3282 for an example of what I
mean.)
In my digging, I think that the right way to do this will be to add either a
drawDetails, preDrawDetails, or postDrawDetails method for the "text" class.
My questions are: Is that the right way to do it or should I be looking
elsewhere? Or, is there already a way to do this?
As I was digging in and trying to learn how to do it, I tried to follow some
of the examples from the help page for drawDetails (?drawDetails). But, the
suggested functions to review do not exist. Specifically, I wanted to look
at grid:::preDrawDetails.frame mentioned in the second paragraph of the
Details section of the help page, and it doesn't exist.
grid:::drawDetails.xaxis and grid:::postDrawDetails.frame also do not exist
(mentioned in the next two paragraphs).
I would try to make patch, but there is no preDrawDetails or postDrawDetails
method in grid that has any content. For drawDetails, there are many
choices, and since I'm learning, I'm not sure which would be the best to use
as an example.
Thanks,
Bill
[[alternative HTML version deleted]]
More information about the R-help
mailing list