gr: added support for polar heatmaps
This commit is contained in:
parent
bbf8b50ad6
commit
71cbaa843c
@ -1318,8 +1318,9 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
||||
dmin, dmax = GR.gr3.volume(y.v, 0)
|
||||
|
||||
elseif st == :heatmap
|
||||
xmin, xmax, ymin, ymax = xy_lims
|
||||
zmin, zmax = clims
|
||||
if !ispolar(sp)
|
||||
xmin, xmax, ymin, ymax = xy_lims
|
||||
m, n = length(x), length(y)
|
||||
xinds = sort(1:m, rev = xaxis[:flip])
|
||||
yinds = sort(1:n, rev = yaxis[:flip])
|
||||
@ -1333,6 +1334,13 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
||||
round(UInt, red(c) * 255) ), colors)
|
||||
w, h = length(x), length(y)
|
||||
GR.drawimage(xmin, xmax, ymax, ymin, w, h, rgba)
|
||||
else
|
||||
h, w = length(x), length(y)
|
||||
z = reshape(z, h, w)
|
||||
colors = Int32[round(Int32, 1000 + _i * 255) for _i in z']
|
||||
GR.setwindow(-1, 1, -1, 1)
|
||||
GR.polarcellarray(0, 0, 0, 360, 0, 1, w, h, colors)
|
||||
end
|
||||
|
||||
elseif st in (:path3d, :scatter3d)
|
||||
# draw path
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user