Add histogram exploration

Issue #15 resolved
Agustin Lobo created an issue

I suggest adding another interactive plot, actually the simplest: histogram. Selecting intervals in the histogram would highlight involved pixels in the image. Best (but not blocking) if interactive stretching were also provided.

In fact, this tool would be the 1-dimensional version of the scatterplot.

Comments (5)

  1. Andreas Janz repo owner

    Ah, that’s funny. Me and a colleague talked about a possible 1d histogram plot type last week 😀

    We’ll implement this.

  2. Andreas Janz repo owner

    Done - depending on the renderer, you get different colors in the plot.

  3. Agustin Lobo reporter

    I miss the same kind of interactive exploration as with the scatterplot: being able to select one or several ranges in the histogram

    and get those values highlighted in the image. And the reverse (which I understand is harder), draw polygons in the image and get

    the corresponding bars highlighted in the histogram. Also, as I suggested for the scatterplot

    (https://bitbucket.org/janzandr/rasterdataplotting/issues/17/display-x-y-values)

    browse the histogram to get the actual image value and its corresponding frequency.

  4. Agustin Lobo reporter

    Also:

    1. There is no y-axis
    2. For an RGB image, I see only one histogram (unlike your example).
    3. In the case of images with many bands, it would be better to select those to be displayed.
    4. And I just observe an error message:“File "C:/Users/1/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\rasterdataplotting\rasterdataplotting\gui\rdphistogramplotwidget.py", line 422, in onMapCanvasExtentChanged
      self.plotData()
      File "C:/Users/1/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\rasterdataplotting\rasterdataplotting\gui\rdphistogramplotwidget.py", line 357, in plotData
      select, color = binSelections[i]
      IndexError: list index out of rang”

  5. Log in to comment