I am working on a project in QGIS (3.28.5-Firenze) and I need to create a map, but I am having some issues with creating a proper legend.
I am working with a point layer, where the points have different colors based on the "category" attribute and different sizes depending on "tons" attribute (the sizes are created by using the following expression
coalesce(scale_exp("tons", 0, 2.3e+06, 1, 10, 0.5), 0)"))
My problem is that I cannot display the symbology for both in the print layout. I need to remove the size categories in order to show the point colors in the legend, or in order to show the sizes I had to disregard the colors and make new sizes using the symbology tab (I couldn't replicate the sizes exactly, but got close enough by using "Graduated" with Natural Breaks(Jenks)).
Is there a way I can display both the colors for the different categories and the size categories in the legend? Can I do it for just one layer or should I "cheat" and create multiple layers (maybe separate layers for each category)? And in that case how should I go about it?
Any help would be greatly appreciated!