Skip to content
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

SETTINGS.layout gets mutated during plotting #39

Closed
ssfrr opened this issue Dec 24, 2023 · 1 comment
Closed

SETTINGS.layout gets mutated during plotting #39

ssfrr opened this issue Dec 24, 2023 · 1 comment

Comments

@ssfrr
Copy link

ssfrr commented Dec 24, 2023

It seems that sometimes the process of merging together a plot layout and the global layout is mutating the global layout.

To reproduce:

PlotlyLight.reset!()
Preset.PlotContainer.settings!(
    layout=Config(xaxis=Config(automargin=true)))
expected_layout = Config(xaxis=Config(automargin=true))
PlotlyLight.SETTINGS.layout == expected_layout # true
Plot(x=rand(10),y=rand(10),layout=Config(
    xaxis=Config(
        title=Config(
            text="myX"))))
PlotlyLight.SETTINGS.layout == expected_layout # no longer true

At the end, the SETTINGS.layout has acquired the xaxis.title.text field

@joshday
Copy link
Member

joshday commented Jan 24, 2024

Thanks for the report! It's a silly bug in EasyConfig that will be fixed ASAP.

@joshday joshday closed this as completed Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants