Page 133 - Computer Genius Class 06
P. 133
Line Graph in AI Connect
Shoes purchased by Aman
Here, data of the given table is used to draw a line chart.
Year Pairs of shoes
To draw a line chart in AI Connect, create a project, in it create
2007 3
Basic Coding activity. Then, follow the given steps:
2010 6
Step 1 Go to the Variables category and click on the Create
variable... block. Create two variables named x and y. 2013 7
Step 2 Drag set...to block from Variables category. Click on the
2016 1
arrow in it, to select x. Attach create list of block from
List category inside set...to block. 2019 3
Step 3 Click on “+” in the create list of block and add the number value in the available spaces.
Repeat the step 2 and 3 for the values of variable y.
(In this graph plot, values for year is displayed on the x-axis and pair of shoes on the y-axis.
Step 4 Attach make plot’s title block and type the title of the graph inside the block.
Step 5 Attach make plot’s x-axis label block and make plot’s y-axis label block. Type the x-axis
and y-axis title in the respective blocks.
Step 6 Attach Plot Xs vs Ys Block from Matplot sub-category and add the variables x and y in their
respective axis name.
Step 7 Attach show plot canvas block in the end to show the graph on the stage area. Then click
on Run button.
Information Literacy
Quest
Match the following:
1. set...to block a. List category
2. create list of block b. Matplot sub-category
3. Bar Chart block c. Variable category
4. Plot Xs vs Ys block d. Pygal sub-category
Plotting Graphs 131

