-
-
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
Add white templates with axes lines, tickmarks, and different color rotation #1834
Comments
This makes sense, and it's also quite close to the previous default/ |
I like the flexibility in combining granular templates like that, and it makes it easier to remember templates if the name indicates what they do. I would be a little worried about about clarity and verbosity when around 4-5 templates are combined, e.g. |
I'm pretty open to adding new templates, I mostly want them to be "more different" from the existing defaults... How different are what are you proposing from the existing |
In addition to what you mentioned, I think the color rotations and slightly larger fonts are nice to set once in the default. I also want to experiment with having the background of the hover popup in white for all marker instead of the same color as the marker, but I haven't gotten there yet. Eventually, I think it would be helpful if the subplot column titles and legend could have the |
That's pretty easy, there's an attribute for that in the
that's not going to be possible at all via |
I just held a short Plotly express tutorial for a dozen people from my lab and it was very well received! People found it intuitive and powerful! Participants were beginners to programmatic data analysis and visualization. One thing that did come up was that many didn't like the default grey backgrounds (probably because it is uncommon in my field, biomed). When we switched to white backgrounds (the px.scatter(tips, 'total_bill', 'tip', facet_col='smoker', facet_row='day',
template=axes_lines, range_x=(1, 40), width=600) with this px.scatter(tips, 'total_bill', 'tip', facet_col='smoker', facet_row='day',
template=axes_lines, range_x=(1, 40), width=600) (note that I changed the axes lines to My opinion is that tickmark labels and data points are noticeably more "anchored" in the second plot, whereas in the first they appear to float around more. Based on this and what I wrote previously, I think the addition of a white template (either with or without gridlines), with axes lines, and without zero lines (and changing the color to something that looks good on white, such as D3), would be a welcome addition. Happy to PR a suggestion or discuss further.
A px default would be great for these! I would even suggest that the default behavior is to omit the column names (definitely in the color legend and preferably in the subplot title as well). In my experience this is the most commonly desired behavior (but I of course don't have any data to back this up...). I saw in one of your comments elsewhere that one of the reasons for the current behavior was to handle cases such as when you have a column, say |
Thanks for the candid feedback! As I said, I'd be open to a PR with a new template :) The screenshots above look a lot like the Seaborn With respect to the PX |
Heads-up: 4.3 is coming out this week! Last call for PRs for this release is getting close ;) |
Would you consider adding two templates with axis lines, tickmarks, and white background (similar to "xticks" in seaborn)? I believe this is a rather common style in various plotting libraries that also looks good in print and it would be nice to have it easily accessible, especially when teaching so that custom templates need not to be explained early on.
To illustrate what I mean
And with gridlines
I also changed the color rotations to D3, viridis, and RdBu, which are common defaults elsewhere. Below is the code I used to create the first figure, it is not complete with the figure specific template properties that are in the other default templates but gives an idea of what I am referring to.
The text was updated successfully, but these errors were encountered: