简体   繁体   English

如何在Python中绘制基于日语字符串的数据

[英]How to plot Japanese string-based data in Python

I have a csv like this: 我有这样的csv:

Date, i, eat, chicken, you, fish, banana
2014-9-14, 1, 2, 1, 1, 1, 0
2014-10-15, 1, 1, 1, 0, 0, 0
2014-11-13, 0, 1, 0, 1, 0, 1

Forget about upper/lowercase and stemming because I will be morphological analyzing Japanese texts. 忘记大写/小写和词干,因为我将对日语文本进行形态分析。

Ultimate Goal: 最终目标:

http://imgur.com/uyTRQXR (I do not have enough reputation to post images.) http://imgur.com/uyTRQXR (我没有足够的声誉来发布图像。)

Note: Y-axis is the word counts. 注意: Y轴是字数统计。 It doesn't have to be a dot, x, square and some random shapes, just dots/x with different colors will be fine. 它不必是点,x,正方形和某些随机形状,只需使用不同颜色的点/ x即可。

I want to use ggplot instead of matplotlib if possible. 如果可能,我想使用ggplot而不是matplotlib。

You're probably looking for a form of scatter plot . 您可能正在寻找一种散点图 The first example on the ggplot project page shows an how to configure one. ggplot项目页面上的第一个示例显示了如何进行配置。

The data should already be in the form which you need for the plot. 数据应该已经是绘图所需的形式。 In your case, you probably should omit the stat_smooth() since the words aren't really correlated. 在您的情况下,您可能应该省略stat_smooth()因为这些单词之间并没有真正的关联。

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

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