Skip to content

support 'markevery' in prop_cycle #8576

Closed

Description

@hedongya

Bug report

Bug summary

Key axes.prop_cycle: Unknown artist properties: {'markevery'}

Code for reproduction

# Paste your code here
import matplotlib
from cycler import cycler
matplotlib.rcParamsDefault['axes.prop_cycle']=cycler(markevery=[8])

Actual outcome

ValueError: Key axes.prop_cycle: Unknown artist properties: {'markevery'}

Expected outcome

Default markevery cycle.

Matplotlib version

  • Operating System: Ubuntu 14.04
  • Matplotlib Version: 2.0.0
  • Python Version: 3.4
  • Jupyter Version (if applicable):
  • Other Libraries:

No error for matplotlib 1.5

Activity

  1. BowenFu commented on May 7, 2017

    @BowenFu

    Same problem.

  2. added this to the milestone on May 7, 2017
  3. tacaswell commented on May 7, 2017

    @tacaswell
    Member

    The issue is that validate the keys in cycler with a white list (see https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/rcsetup.py#L716 ). The simplest fix is to just extend that to also include markevery, but I am slightly concerned about un-intended consequences.

    Exact work:

    • add markevery + validator to rcsetup
    • add test of using markevery in the property cycle
    • add whats-new entry
  4. changed the title [-]Key axes.prop_cycle: Unknown artist properties: {'markevery'}[/-] [+]support 'markevery' in prop_cycle[/+] on May 7, 2017
  5. WeatherGod commented on May 8, 2017

    @WeatherGod
    Member
  6. BowenFu commented on May 8, 2017

    @BowenFu

    @WeatherGod I believe it is also a good idea to directly allow
    matplotlib.rcParamsDefault['lines.markevery'] = 8

  7. added a commit that references this issue on Jul 20, 2017
  8. RavingMadScientist commented on Jul 20, 2017

    @RavingMadScientist
    Contributor

    @tacaswell Hey Thomas, sorry for being so slow on this, but this new validate_markevery method I'm about to PR should enable the full API of lines.set_markevery for the 'axes.prop_cycle' parameter of rcParams, as opposed to restricting assignments to any of the pre-existing validators. If you want to use the example, just lemme know what I need to do to get it into the documentation. Was a pleasure coding with you last weekend!

    Cheers :)

  9. tacaswell commented on Sep 24, 2017

    @tacaswell
    Member

    @RavingMadScientist What is the state of this?

  10. modified the milestones: , on Sep 24, 2017
  11. added
    🌱 Good first issueOpen a pull request against these issues if there are no active ones!
    on Oct 16, 2017
  12. modified the milestones: , on Feb 16, 2018
  13. timhoffm commented on Mar 20, 2018

    @timhoffm
    Member

    Implemented by #10713

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesNew feature🌱 Good first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions