Make sure you have Custom Scatter Plot Starter File open on your computer. Save a copy, and click "Run" to see the scatter-plot.
1 Comment-out the scatter-plot
expression on line 53 by putting a #
at the start of line. This will "turn off" the expression, by telling Pyret to ignore that line.
2 What is species-tag
?
3 Click "Run". What happens when you evaluate species-tag(cat-row)
?
4 What do you expect the image-scatter-plot
expression on line 54 to produce?
5 Un-comment line 54 to "turn on" that code, then click "Run". What image appears?
6 What can you learn from this new display that you could not learn from the original image?
7 What ideas do you have for how else we could draw the dots in a scatter plot of the animals, so that it would be even more useful?
8 Find the other two "Helper Functions" in the file (legs-tag
and age-tag
). How are their definitions similar to species-tag
?
9 How are their definitions different from species-tag
?
10 Make a custom scatter plot using legs-tag
. Then make another using age-tag
. What is most interesting to you about the plots you just made?
11 Suppose we wanted to make a custom scatter plot where each point is labeled with the name of the animal. What would we need to define, to use in our custom scatter plot expression?
12 Make the new custom scatter plot described above. Write the definition of your helper function, and the custom scatter plot expression here:
These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, and 1738598). Bootstrap by the Bootstrap Community is licensed under a Creative Commons 4.0 Unported License. This license does not grant permission to run training or professional development. Offering training or professional development with materials substantially derived from Bootstrap must be approved in writing by a Bootstrap Director. Permissions beyond the scope of this license, such as to run training, may be available by contacting contact@BootstrapWorld.org.