Skip to content

Presentation template should not change colors #1807

Closed
@benjaminjack

Description

@benjaminjack

Issue

If you combine the 'presentation' template with another template using the plus-sign (+) composition syntax, the presentation template will change the colors of points, lines, and other traces that are defined in the other template.

plotly==4.1.1

Expected behavior

The 'presentation' template should only change the size of text, points, and lines. It should not change the colors.

Reprex

import plotly.express as px

iris = px.data.iris()

# Colors correctly follow the 'plotly_dark' theme
dark_plt = px.scatter(iris, x='sepal_length', y='sepal_width', color='species', template='plotly_dark')
dark_plt.show()

# 'presentation' template changes colors from 'plotly_dark' theme when it shouldn't
dark_pres_plt = px.scatter(iris, x='sepal_length', y='sepal_width', color='species', template='plotly_dark+presentation')
dark_pres_plt.show()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions