Skip to content

[BUG] Invalid color cycle save #131

@mamar828

Description

@mamar828

Describe the bug
When one color of the color cycle is modified, the saved style file gets corrupted due to an incorrect formatting of the axes.prop_cycle field. Using the style then raises the error :
yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/object:cycler.Cycler'
in "/.../test_change.yml", line 188, column 20

Lines 188-201 of the file in question :

axes.prop_cycle: !!python/object:cycler.Cycler
    _keys: !!set
      color: null
    _left:
    - color: '#ad8831'
    - color: '#edb73b'
    - color: '#b9503b'
    - color: '#c22811'
    - color: '#695178'
    - color: '#afe6e3'
    - color: '#34a893'
    - color: '#616161'
    _op: null
    _right: null

To Reproduce

  • Create a new style
  • Modify a color of the color cycle
  • Save the style
  • Try to open with GraphingLib

Expected behavior
The colors of the color cycle should be saved as a list such as axes.prop_cycle: cycler('color', ['#3e82a0', '#edb73b', '#b9503b', '#8aba4e', '#695178', '#ed893b', '#34a893', '#616161']), but it seems that this is not done properly.

Potential solutions
Revisit the data's exportation to ensure the color cycle is correctly saved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions