2017-10-01 11 views

답변

1

코드를 제공하지 않았습니다. 항상에 도움을 요청할 때 샘플 코드를 제공해야합니다. 그러므로 이전 버전을 사용하고 있는지 여부를 알 수는 없습니다. bokeh.charts.Histogram. 이 경우 먼저 우선 먼저 을 사용 중지하십시오.. 이전 bokeh.charts API는이 시점에서 완전히 유지 관리되지 않습니다. 그것은 막 다른 길이다.

어느 쪽이든, 안정적인 광고 지원 bokeh.plotting API를 사용하여 Bokeh에 히스토그램을 만들 수 있습니다.이 경우 스타일은 모든 글리프에 대해 동일한 일반적인 방식으로 수행됩니다. as described in the User's Guide documentation. 당신이 "히스토그램 플롯"유형 기능 내장, 체크 아웃으로 매우 높은 수준의 API를 찾고 있다면, 또는

from bokeh.io import output_file, show 
from bokeh.plotting import figure 
from bokeh.sampledata.autompg import autompg as df 

from numpy import histogram, linspace 

x = linspace(0,250,200) 

p = figure(plot_height=300) 

hist, edges = histogram(df.hp, density=True, bins=20) 
p.quad(top=hist, bottom=0, left=edges[:-1], right=edges[1:], alpha=0.4, 

     # same technique and properties for every Bokeh Glyph 
     line_color="red", line_width=2) 

output_file("hist.html") 

show(p) 

enter image description here


: 여기

는 완벽한 예입니다 Out HoloViews : http://holoviews.org/ Bokeh 위에 구축 된 매우 높은 수준의 API이며 팀원들이 적극적으로 관리합니다.