grantmcdermott / tinyplot

Lightweight extension of the base R graphics system
https://grantmcdermott.com/tinyplot
Apache License 2.0
208 stars 7 forks source link

Make a gallery? #59

Open etiennebacher opened 11 months ago

etiennebacher commented 11 months ago

Hi @grantmcdermott, you mention in #58 that you'd like to setup a website for plot2. Having a dedicated vignette with a gallery of plots made with plot2 (and with the code easily accessible) would be awesome.

Here's the kind of thing I have in mind: https://g2r.opifex.org/articles/gallery

grantmcdermott commented 11 months ago

Yeah, a gallery sounds/looks like a great idea. My main requirement for the website is that content is served external to the package itself. The goal is to keep the installation tarball as small as possible so that it works quickly in, say, a WASM setting. Among other things, this means that we don't want conventional vignettes.

(Right now, I'm thinking of just serving as a set of standalone, static GitHub Pages via a docs/ folder. Although I might be tempted to switch to something like a Quarto book/website.)

No obligations, but I'm happy to invite you to the project if you think you'll be able to contribute. The project workflow is what you'd expect from your other projects; we generally push changes through PRs (hopefully with an additional review, although I sometimes push changes through quickly for expediency). Let me know and add you to the repo.

etiennebacher commented 11 months ago

Thanks but I won't be able to make contributions for this, it's just something that would be nice to see. If you just want a static website, quarto might be enough or you might be interested in my package altdoc (I'm barely spending time on it nowadays but it could be enough for your usecase, and maybe Vincent will revive it in the next months).

vincentarelbundock commented 5 months ago

Gallery is live: https://grantmcdermott.com/plot2/vignettes/gallery.html

To add new images:

  1. Save the image to altdoc/fig/gallery_**.png
  2. Add a link to vignettes/gallery.qmd
vincentarelbundock commented 5 months ago

I'm not sure of the best way to make the code accessible for each plot. Simplest might be to have an unevaluated block of code in the same vignette.

etiennebacher commented 5 months ago

Simplest might be to have an unevaluated block of code in the same vignette.

Yes, just a link at the top of the "gallery" page that points to the raw vignette should be enough

grantmcdermott commented 5 months ago

Agree, linking to the code somewhere on GitHub (or the website would be good). That's partially why I kept the _EXAMPLES folder in repo, although I haven't looked at it for a while now.