You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering is it was possible to convert a 2d numpy array to a Pixmap with a colour gradient (similar to numpy's colorbar method) instead of a gray?
Thank you!
The text was updated successfully, but these errors were encountered:
This functionality is not available yet, and I am not 100% sure if it should be. The current scope of qimage2ndarray is to be able to convert from ndarrays to QImage and back, with a few helper functions allowing to load/save or scale grayvalues.
I believe the latter is where you're coming from – it may appear as if qimage2ndarray intends to do the mapping from arbitrary values to QImage as well. On the one hand, I could imagine that a simple interface with matplotlib for instance might make sense – if array2qimage would accept a cmap parameter for instance and then make use of a matplotlib colormap function. On the other hand, I hesitate a little, because I wonder if this would be feature creep? Would people then ask to also have non-MPL colormaps included to get rid of the dependency? Would people eventually require even more ways to influence the mapping?
I honestly value your and others' opinions. (And should have picked up the discussion earlier, sorry about the delay.)
Good afternoon,
I was wondering is it was possible to convert a 2d numpy array to a Pixmap with a colour gradient (similar to numpy's colorbar method) instead of a gray?
Thank you!
The text was updated successfully, but these errors were encountered: