Hi,
As part of a small project of mine, I want to replicate a figure in a paper using Makie
(this paper and these figures). The idea of allotaxonometry plots is that you compare two systems that are zipf distributed (in the linked figures, twitter at time t and t+1) to see the relative use of, say, terms. The key challenge is to work on a rotated scene, which I found was not too difficult using Makie
(once you understand quaternions; see below for my current attempt). To do this, I simply create a heatmap and draw a background, which I then rotate using rotate!()
, e.g
f = Figure()
ax = Axis(f[1,1])
# custom function to distinguish between the 2 systems
draw_background2!(counts_rank)
heatmap!(counts_rank, colormap = Reverse(cgrad(:magma)))
q = qrotation(SVector(1, -0.415, 0), deg2rad(180))
rotate!(f.scene.children[1], q
# find the new relevant limits
limits!(-54, 54, -108, 0)
display(f)
Now, the tricky part is that I want to (i) annotate squares far away from the axis, which represent terms that have changed the most during that time period (text annotation are now messy to work with, due to the rotation), and (ii) rotate the axis so that I can properly label them (again, see linked figures to see what I mean). Any help of how to best achieve these goals would be greatly appreciated! I think this type of plot could be a great addition to the Makie
gallery.