fix nonuniform heatmap in GR
This commit is contained in:
parent
ba4f2665e0
commit
3078a44fce
@ -42,7 +42,7 @@ Measures = "0.3"
|
|||||||
NaNMath = "0.3"
|
NaNMath = "0.3"
|
||||||
PGFPlotsX = "1.2.0"
|
PGFPlotsX = "1.2.0"
|
||||||
PlotThemes = "2"
|
PlotThemes = "2"
|
||||||
PlotUtils = "0.7"
|
PlotUtils = "1"
|
||||||
RecipesBase = "1"
|
RecipesBase = "1"
|
||||||
RecipesPipeline = "0.1.3"
|
RecipesPipeline = "0.1.3"
|
||||||
Reexport = "0.2"
|
Reexport = "0.2"
|
||||||
|
|||||||
@ -1668,7 +1668,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
|||||||
@warn "GR: transparency not supported in non-uniform heatmaps. Alpha values ignored."
|
@warn "GR: transparency not supported in non-uniform heatmaps. Alpha values ignored."
|
||||||
end
|
end
|
||||||
colors = get(fillgrad, z, clims)
|
colors = get(fillgrad, z, clims)
|
||||||
z_normalized = map(c -> c == invisible() ? 256/255 : getinverse(fillgrad, c), colors)
|
z_normalized = map(c -> c == invisible() ? 256/255 : PlotUtils.getinverse(fillgrad, c), colors)
|
||||||
rgba = Int32[round(Int32, 1000 + _i * 255) for _i in z_normalized]
|
rgba = Int32[round(Int32, 1000 + _i * 255) for _i in z_normalized]
|
||||||
GR.nonuniformcellarray(x, y, w, h, rgba)
|
GR.nonuniformcellarray(x, y, w, h, rgba)
|
||||||
end
|
end
|
||||||
@ -1685,7 +1685,7 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
|||||||
@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 : getinverse(fillgrad.colors, c), colors)
|
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]
|
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)
|
||||||
GR.polarcellarray(0, 0, phimin, phimax, 0, ymax, nx, ny, rgba)
|
GR.polarcellarray(0, 0, phimin, phimax, 0, ymax, nx, ny, rgba)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user