【问题标题】:How can I visualize this data into Python? [closed]如何将这些数据可视化为 Python? [关闭]
【发布时间】:2017-07-16 10:39:20
【问题描述】:

所以我想在 Python 中将这些数据可视化为以下类型的图。

[('boy', 0.9998371601104736), ('the', 0.9998303651809692), ('s', 0.9998290538787842), ('now', 0.9998087286949158), ('fish', 0.999808669090271), ('up', 0.9998086094856262), ('out', 0.9998055696487427), ('then', 0.9998049736022949), ('him', 0.9998048543930054), ('across', 0.9998047351837158), ('sea', 0.9998030662536621), ('he', 0.999802827835083), ('was', 0.9997997283935547), ('over', 0.9997989535331726), ('head', 0.999798595905304), ('had', 0.999798059463501), ('shark', 0.9997979998588562), ('into', 0.9997978806495667), ('with', 0.9997947216033936), ('man', 0.9997928142547607), ('on', 0.9997923374176025), ('great', 0.9997917413711548), ('water', 0.9997894763946533), ('come', 0.9997884631156921), ('skiff', 0.9997872114181519), ('and', 0.9997856616973877), ('no', 0.9997855424880981), ('when', 0.9997851848602295), ('to', 0.9997830390930176), ('an', 0.9997830390930176)]

【问题讨论】:

  • 你尝试了什么?有什么错误吗?
  • 这里的问题到底是什么?
  • @Grimmy 我是 python 新手。由于 HTML 有 Canvas 和 Plotting 库,如 plot.ly。我想看看Python有没有这样的?我想实现我在上面的问题中分享的结果。我的数据采用格式化代码。
  • @Frederik.L 我试过 Python Matlibplot 但不知道如何使用它。我没有尝试过,因为我不知道从哪里开始绘图
  • 您可以先查看matplotlib gallery,看看是否有与您想要的内容相近的示例。然后,您将必须了解它是如何实现的,以便根据您的目的进行调整。会有一个学习曲线。

标签: python plot graph data-science


【解决方案1】:

您可以使用MatplotlibBasic Plotting with Pylab 来了解一般的可视化技术。

如果您是通过机器学习技术(如 LDA、主题建模)推导出这些,则可以使用 GensimpyLDAvis

您还应该研究此博客Python data visualization: Comparing 7 tools,以了解使用 Python 进行数据可视化的各种可能性。

【讨论】:

  • 让我看看。谢谢@coder1532
  • @NeelKadia 请接受答案。
猜你喜欢
  • 2020-10-16
  • 2017-07-14
  • 2011-02-10
  • 2014-10-09
  • 1970-01-01
  • 1970-01-01
  • 2021-12-19
  • 1970-01-01
  • 2021-03-26
相关资源
最近更新 更多