So I'm a newbie, so sorry if this is an idiot question.
I'm trying to write a plugin for QGIS3 for my organisation, and I'd like to output a standalone figure (i.e. not in the QGIS window) as the final output. This way I can show rasters, line plots and vectors, in multiple subplots in a single figure and the user can save the figure directly if they want to.
I'm using Matplotlib as that's already available in pyQGIS, so I want to stick with that for logistic reasons.
My problem is that I have some nice QgsRasterLayer rasters (and QgsVectorLayer vectors too) that I'd like to display as some of the subplots but I don't know how to convert them into a form suitable display in Matplotlib. I can display them into the main QGIS window but that's not what I'm after. I need to plot them with Matplotlib.
Can anyone give me some suggestions? It's probably really obvious, but I'm just not finding the solution as my python experience is limited.