Skip to content

segfault: fill_between with Python3 #4210

Closed
@bbolker

Description

@bbolker

I'm getting a reproducible segfault using fill_between in Python 3, but not Python 2, on Ubuntu 12.04 but not on MacOS (these are slightly different versions of Python3/matplotlib, and the Ubuntu is sitting in a virtual box/on a virtual filesystem).

I can try to update my Python3 version, but I'm curious whether anyone else has seen this.

Linux: ubuntu-10-new 3.2.0-77-generic-pae #112-Ubuntu, Python3 version 3.2.3 (matplotlib 1.5.dev1), Python 2.7.3 (matplotlib 1.1.1rc)
MacOS: 10.9.5 (13.4.0 Darwin Kernel Version 13.4.0), Python3 3.4.2 (matplotlib 1.4.2), Python 2.7.3 (matplotlib 1.1.1)

import numpy as np
from matplotlib import pyplot as plt

def u(t,shift=0):
    b = np.logical_and(shift<t,t<(1+shift))
    return(b.astype(float))

t = np.arange(0,2,1/40.)
plt.plot(t,u(t),color="red")
plt.ylim(0,1.25)
plt.xlim(-1,3)
plt.fill_between(t,u(t),facecolor="red",alpha=0.5)
plt.plot(t,u(t,0.75),color="blue")
plt.fill_between(t,u(t,0.75),facecolor="blue",alpha=0.5)

plt.savefig("fill_between.png")

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions