区分`colorbar`中的剪切值

时间:2015-08-18 12:17:03

标签: python matplotlib colorbar

我有一个pcolormesh图,其中通过将vminvmax严格设置在绘制的值范围内来剪裁颜色贴图。有没有办法让关联的colorbar从底部和顶部分离一块,以表示相关的颜色超出了颜色图的范围?

1 个答案:

答案 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

enter image description here