简体   繁体   English

在 matplotlib 散点 plot 添加过滤

[英]Add Filtering in matplotlib scatter plot

I'm using matplotlib scatter plot for tSNE visualization and I want to filter my results by class. For example this one plot and I want to have an option to see only label 15000 samples: enter image description here我正在使用 matplotlib 散点图 plot 进行 tSNE 可视化,我想通过 class 过滤我的结果。例如这个 plot 我希望有一个选项可以只看到 label 15000 个样本:在此处输入图像描述

Is it an option?这是一个选择吗? Can you please lead my way?你能带路吗? Thanks谢谢

I think the answer here is not necessarily in matplotlib, but in the dataframe you choose to plot. After you complete your tSNE analysis, you can choose the subset of that resulting dataframe that only includes the class you're interested in. If you can provide a sample of that dataframe I'd be more than happy to provide some code as well.我认为这里的答案不一定是 matplotlib,但在 dataframe 中你选择 plot。完成 tSNE 分析后,你可以选择结果 dataframe 的子集,它只包括你感兴趣的 class。如果你可以提供 dataframe 的样本 我也很乐意提供一些代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM