Vindaar / ggplotnim

A port of ggplot2 for Nim
https://vindaar.github.io/ggplotnim
MIT License
176 stars 15 forks source link

should theme_opaque be the default? #117

Closed pietroppeter closed 3 years ago

pietroppeter commented 3 years ago

motivated by https://github.com/SciNim/getting-started/pull/20 and the fact that a transparent theme will be rendered correctly only on light themes, should the opaque theme one be the default? Not an expert on original ggplot but from I seem to read here none of the ggplot default themes is transparent, correct?

Vindaar commented 3 years ago

I've thought about this before as well. In general I'm just a fan of transparent graphics. Viewing plots on bright or white backgrounds that are transparent is imo pleasing to the eye. A complete white outline is often distracting. But nowadays almost everything has a dark mode and things are often viewed under such conditions.

So it might actually be for the better and turn on white backgrounds by default. Maybe one could use white backgrounds for PNGs, but transparent backgrounds for PDFs? Those are typically not embedded in the same way? Well, probably not a good idea to choose different defaults. Yeah, I'll think about it and probably change it. Thanks for the input!

Vindaar commented 3 years ago

Maybe the release of version v0.4.0 would be a good opportunity to make such a big change in the defaults.

pietroppeter commented 3 years ago

In general I'm just a fan of transparent graphics. Viewing plots on bright or white backgrounds that are transparent is imo pleasing to the eye.

just to better understand, if the background is white ("#ffffff" white) you should not be able to see the difference right? the advantage of transparent is in the case you want to be able to use it on a range of different bright background without having to change the background color, correct?

I agree that a white background chart on a dark background is really not pleasing, but the rationale of the default could be: let's make it decent enough on all backgrounds and not great on some and unusable on others. Those who want to get the perfect look they will have to do an additional effort.

Congrats on Datamancer and impending 0.4.0!

Vindaar commented 3 years ago

just to better understand, if the background is white ("#ffffff" white) you should not be able to see the difference right? the advantage of transparent is in the case you want to be able to use it on a range of different bright background without having to change the background color, correct?

Yep, exactly. On a white background it doesn't make a difference. On bright but not white a transparent one is just pretty to me. Feels like the plot belongs there.

I agree that a white background chart on a dark background is really not pleasing, but the rationale of the default could be: let's make it decent enough on all backgrounds and not great on some and unusable on others. Those who want to get the perfect look they will have to do an additional effort.

You sum up perfectly what a default should provide.

Congrats on Datamancer and impending 0.4.0!

Thanks. :partying_face: