question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add white templates with axes lines, tickmarks, and different color rotation

See original GitHub issue

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

image

And with gridlines

image

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:closed
  • Created 4 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
nicolaskruchtencommented, Nov 2, 2019

Heads-up: 4.3 is coming out this week! Last call for PRs for this release is getting close 😉

1reaction
nicolaskruchtencommented, Oct 21, 2019

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.

That’s pretty easy, there’s an attribute for that in the layout

Eventually, I think it would be helpful if the subplot column titles and legend could have the species= part removed via the template

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found