텍스트로 소통하기

Bokeh로 배우는 인터랙티브 데이터 시각화

George Boorman

Core Curriculum Manager, DataCamp

현재 플롯

제목_없는_플롯

Bokeh로 배우는 인터랙티브 데이터 시각화

제목 추가하기

fig = figure(x_axis_label='Assists per Game', y_axis_label='Points per Game',

title="Points vs. Assists by Conference")
fig.circle(x='assists', y='points', source=east, color='blue', legend_label='East') fig.circle(x='assists', y='points', source=west, color='red', legend_label='West') output_file(filename="points_vs_assists_by_conference.html") show(fig)

제목_있는_플롯

Bokeh로 배우는 인터랙티브 데이터 시각화

제목 사용자 지정

fig.title.text_font_size = "30px"

fig.title.align = "center"
output_file(filename="modified_title.html") show(fig)

제목_맞춤설정

Bokeh로 배우는 인터랙티브 데이터 시각화

범례 수정

fig.legend.title = "Conference"

fig.legend.location = "bottom_right"
show(fig)
legend.location
"top_left"
"top_right"
"bottom_left"
"bottom_right"

기울임꼴_범례_제목

Bokeh로 배우는 인터랙티브 데이터 시각화

범례 제목 글꼴 스타일

legend.title_text_font_style
"bold"
"normal"
"italic"
Bokeh로 배우는 인터랙티브 데이터 시각화

범례 제목 글꼴 스타일

fig.legend.title_text_font_style = "normal"

output_file(filename="normal_legend_title.html") show(fig)

일반_범례_제목

Bokeh로 배우는 인터랙티브 데이터 시각화

대화형 범례 표시

fig.legend.click_policy = "hide"

output_file(filename="interactive_legend.html") show(fig)

대화형_범례

Bokeh로 배우는 인터랙티브 데이터 시각화

데이터셋

print(bakery.shape)
(17486, 6)
print(bakery.columns)
Index(['transaction', 'items', 'day_time', 'day_type', 'date', 'sales'],
dtype='object')
Bokeh로 배우는 인터랙티브 데이터 시각화

연습해 봅시다!

Bokeh로 배우는 인터랙티브 데이터 시각화

Preparing Video For Download...