Add white templates with axes lines, tickmarks, and different color rotation
See original GitHub issueWould 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.
go.layout.Template(
layout=go.Layout(
hovermode='closest',
hoverlabel_align='left',
plot_bgcolor='white',
paper_bgcolor='white',
font_size=13,
xaxis=dict(showline=True, ticks='outside', showgrid=False,
linewidth=1.5, zeroline=False),
yaxis=dict(showline=True, ticks='outside', showgrid=False,
linewidth=1.5, zeroline=False),
colorway=px.colors.qualitative.D3,
colorscale=dict(sequential=px.colors.sequential.Viridis,
diverging=px.colors.diverging.RdBu),
)
)
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Managing Axes in OVERLAY Layouts - SAS Help Center
Note: This chapter discusses axis features that are specific to an OVERLAY layout when it is the outermost layout and not nested in...
Read more >ggplot2: axis manipulation and themes - AWS
Change text style in title and X/Y axis labels. red.bold.italic.text <- element_text(face = "bold.italic", color = "red") p.labs + theme(title ...
Read more >ggplot2 themes and background colors : The 3 elements
This R tutorial describes how to change the look of a plot theme (background color, panel background color and grid lines) using R...
Read more >Styling visual attributes — Bokeh 2.4.3 Documentation
To control the visual appearance of the major and minor ticks, set the appropriate line properties, prefixed with major_tick_ and minor_tick_ , respectively....
Read more >Axes in Python - Plotly
The different groups of Cartesian axes properties are. title of the axis; tick values (locations of tick marks) and tick labels. Tick labels...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Heads-up: 4.3 is coming out this week! Last call for PRs for this release is getting close 😉
That’s pretty easy, there’s an attribute for that in the
layout
that’s not going to be possible at all via
layout.template
as it’s not something that maps to a single figure attribute, although it seems to be a popular enough request that we may end up just adding an additional kwarg for that to all PX methods, or a PX-level overrideable default or something.