This article accompanies the fable
Two decades earlier, in 1567, Mary's (second) husband, Henry Stuart, Lord Darnley, was murdered in the orchard, a 10-minute walk from Holyrood Castle in Edinburgh, possibly from an explosion, possibly from poison, or possibly from strangulation when the other methods failed. He had been staying the night in Kirk o' Field house which was destroyed by the explosion, but the partially clothed bodies of Darnley and his servant were found nearby, outside the city walls, apparently strangled but otherwise unharmed by the explosion. Wikipedia description here. Nowadays the Old College, Edinburgh University, sits on the presumed spot. Excavations have not produced much to satisfy history buffs.
Anyway, Darnley's son with Mary, who would go on to become King James I of England, was just a baby at the time, but he was assigned the Hamlet role of avenger in the legend that quickly developed among the English.
In the painting below, commissioned by the English later that same year, Darnley's parents are praying for vengeance and the young James is saying: "Arise O Lord, and avenge the innocent blood of the king my father and, I beseech you, defend me with your right hand."
In keeping with this legend, that means his mother Mary, Queen of Scots becomes Gertrude and the Earl of Bothwell becomes Claudius. The very idea that there might be historical influences like these drives traditional Shakespeare fans up the wall, but that is, after all, partly the point of storytelling. The painting is titled Memorial to Darnley, by Lieven de Vogeleer (Livinus de Vogelaare) of Antwerp and it is in the Royal Collection.
There is also the tantalizing idea that Bothwell (who became Mary's third husband) fled into exile to Norway, then ruled by Denmark, and it is a story that includes a certain Erik Rosenkrantz of all people. Bothwell died 10 years later imprisoned in Dragsholm Castle in Denmark. The castle, shown below, is now home to several ghosts, one of them being Bothwell himself.