2017-11-17 1 views
2

저는 bokeh를 처음 사용했습니다. 질문은 매우 간단하지만 답변을 찾지 못했습니다. bokeh 라이브러리에서 matplolib imshow의 vmax 및 vmax는 무엇입니까? 내가동등한 vmin vmax matplotlib bokeh

im = ax.imshow(image_data, vmin = 0.1, vmax = 0.8, origin = 'lower') 

그러나이 값 VMIN과 VMAX를 사용하여 내가 보케를 사용하는 경우 내가 다른 결과를 얻을 Matplolib에 예를 들어 , 나뭇잎 결과 대

p1 = figure(title="my_title",x_range=[min_x,image_data.shape[0]],y_range=[min_y, image_data.shape[1]], toolbar_location=None)

p1.image(image=[image_data], x=[min_x],y=[min_y],dw=[image_data.shape[0]],dh=[image_data.shape[1]], palette="Spectral11") 
color_bar = ColorBar(color_mapper=color_mapper, ticker=LogTicker(), 
          label_standoff=12, border_line_color=None, location=(0,0)) 

imshow enter image description here

무엇이 오류입니까? 이 코드 그것을 작업으로 사전

답변

0

감사 :

color_mapper = LogColorMapper(palette="Viridis256", low=0.1, high=0.8) 

    plot = figure(x_range=(0,image_data.shape[0]), y_range=(0,image_data.shape[1]), toolbar_location=None) 
    plot.image(image=[image], color_mapper=color_mapper, 
       dh=[image_data.shape[0]], dw=[image_data.shape[1]], x=[0], y=[0]) 

    color_bar = ColorBar(color_mapper=color_mapper, ticker=LogTicker(), 
         label_standoff=12, border_line_color=None, location=(0,0)) 
관련 문제