Merge pull request #2788 from jheinen/master
gr: fix polar heatmap problem
This commit is contained in:
commit
a20b275eaf
@ -1734,10 +1734,11 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
|||||||
if series[:y][end] != ny
|
if series[:y][end] != ny
|
||||||
@warn "Right now only the maximum value of y (r) is taken into account."
|
@warn "Right now only the maximum value of y (r) is taken into account."
|
||||||
end
|
end
|
||||||
colors = get(fillgrad, z, clims)
|
# colors = get(fillgrad, z, clims)
|
||||||
z_normalized = map(c -> c == invisible() ? 256/255 : PlotUtils.getinverse(fillgrad.colors, c), colors)
|
|
||||||
rgba = Int32[round(Int32, 1000 + _i * 255) for _i in z_normalized]
|
|
||||||
# GR.polarcellarray(0, 0, phimin, phimax, ymin, ymax, nx, ny, colors)
|
# GR.polarcellarray(0, 0, phimin, phimax, ymin, ymax, nx, ny, colors)
|
||||||
|
z_normalized = get_z_normalized.(z, zmin, zmax)
|
||||||
|
# z_normalized = map(c -> c == invisible() ? 256/255 : PlotUtils.getinverse(fillgrad.colors, c), colors)
|
||||||
|
rgba = Int32[round(Int32, 1000 + _i * 255) for _i in z_normalized]
|
||||||
GR.polarcellarray(0, 0, phimin, phimax, 0, ymax, nx, ny, rgba)
|
GR.polarcellarray(0, 0, phimin, phimax, 0, ymax, nx, ny, rgba)
|
||||||
# Right now only the maximum value of y (r) is taken into account.
|
# Right now only the maximum value of y (r) is taken into account.
|
||||||
# This is certainly not perfect but nonuniform polar array is not yet supported in GR.jl
|
# This is certainly not perfect but nonuniform polar array is not yet supported in GR.jl
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user