我终于开始尝试Chaco,所以这个问题可能很天真.目前我正在尝试绘制一个非常大的8位(又名灰度又名单通道)类型的图像numpy.uint8.似乎无论我做什么,图像都是彩色的.这是我的代码基于Chaco附带的image_plot.py示例:
#!/usr/bin/env python
"""
Draws an simple RGB image
- Left-drag pans the plot.
- Mousewheel up and down zooms the plot in and out.
- Pressing "z" brings up the Zoom Box, and you can click-drag a rectangular
region to zoom. If you use a sequence of zoom boxes, pressing alt-left-arrow
and alt-right-arrow moves you forwards and backwards through the "zoom
history".
"""
# Major library imports
from numpy import zeros, uint8
# Enthought library imports
from …Run Code Online (Sandbox Code Playgroud)