Changing size
The estate agents have fed back that the subplots are quite large! They have asked you to make the next round of visualizations, displaying the relationship between the year a property was built with a) distance from the CBD and b) property size, a bit smaller.
You will manually specify the size of two subplots in row format.
Este exercício faz parte do curso
Interactive Data Visualization with Bokeh
Instruções do exercício
- Set
heightto 300 pixels andwidthto 400 pixels for bothdistance_vs_yearandbuilding_size_vs_year. - Add circle glyphs to
distance_vs_year, withxbeing theyear_builtandyrepresentingdistancefrom CBD. - Repeat for
building_size_vs_yearwith the same x-axis, but settingytobuilding_area. - Finish the
show()call to display the subplots in arowlayout.
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Set up figures
distance_vs_year = figure(x_axis_label="Year Built", y_axis_label="Distance from CBD (km)", height=____, width=____)
building_size_vs_year = figure(x_axis_label="Year Built", y_axis_label="Building Size (Meters Squared)", height=____, width=____)
# Add circle glyphs to distance_vs_year
distance_vs_year.circle(x="____", y="____", source=____)
# Add circle glyphs to building_size_vs_year
building_size_vs_year.circle(x="____", y="____", source=____)
# Generate HTML file and display plot
output_file(filename="custom_size_plot")
show(____(____, ____))