Replies: 5 comments 28 replies
-
So you're talking about A small thought echoing what you already said in the linked issue is that it'd help if the data type of input and output are clearly stated for each ggproto method. And one high-level comment is that I think that documentation should more heavily commit to the fact that the audience is folks who are looking to extend/subclass existing ggprotos (vs. creating them from scratch). That could help introduce a hierarchy of information that prioritize some fields/methods over others -- much needed here because there's just so much info. So ideally, more commentaries like this from the Stat doc would be great:
It doesn't have to take the form of injecting a whole commentary, of course. But basically, I would like to see more division between fields/methods which are "often necessary to think about" vs. those that "can be ignored until you have to think about it". So kind of like the "required" vs. "optional" arguments distinction, except I get that it's awkward for the doc because everything is required to be present for the ggproto to function. But in the shoes of users who aren't creating them from scratch, re-drawing that distinction, even if very loosely, could maybe help digest all the info that's there in the docs |
Beta Was this translation helpful? Give feedback.
-
This sounds great. I'd love to be able to follow some data through the whole plot build (so I'm imagining a pipeline/cascade). I think both schematics and some pipeline examples (maybe with intercepted dataframes along the way), would be very helpful. @pepijn-devries might have some ideas on this. |
Beta Was this translation helpful? Give feedback.
-
Oh and as for specifics of "what thing is unclear", I have a very hard time knowing when a grob-generating method should return a grob vs. grobTree vs. gtable, etc. Also, when and why (if ever) we should use internal functions like I think there are many cases like that where the doc says I should look at a method, I go look at the method, and I see a bunch of internal helper functions which aren't documented (and idk if I should read the source code to understand what they do and implement it for my own extension, or just ignore it as a quirk of "vanilla" ggplot2 ggprotos) |
Beta Was this translation helpful? Give feedback.
-
I'm thinking of putting the following ASCII diagram in the docs. Does this make sense?
|
Beta Was this translation helpful? Give feedback.
-
I have just browsed through https://ggplot2.tidyverse.org/articles/extending-ggplot2.html, most of it is pretty clear and makes sense. The only suggestion that I have is to change the structure a tad bit. To me the Creating a new stat-section comes a bit out of the blue. I think it would logical to first explain what 'stats' are and then tell how to create one. Most of the explanation is already there in that particular section, but I would make that into a separate introduction to stats (or perhaps layers in general). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently reviewing the docs ggplot2 has on the ggproto base classes (tidyverse/ggplot2#6404) and was wondering if there are some things you personally had trouble with absorbing from the docs. Did you find particular things hard to find? Are some processes less clear than you'd like? I'm trying to fill any holes that might be in the docs.
Beta Was this translation helpful? Give feedback.
All reactions