Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Haddock: add generating code to figures #26

Open
ocramz opened this issue Nov 22, 2016 · 5 comments
Open

Haddock: add generating code to figures #26

ocramz opened this issue Nov 22, 2016 · 5 comments

Comments

@ocramz
Copy link

ocramz commented Nov 22, 2016

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.

@cchalmers
Copy link
Owner

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?

@ggreif
Copy link
Collaborator

ggreif commented Nov 22, 2016

@cchalmers Can you please regenerate https://cchalmers.github.io/plots/ ? Thanks!

@cchalmers
Copy link
Owner

@ggreif Done :)

@ocramz
Copy link
Author

ocramz commented Dec 17, 2016

@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.

@cchalmers
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants