The Witchcraft Act went into effect in Scotland in the year 1563. Accused witches were persecuted before then, but that's when witch-hunting became an official government-sanctioned activity. The act stayed around for 172 years, but was finally overwritten by another Witchcraft Act in 1735 that made it illegal to accuse someone of witchcraft in all of Britain. In between those dates, there were 3,212 documented cases of accused witchcraft. They weren't documented thoroughly; we know of the sentences handed down in only about 10% of the cases. As in other countries, people were accused of witchcraft for reasons ranging from fear to deflection to performative piety to revenge to a convenient way to get rid of someone you didn't like.
Students in a Data and Visualisation internship at the University of Edinburgh sifted through the Survey of Scottish Witchcraft database to create an interactive map of Scottish witchcraft cases during the period of government-sanctioned witch hunting. There are 3141 cases plotted on the map here. Zoom in to see separate cases (they are clustered in cities), and click on a witch icon to bring up information on the case. Use the menu at the top to change the map to show different visualizations for those cases. And be sure to read the details a few of the more notorious Scottish witchcraft trials at Atlas Obscura.