Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

WIP: allow to use arguments in default theme #40

Closed
wants to merge 3 commits into from
Closed

Conversation

piever
Copy link
Member

@piever piever commented Nov 8, 2018

The default_theme function now also gets passed the converted arguments, which allows to customize the theme as a function of the arguments the user is passing , for example:

density(Surface, rand(100,2))

could be instructed to use Surface theme.

@piever
Copy link
Member Author

piever commented Nov 8, 2018

I'm not particularly convinced by the implementation of the PR, but I hope it illustrates the idea (as a side effect, it causes the axis frame to disappear, not sure why).

This is an example of how it could be used, so that:

density(rand(100))
density(rand(100, 2))
density(Surface, rand(100, 2))

use themes from Lines, Heatmap and Surface respectively.

@piever
Copy link
Member Author

piever commented Nov 8, 2018

For it to be non-breaking the function passed to the macro discards the keyword arguments by default, but maybe there's a smarter way to avoid having to write the function twice.

@piever
Copy link
Member Author

piever commented Nov 24, 2018

Closing as after the StatsMakie redesign as well as #46 this doesn't seem relevant anymore.

@piever piever closed this Nov 24, 2018
@SimonDanisch SimonDanisch deleted the pv/theme branch November 26, 2018 09:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant