We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have this request for Flint https://gitlab.esrf.fr/bliss/bliss/-/issues/3398
I could use a scatter but the rendering will probably not be very good.
Any idea if we could imagine such item in silx?
In the meantime i will probably try to create an item to see what i could do with the existing tools.
The text was updated successfully, but these errors were encountered:
For the record, here is the implementation i will use.
from silx.gui.plot.items.scatter import Scatter class ImageWithNormalization(Scatter): def __init__(self): Scatter.__init__(self) self.setVisualization(self.Visualization.IRREGULAR_GRID) def setData(self, image, xAxis, yAxis, copy=True): x = numpy.asarray(xAxis) y = numpy.asarray(yAxis) value = numpy.asarray(image) assert x.ndim == 1 assert y.ndim == 1 assert value.ndim == 2 assert (y.shape[0], x.shape[0]) == value.shape ax = numpy.broadcast_to(x, value.shape) ay = numpy.broadcast_to(y.reshape(-1, 1), value.shape) Scatter.setData(self, ax.flatten(), ay.flatten(), value.flatten()) self.setVisualizationParameter( self.VisualizationParameter.GRID_SHAPE, image.shape, ) self.setVisualizationParameter( self.VisualizationParameter.GRID_BOUNDS, ((x[0], y[0]), (x[-1], y[-1])), ) self.setVisualizationParameter( self.VisualizationParameter.GRID_MAJOR_ORDER, "row" )
image = numpy.array([[1, 2, 3, 4], [3, 4, 5, 6]]) xAxis = numpy.array([1, 2.5, 3, 3.5]) yAxis = numpy.array([3, 4]) item = ImageWithNormalization(image, xAxis, yAxis)
Sorry, something went wrong.
Related to #4153
No branches or pull requests
I have this request for Flint https://gitlab.esrf.fr/bliss/bliss/-/issues/3398
I could use a scatter but the rendering will probably not be very good.
Any idea if we could imagine such item in silx?
In the meantime i will probably try to create an item to see what i could do with the existing tools.
The text was updated successfully, but these errors were encountered: