2

I just made some experiments with Matplotlib and what i noticed is that all that is generated using matplotlib appear in a new window that doesn't seem to be tightly linked to qgis. The only "link" i see is a save button enabling plot export as raster images.

My aim would be to stack(/merge) graphics/plots or (georeferenced) shapes generated with matplotlib with layers in a qgis composer.

Is there a way to do that ? (i mean a tighter/quicker way than adding image objects in the composer).

Would it be a way to share a common "coordinate system" between map objects and rasters generated by Matplotlib ?

If possible could someone point me in the right direction ?

  • Three Things come to my mind. Try to use matplotlib with Qt/pyqt. So window control is on qt. Second try to get the picture before the window is drawn, third look at those ide's which draw matplotlib into their on window. – Andreas Müller Apr 2 '18 at 9:36
  • @AndreasMüller sorry to come back to your comment now but what are those ide your are referring to ? – snaileater Apr 3 at 18:46
  • I thought of python notebooks (jupiter notebooks) but now i don't think that will be helpfull, but to see how the matplot figure is drawn without creating an own window. Recently i played with layer diagrams and hoped to see more types of diagrams. Unfortunately without success, but if python could use that "interface" to draw "something" onto the map, that would be a fine feature. Of course, you can study qgis's source code, but it is C++ – Andreas Müller Apr 4 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.