Skip to content

Manual xlim log stackplots not showing, linear stackplots segfault #3626

Closed
@nicktimko

Description

@nicktimko

I was trying to make some hacky split axes, things didn't show up, thought it was me, then after trying to make a SSCCE and getting it to segfault I think it's maybe only 90% me.

import numpy as np
import matplotlib.pyplot as plt

f, ax = plt.subplots()
#ax.set_xlim(10**-10, 1) # works
ax.set_xlim(10**-9.2679, 1) # sometimes broken
#ax.set_xlim(10**-4, 1) # broken

x = np.logspace(-10, 5, 20)
data = np.random.random((2, 20))
ax.set_xscale('log') # segfaults instead of just not showing if commented
ax.stackplot(x, *data)

f.show()

Uncomment as commented to reproduce. It randomly doesn't work on the seemingly-arbitrary lower bound (10**-9.2679).

The real fun seems to be if you comment out ax.set_xscale('log'), then Python simply segfaults when attempting to either f.show() or f.savefig('test') (after any of the provided set_xlim calls).

Repro'd on

  • MPL 1.4.0
    • Ubuntu 14.04 64-bit, Python 2.7.8 (64-bit), Numpy 1.8.2, TkAgg
    • Windows 7 64-bit, Python 3.4.1 (64-bit), Numpy 1.9.0, TkAgg and Agg
    • (with variant, see below) OS X 10.9.5, Python 3.4.1/2.7.8, Numpy 1.9.0, MacOSX and Agg

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions