gr hist2d fix; closes #253
This commit is contained in:
parent
34a7f8a99c
commit
314053af54
@ -929,8 +929,9 @@ function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
|
|||||||
xbins = ybins = d[:bins]
|
xbins = ybins = d[:bins]
|
||||||
end
|
end
|
||||||
x, y, H = Base.hist2d(E, xbins, ybins)
|
x, y, H = Base.hist2d(E, xbins, ybins)
|
||||||
counts = round(Int32, 1000 + 255 * H / maximum(H))
|
maxh = maximum(H)
|
||||||
n, m = size(counts)
|
n, m = size(H)
|
||||||
|
counts = Int32[round(Int32, 1000 + 255 * H[n-i+1,j] / maxh) for i=1:n,j=1:m]
|
||||||
GR.cellarray(xmin, xmax, ymin, ymax, n, m, counts)
|
GR.cellarray(xmin, xmax, ymin, ymax, n, m, counts)
|
||||||
|
|
||||||
# NOTE: set viewport to the colorbar area, get character height, draw it, then reset viewport
|
# NOTE: set viewport to the colorbar area, get character height, draw it, then reset viewport
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user