Search code examples
juliawinstonpolar-coordinates

How to create a polar heatmap in Julia using Winston


Trying to graph a heatmap in Julia using Winston. The following code does what I need:

using Winston
colormap("jet") #could be any other cmap
p = imagesc(B)

Here, B is a 2-dimensional array containing my values. However, axes for B are polar (r, $\theta$), while Winston treats them as rectangular (x, y). What can I do?


Solution

  • The Plots.jl package has a :polar attribute modifier to plotting functions but Winston does not. You probably should do the transformation to rectangular coordinates on the data yourself via an algebraic function for that purpose if you want to use Winston.