Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fill_between interpolation & nan issue #11781

Closed
@Phlya

Description

@Phlya

The issue was discovered here
deeptools/pyGenomeTracks#37

Basically, when fill_between encounters a NaN in the y values, when interpolate=True it produces a strange output.

This is without interpolation:

importmatplotlib.pyplotaspltimportnumpyasnpx=np.arange(107).astype(float)y=np.append(np.zeros((100))+0.01, [0.5,0.75,1,np.nan,1,0.75,0.5])plt.figure(figsize=(20,5))plt.fill_between(x,y,interpolate=False)

image

If I turn interpolation on (which I wouldn't expect to do anything in this case, since there are not zero crossings), this is what I get:

plt.figure(figsize=(20,5))plt.fill_between(x,y,interpolate=True)

image

Even if I am misunderstanding something about how interpolation is supposed to work, clearly this is not what it should do...

mpl 2.1.2, python 3.5.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp