टेक्स्ट से संप्रेषण

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...