Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug]: imshow() truncates large arrays #25561

Closed
@rcasperson

Description

@rcasperson

Bug summary

2D arrays with more than about 8.000.000 columns are truncated on the right side.

Code for reproduction

import numpy as np
from matplotlib import pyplot

for length in range(6000000,10000000,500000):
    s = .5 * np.sin(np.linspace(0,6*np.pi,length))
    pyplot.plot(s)
    pyplot.imshow(s.reshape((1,len(s))),aspect='auto',cmap='seismic')
    pyplot.show()

Actual outcome

image

Image truncated on the right if length > 8000000.

Expected outcome

image

Expected same outcome independent of length.

Additional information

No response

Operating system

Windows 10

Matplotlib Version

3.1.0

Matplotlib Backend

module://ipykernel.pylab.backend_inline

Python version

3.7.3

Jupyter version

No response

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions