8000 pcolor does not handle non-array C data · Issue #5205 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
pcolor does not handle non-array C data #5205
Closed
@tacaswell

Description

@tacaswell

reported via VisTrails/VisTrails#1132

may be a regression from 1.3 series, reported against 1.4.3, verified against master. Not sure what last version it work on was.

import matplotlib.pyplot as plt
import numpy as np

def func3(x, ):
    return (1 - x/2 + x**5 + y**3) * np.exp(-x**2 - y**2)


# make these smaller to increase the resolution
dx, dy = 0.05, 0.05

x = np.arange(-3.0, 3.0001, dx)
y = np.arange(-3.0, 3.0001, dy)
X, Y = np.meshgrid(x, y)

Z = func3(X, Y)

# fails
plt.pcolor(X, Y, list(Z))
# plt.pcolor(X, Y, Z)  # works

Metadata

Metadata

Assignees

Labels

API: consistencyDifficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0