Skip to content

Division by zero in AutoMinorLocator #8804

Closed
@ffteja

Description

@ffteja

In ticker.py / AutoMinorLocator class / call function, there is a code mistake that results in a division by zero:
if len(majorlocs) > 0 :
should be replaced by :
if len(majorlocs) > 1 :

Otherwise this can happen :

majorstep = 0
minorstep = majorstep / ndivs
tmin = ((vmin - t0) // minorstep + 1) * minorstep

BOUM !

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