Timeline for How can I adjust the legend when visualizing clusters in two dimensions?
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 16, 2020 at 11:08 | history | edited | CommunityBot |
Commonmark migration
|
|
Aug 2, 2019 at 13:55 | comment | added | Cecilia | Hey just wondering if you come up with any idea? I tried to solve it but still have no idea... | |
Aug 2, 2019 at 8:59 | comment | added | Dan Scally | @Cecilia oh yeah, that is weird. Not sure I'm afraid. I'll take a look at lunchtime | |
Aug 2, 2019 at 8:43 | comment | added | Cecilia | Thank you so much, I've solved it, but I compared the adjusted legend, the first cluster-Cluster 0 should be the one with the lightest colour, but it's the darkest one now, not sure why this happens, please see my edit. Thanks again. | |
Aug 2, 2019 at 8:36 | comment | added | Dan Scally |
@Cecilia you can use the loc parameter when calling plt.legend() to control where it goes. Passing plt.legend(legend, loc='best') will make it try to deconflict. Alternatively you can call fig = plt.figure(figsize=(36,12)) BEFORE sns.scatterplot() to change the size of the whole plot. There might also be a way to control the size of the legend itself; try the plt.legend() documentation: matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.legend.html
|
|
Aug 2, 2019 at 8:33 | history | edited | Dan Scally | CC BY-SA 4.0 |
added 188 characters in body
|
Aug 2, 2019 at 8:33 | comment | added | Cecilia | Hi thank you soooo much! But now the legend is too large and cover my data points, I tried to change 'size_norm' but nothing happened, is there a way that I can make the legend smaller or make the whole plot larger? | |
Aug 2, 2019 at 8:25 | comment | added | Dan Scally | @Cecilia that's reasonably easy too; see my edit. | |
Aug 2, 2019 at 8:25 | history | edited | Dan Scally | CC BY-SA 4.0 |
added 472 characters in body
|
Aug 2, 2019 at 8:21 | comment | added | Cecilia | Hi thanks now I get all the cluster number, but I want to custom them from '0,1,2,3...'to 'Cluster 0, Cluster 1...', and also the legend covers part of the plot, I might need to make the plot bigger, do you mind giving me some hints? Thanks again. Note that y2=[0,1,2,3...] @DanScally | |
Aug 2, 2019 at 7:58 | history | edited | Dan Scally | CC BY-SA 4.0 |
added 435 characters in body
|
Aug 2, 2019 at 7:52 | history | answered | Dan Scally | CC BY-SA 4.0 |