gonum / plot

A repository for plotting and visualizing data
BSD 3-Clause "New" or "Revised" License
2.73k stars 202 forks source link

plot/plotter: add an example for LogScales #355

Closed sbinet closed 7 years ago

sbinet commented 7 years ago

we should probably add an example on how to make a plot with a nice log-scale.

DavidGamba commented 7 years ago

Should this example make it to the wiki: https://github.com/gonum/plot/wiki/Example-plots ? I usually look there for examples on what can be done, I didn't know to look for them in https://github.com/gonum/plot/tree/master/plotter

Thanks!

sbinet commented 7 years ago

@DavidGamba perhaps a better place (rather than the plotter directory) would be godoc: https://godoc.org/github.com/gonum/plot/plotter#pkg-examples

but it's true we should have a nice gallery of plots, like https://matplotlib.org/gallery.html

I vaguely recall @ctessum talking about this at some point. but we need:

(ah! that's gonum/plot#118)

sbinet commented 7 years ago

an alternative that I use for my hplot package is to put the plot examples (together with the output image) on the README page: https://github.com/go-hep/hep/tree/master/hplot#tiles-of-1d-histograms

ctessum commented 7 years ago

@DavidGamba @sbinet here is what I was talking about: https://ctessum.github.io/gonum.github.io/

It's still a little buggy but the idea is that the examples are automatically extracted from the source code, presented as full programs for people that are not familiar with how go namespaces work, and are editable/runnable.