My current workplace is a python shop though, so I am figuring it out all over for some of these things in python. You can download the notebook on GitHub to get the full code.Many of my programming tips, like my notes for making Leaflet maps in R or margins plots in Stata, I’ve just accumulated doing projects over the years. That’s it, our Seaborn scatterplot is ready. We also move our legend with set_bbox_to_anchor and set the font size of legend labels with get_texts(). To get rid of them, we delete the text on lines #0 and #8 where our titles are located. In our example, Seaborn would create a legend with two legend titles - “Type” and “Total”. Pad=20 would create padding under the title, and plt.subplots_adjust would make sure our title and subtitle fit in the figure. aspect: height/width of the scatterplotīy changing font_scale=1.3, you can decrease or increase the font size within the plot:.height: height of the scatterplot (not the figure).palette: color theme (you can read about colormaps in the documentation).alpha: transparency of colors (0 = transparent, 1 = not transparent).data: data frame where the data is stored (df).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |