-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
themes and default styling #217
Comments
is there still any plan to try and integrate themes such that you include a theme in the json to be applied only in the frontend? that way it would be shared amongst all the api-wrapping libraries. thoughts? |
i do like your proposal though, it certainly gets the job done! |
@chriddyp I love it! should we incorporate this in the doc? I think it would be great to do all the galleries this way |
@theengineear - I really like being able to just update the figure locally, and I think it allows some more flexibility if you want to apply a theme, and then override some its properties. If it was just in the front-end, then the theme would always have precedence. I think that we could incorporate the front-end themes by making them an endpoint where you could download the ones that you've made in the front-end (at some point). it might be cool to add a this solution is also cool because it would work with more complicated layouts, like subplots etc. in fact, maybe it should be rebranded "templates" |
Yup, I'm with you on the ends, but I worry about the means. Applying a theme ended up being a non-trivial task in the frontend. I'm ok with doing this in our libraries, but it does mean lot of duplication. If we did port this to python, we could always stick it in our backend and then make an api request to have our backend apply the theme and return the result. That could then be used across all our libraries. Again, if it's worth the effort and we have team members to do it, I'm all for it. However, there's going to be a lot of duplication and then maintainability costs. |
I'd love to see this done in 2 stages - First, ship Plotly with a few useful default themes like cufflinks has done and add their usage to the docs: https://github.com/santosjorge/cufflinks/blob/master/cufflinks/plotlytools.py#L58 This should be super easy. I'd personally love to see ggplot and seaborn themes... the number of lines of styling currently needed to match these themes is crazy. Second, figure out how to save and reimplement saved themes. |
Here are the themes that are new in MPL 1.4: |
Closing in favor of #1161. This functionality is going to be built on top of the Plotly.js template mechanism. |
update
is great. it'd be fun if we wrote some helper functions that allowed folks to save skeleton themed figures to their file system and apply them. maybe even update the default styling!I just wrote up a lil notebook here that demonstrates how this might work: http://nbviewer.ipython.org/gist/chriddyp/f4adabf92a3b517a01f5
would love your feedback @theengineear @etpinard @aneda @cldougl
The text was updated successfully, but these errors were encountered: