Update pyplot.jl
Adds a half-pixel margin to the extent for image plots so that the pixel coordinates match the grid, i.e. the center of each square pixel lies over its integral index numbers, and each square covers half a pixel before and after that.
This commit is contained in:
parent
0ca5a30b8a
commit
d0a73eb862
@ -756,7 +756,7 @@ function py_add_series(plt::Plot{PyPlotBackend}, series::Series)
|
||||
cmap = py_colormap(cgrad([:black, :white])),
|
||||
vmin = 0.0,
|
||||
vmax = 1.0,
|
||||
extent = (xmin, xmax, ymax, ymin)
|
||||
extent = (xmin-0.5, xmax+0.5, ymax+0.5, ymin-0.5)
|
||||
)
|
||||
push!(handles, handle)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user