Thanks to visit codestin.com
Credit goes to github.com

Skip to content

support 'markevery' in prop_cycle #8576

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

Closed
hedongya opened this issue May 5, 2017 · 7 comments
Closed

support 'markevery' in prop_cycle #8576

hedongya opened this issue May 5, 2017 · 7 comments
Labels
Difficulty: Easy https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues Good first issue Open a pull request against these issues if there are no active ones! New feature
Milestone

Comments

@hedongya
Copy link

hedongya commented May 5, 2017

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

@BowenFu
Copy link

BowenFu commented May 7, 2017

Same problem.

@tacaswell tacaswell added this to the 2.1 (next point release) milestone May 7, 2017
@tacaswell tacaswell added new-contributor-friendly Difficulty: Easy https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues labels May 7, 2017
@tacaswell
Copy link
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

@tacaswell tacaswell changed the title Key axes.prop_cycle: Unknown artist properties: {'markevery'} support 'markevery' in prop_cycle May 7, 2017
@WeatherGod
Copy link
Member

WeatherGod commented May 8, 2017 via email

@BowenFu
Copy link

BowenFu commented May 8, 2017

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

RavingMadScientist added a commit to RavingMadScientist/matplotlib that referenced this issue Jul 20, 2017
@RavingMadScientist
Copy link
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 :)

@tacaswell
Copy link
Member

@RavingMadScientist What is the state of this?

@tacaswell tacaswell modified the milestones: 2.1 (next point release), 2.2 (next next feature release) Sep 24, 2017
@tacaswell tacaswell added the Good first issue Open a pull request against these issues if there are no active ones! label Oct 16, 2017
@anntzer anntzer modified the milestones: needs sorting, v3.0 Feb 16, 2018
@timhoffm
Copy link
Member

Implemented by #10713

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Easy https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues Good first issue Open a pull request against these issues if there are no active ones! New feature
Projects
None yet
Development

No branches or pull requests

8 participants