简体   繁体   中英

How to plot Japanese string-based data in Python

I have a csv like this:

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.)

Note: Y-axis is the word counts. It doesn't have to be a dot, x, square and some random shapes, just dots/x with different colors will be fine.

I want to use ggplot instead of matplotlib if possible.

You're probably looking for a form of scatter plot . The first example on the ggplot project page shows an how to configure one.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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