Assignment09-Instructions.pdf

Assignment09-Instructions.pdf

CIS 3306-110 – Data Visualization © Spring 2022 Homework Assignment #09

Texas A&M University – Central Texas Computer Information Systems Department

Page 1

Drawing Multiple Polygons using Python’s Bokeh Library

After going through week 12’s lesson contents, write the code that will visualize the following three polygons (by the given coordinates) by using Python’s Bokeh library.

Note: The coordinates are sorted based on their X, and then Y. You should use the appropriate sequence of the coordinates according to the Week 12 lesson contents for the correct results.

Polygon 1

Coordinates: (1, 4), (1, 5), (2.5, 4), and (2.5, 5). Color: orange.

This polygon has two holes that have the following coordinates:

Hole 1: (1.2, 4.2), (1.2, 4.6), (1.8, 4.2), and (1.8, 4.6)

Hole 2: (1.8, 4.8), (2.3, 4.4), (2.3, 4.8)

Polygon 2

Coordinates: (1, 1), (1, 2), (2, 1), and (2, 2). Color: green.

This polygon has one holes that has the following coordinates:

Hole 1: (1.2, 1.2), (1.2, 1.8), and (1.8, 1.8)

Polygon 3

Coordinates: (3, 1), (3, 3), (5, 1), and (5, 3). Color: red.

Hole 1: (3.4, 1.8), (3.4, 2.2), (3.8, 1.4), (3.8, 2.6), (4.2, 1.4), (4.2, 2.6), (4.6, 1.8), (4.6, 2.2) The height and width of the figure must be 600 x 600 pixels and your visualization should

look like the one on the next page.

Submit your complete executable Python code.

You will be graded based on the output of your code.

CIS 3306-110 – Data Visualization © Spring 2022 Homework Assignment #09

Texas A&M University – Central Texas Computer Information Systems Department

Page 2

Expected output: