I wish to resize the Population label seen in the legend, I want the circle to be smaller than it is right now. How do I do that ?
There are many ways to do this, but the easiest is to set the desired size in the legend. That size will be a manual setting.
plt.legend(markerscale=0.5)
Related
I am using Python and Matlotlib to draw some plots but unfortunately the plot title text is cut off by the window size. even the plt.tight_layout() can't fix the problem. The text is shown correctly by manually increasing the window width.
here' s a picture with the plot problem enter image description here
Any suggestions to have the code to fix it automatically without manually resizing window width?
Any help is appreciated,
Thanks!
plot title text is shown cut off. it seems that the windows width is not set automatically to include all the text.
I'd like to customize a data-defined size legend in QGIS separately from the plotted points in my map for increased legibility, setting the legend fill color to transparent and outline color to black.
I assume that this might be possible to do in the "Legend symbol" option in the print layout, but I cannot access it (see picture) and I'm not quite sure why. The only customization available is for the line connecting circle size and value.
A workaround might be to create a new style in a separate layer, but is there a more direct way to do this in QGIS?
The version I'm using is 3.20.3.
Image: Data-defined size legend customization box
I have a shiny app which displays a geom_bar chart and some text that is displayed in a geom_text subplot. Like so:
All well and good when the screensize is large. But when the screensize is small then the font gets out of hand:
Obviously the geom_bar width has no trouble scaling down to fit in the smaller screen real estate. The text, however, needs some extra help.
I would like to know if there is a way to determine the barwidth in a dynamic plot. If I could find out what the bar width was, then I could scale the font accordingly.
Does anyone know?
I simply want my legend which is now in the form of the left bar in the following image, to be shown in the form of the bar in the right side. I couldn't find anything related for arcGIS. those anyone know?
Thank you so much for your help.
Unfortunately I don't think there is an elegant way to do this, only a work-around:
In Layout View, convert the legend to graphics. (Make sure your data and legend are in their final product state as your legend will no longer be dynamically linked to your data).
Right-click on the legend and ungroup the elements in the legend. Repeat as many times as necessary in order to be able to select an individual rectangle.
Manually convert the two rectangles into triangles. One way to do this would be to activate the "Draw" toolbar and draw white polygons over parts of each rectangle.
Once finished, regroup everything.
Again, not the prettiest solution but I don't believe ArcMap has this functionality.
Good luck!
Tom
The margins of my plots are unfortunatly too small for the Text i want to set there, 45* rotated:
How can i prevent the Labels for the datapoints from overlapping into the title? Would be best if it were computed, so i don"t have to manually adjust it.
How can i remove all the whitespace around the graphs?
If you have an up to date matplotlib version, you can try using Tight Layout. Otherwise you will have to do it by hand with subplots_adjust.