Can't plot a raster from map canvas or whole raster

Issue #4 resolved
Ryan Avery created an issue

When I try to plot using the map canvas nothing appears. When I try Whole Raster, this error happens

An error has occurred while executing Python code:

AssertionError

Traceback (most recent call last):
  File "/home/rave/.local/share/QGIS/QGIS3/profiles/default/python/plugins/rasterdataplotting/rasterdataplotting/gui/rdpscatterplotwidget.py", line 171, in onMapCanvasRenderComplete
    self.readData()
  File "/home/rave/.local/share/QGIS/QGIS3/profiles/default/python/plugins/rasterdataplotting/rasterdataplotting/gui/rdpscatterplotwidget.py", line 208, in readData
    self.dataReaderRoi.read()
  File "/home/rave/.local/share/QGIS/QGIS3/profiles/default/python/plugins/rasterdataplotting/rasterdataplotting/gui/rdpscatterplotwidget.py", line 1136, in read
    self._readWholeRaster()
  File "/home/rave/.local/share/QGIS/QGIS3/profiles/default/python/plugins/rasterdataplotting/rasterdataplotting/gui/rdpscatterplotwidget.py", line 1153, in _readWholeRaster
    assert isinstance(referenceLayer, QgsRasterLayer)
AssertionError

Python version: 3.6.9 (default, Nov  7 2019, 10:44:02) [GCC 8.3.0]
QGIS version: 3.10.2-A Coruña A Coruña, 616ad4531b

Python Path:

  • /home/rave/.local/share/QGIS/QGIS3/profiles/default/python/plugins/planet_explorer/extlibs
  • /usr/share/qgis/python
  • /home/rave/.local/share/QGIS/QGIS3/profiles/default/python
  • /home/rave/.local/share/QGIS/QGIS3/profiles/default/python/plugins
  • /usr/share/qgis/python/plugins
  • /usr/lib/python36.zip
  • /usr/lib/python3.6
  • /usr/lib/python3.6/lib-dynload
  • /usr/local/lib/python3.6/dist-packages
  • /usr/lib/python3/dist-packages
  • /home/rave/.local/share/QGIS/QGIS3/profiles/default/python
  • /home/rave/sprnca_gedi
  • .

My map canvas looks like this. I have a regular raster I loaded from a geotiff, not sure what is happening when it says there is not an instance of a QgsRasterLayer. Any tips appreciated and thanks for making this tool, looks cool!

Comments (2)

  1. Andreas Janz repo owner

    For the scatter plot you have to select two raster bands inside the Raster Data Plotting Dock Widget (i.e. X Axis and Y Axis).

  2. Log in to comment