Closed hadley closed 8 months ago
It seems the link cannot be opened without a ycombinator account. What does it say?
Sorry, must’ve pasted the wrong link. Should work now
Thanks, it works now.
The main issue I have with the documentation is in knowing which options are available for each arguments and where to get information for each of these options. For instance, for geom_col() and its argument "position", it is not obvious that the options are "stack", "dodge", "dodge2", "fill". Though for this geom, some pieces of information are included in the details, it is easy to miss.
An internal or external documentation, with or without examples, would help. Being aware of what's available for/compatible with a geom is already a good start. We can try out the options by ourselves.
The best would be to expand the https://ggplot2.tidyverse.org/ documentation and have specific pages for each arguments with the list of different options. Maybe a list with annotations indicating which geom can use these options.
FWIW I think the documentation could be slightly improved by having topic-level documentation that (1) gives a broad overview, (2) gives common usage patterns and (3) links and lists all relevant functions/options. You could then link to that topic in specific functions/arguments that touch the topic.
I imagine 'topic'-level documentation for every part of the grammar, i.e. geoms, stats, mapping, facets, coords, theme and scales. Moreover, some more granular but widely applicable subjects might deserve their own topic-level documentation, such as position adjustments, breaks, labels, limits, transformations and guides. Perhaps the breaks, labels and transformations are more in the scope of the {scales} package however.
If you click the details button below, I've written out an example for the topic of 'guides'.
@teunbrand I think that sort of documentation is generally better placed in vignettes or the ggplot2 book. I think function docs are best kept as a reference, with pointers to places you can learn more about the general theory.
I can see that point, and the book and vignettes are great material. Currently though, the help pages aren't all linked up such that more information is just one click away from the documentation that you're reading. I thought this topic documentation could bridge this gap by providing a basic explanation, as well as acting as a small hub that links to relevant reading material. In case I've been somewhat unclear: I'm not suggesting this replaces function docs, it would just live as a separate doc pages (perhaps more minimal, but with more links than the example I gave).
Maybe the specific example you picked has lead me astray. The original motivation for this issue is to do better with the docs for stat
, position
, geom
, and ...
in geom_
/stat_
functions. I think the documentation for these arguments could include more details (e.g. a paragraph instead of a sentence) and link to a more standalone documentation topic like you suggest.
e.g. https://news.ycombinator.com/item?id=30765650
Maybe more documentation generation with code?