enthought / chaco

Chaco is a Python package for building interactive and custom 2-D plots.
http://docs.enthought.com/chaco/
Other
291 stars 101 forks source link

ValueError: 2D bounds of an image plot needs to have the same shape as the underlying data, because they are assumed to be generated from meshgrids. when running chaco/examples/tutorials/scipy2008/traits_image.py #867

Closed homosapien-lcy closed 1 year ago

homosapien-lcy commented 1 year ago

Problem Description ValueError: 2D bounds of an image plot needs to have the same shape as the underlying data, because they are assumed to be generated from meshgrids. when running chaco/examples/tutorials/scipy2008/traits_image

Reproduction Steps:

python chaco/examples/tutorials/scipy2008/traits_image.py

Expected behavior: pass test

OS, Python version: [MacOS, python3.11 or python3.8 (with or without EDM)]

homosapien-lcy commented 1 year ago

The error happens in line 898, the upper stream set cell_plot=True, cause num_ticks = array_data.shape[axis] + 1 which is one off from bounds.shape[axis]

homosapien-lcy commented 1 year ago

This seemed to be caused by traits_image specifying xbound to be of size 50 upstream which is in conflict with the num_ticks