Haddock: add generating code to figures
I would be extremely helpful if pages such as https://hackage.haskell.org/package/plots-0.1.0.2/docs/Plots-Types-Scatter.html also included the code snippet that generated the figure under the figure itself, as a -- > ... comment.
The generating code is actually on that page, it's just hidden in the [+] Example heading of scatterPlot.
I could put a copy of that code to under the figure at the top or I could have a note under the top figure saying "(see scatterPlot example for generating code)". I think pointing out the example heading will get people looking for other examples.
What do you think?
@cchalmers Can you please regenerate https://cchalmers.github.io/plots/ ? Thanks!
@ggreif Done :)
@cchalmers Yes, you could place a link from the plot at the top of the page to its generating code. In general, inline examples for a number of common functions would make users' life muuuuch easier.
Cool. I've already done this in HEAD. (see here). I should bring out a new minor version soon so it'll be on haddock.