-
Notifications
You must be signed in to change notification settings - Fork 7
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
tinyplot themes #234
Comments
Regarding the themes, I agree with your suggestions. But I cannot contribute much at the moment because I'm not familiar with the details of how Regarding the dynamic resizing, I agree this would be useful in many situations, especially when there is no main title and we just waste a lot of space. However, I would make that functionality optional in order to keep the compatibility with the base |
Similar to
ggplot2
's built-in themes, it would be cool if we could support a minimal set oftinyplot
themes.Some quick thoughts:
In the vignette, we point users to the (excellent) basetheme package. But I've noticed that
basetheme
doesn't always play well with some oftinyplot
's unique features, particularly w.r.t. faceting and legend text. OTOH I really like the general design and implementation using hooks. Perhaps we could borrow from these ideas.If we were being ambitious, we could look at dynamically resizing plot margins and margin gaps (
mgp
) to reduce/optimize whitespace for certain themes. Specifically, this behaviour would depend on criteria like whether main and axis titles are provided, whetherlas = 1
, etc. The UX trade-off here would be that users potentially couldn't add, say, titles afterwards. But I think the general aim oftinyplot
is to take care of plot arrangement in a single function call anyway, so that doesn't seem so bad a tradeoff to me. (Related: Default axis spacing parameters #112)Ideally, users could set themes globally (via
tpar()
or a dedicatedtinytheme()
function?), or directly for an individual plot via atinyplot(..., theme = <theme_string>)
argument.One minor thing I'd like to support is positioning and font styles of titles. To highlight one thing: personally, I've never liked the default position and styling of
sub
, since it feels like a clunky part of the x-axis title, rather than an actual subtitle (which I'd expect below the main title.) Come to think of it, maybe we should introduce a separatecaption
argument...The text was updated successfully, but these errors were encountered: