Skip to content

Request for an Ultraplot-Compatible "dark_background" Style #716

@munechika-koyo

Description

@munechika-koyo

Summary

Specifying the "dark_background" style defined by matplotlib breaks some ultraplot's layouts. For example, coloring axes, drawing ticks, defining an alt-axis, etc.
So, I would like to know whether there is a workaround for manually configuring the context's parameters, or how to define compatible style settings.

Reproducer

This is an example script that shows a graph with wrong minor ticks shown on an altered y-axis and missing axis coloring.

with uplt.rc.context(style="dark_background"):
    fig, ax = uplt.subplots()
    ax.format(ycolor="C0", ylabel="Left Axis")
    ax2 = ax.alty(color="C1")
    ax2.format(ycolor="C1", ylabel="Right Axis", ylim=(0, 1))  # Here, not specifying "ycolor" doesn't change the tick label color.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions