GRUtils.jl icon indicating copy to clipboard operation
GRUtils.jl copied to clipboard

Add Option for Accurate Pixel Level Rendering of a Matrix

Open RoyiAvital opened this issue 1 year ago • 0 comments

The use case is similar to the one described in https://discourse.julialang.org/t/101185/3 and https://github.com/heliosdrm/GRUtils.jl/issues/123#issuecomment-1625592409.

Basically, given a Matrix of size MxN generate a 1:1 plot of the image.
Namely the dimensions of the area of with the values from the matrix will be MxN pixels exactly.

The steps should be:

  1. Generate figure with size in pixels which is large enough for the required margins.
  2. Create axes / view with certain rendering size in pixels.
  3. Draw the pixels value (Mapped / Direct) on the axes where each element in the Matrix correspond to a single pixel on screen.

The above is for a Matrix but it would be great to extend to Array{T, 3} where the output will be mapped to RGB color.

RoyiAvital avatar Jul 07 '23 17:07 RoyiAvital