Skip to content

label1On set to true when axis.tick_params(axis='both', which='major', length=5) #13223

Closed
@dertz

Description

@dertz

Bug report

Bug summary

I have more than 10 majorTicks on the X-axis. label1On is False for each of the odd numbered majorTicks. Call tick_params as shown in subject and label1On is True for all MajorTick members after return.

Code for reproduction

major_ticks = axis.xaxis.get_major_ticks()
    if len(major_ticks) > 10:
        for i, tick in enumerate(major_ticks):
            if (i % 2) == 1:
                tick.label1On = False
logger.info("the value  of label1O is %r", axis.xaxis.majorTicks[1].label1On)
axis.tick_params(axis='both', which='major', length=5)
logger.info("the value  of label1O is %r", axis.xaxis.majorTicks[1].label1On)

Actual outcome

2019-01-18 16:42:28,509 - unavco.plotter.posfile - INFO - the value  of label1O is False
2019-01-18 16:42:36,626 - unavco.plotter.posfile - INFO - the value  of label1O is True

Expected outcome

I expected the value of label1On to not change.
Use to work with version 1.2.0 and python 2.7

Matplotlib version

  • Operating system: Mac OS High Sierra
  • Matplotlib version: 3.0.2
  • Matplotlib backend (print(matplotlib.get_backend())): MacOSX
  • Python version: 3.7
  • Jupyter version (if applicable):
  • Other libraries:

yum install after install python 3.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions