我有一个pcolormesh
图,其中通过将vmin
和vmax
严格设置在绘制的值范围内来剪裁颜色贴图。有没有办法让关联的colorbar
从底部和顶部分离一块,以表示相关的颜色超出了颜色图的范围?
答案 0 :(得分:4)
是的,你需要使用颜色条的public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
mRgba = inputFrame.rgba();
if(x != -1 && y != -1) { //if this is true, you've touched something
rgb = mRgba.get(x,y);
touchView.setText("Touch coordinates--> " + "x: " + String.valueOf(x)
+ " y: " + String.valueOf(y) + " \n" + "RGB values--> " + "Red: " + rgb[0]
+ " Green: " + rgb[1] + " Blue: " + rgb[2]);
x = -1;
y = -1;
}
return mRgba;
}
关键字,然后为pcolormesh对象的颜色图设置上下颜色
extend = both