Skip to content

Commit

Permalink
feat: add japanize_matplotlib
Browse files Browse the repository at this point in the history
  • Loading branch information
nakamura196 committed Oct 30, 2024
1 parent 31be03d commit 9ecf37a
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 19 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ Documentation can be found hosted on this GitHub
## How to use

``` python
from mets_tools.core import METSFile

local_file = "./test.xml"
ins = METSFile(local_file)
ins.parse_mets()
Expand Down
Binary file modified index_files/figure-gfm/cell-4-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified index_files/figure-gfm/cell-5-output-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion mets_tools/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import pandas as pd
import matplotlib.pyplot as plt
import re
import japanize_matplotlib

# %% ../nbs/00_core.ipynb 4
def convert_size(size):
Expand Down Expand Up @@ -249,7 +250,7 @@ def visualize_file_events_count(self):
# プロットの準備
df.plot(kind='bar', stacked=True, figsize=(10, 6))
plt.title('Event Type Count per File')
plt.xlabel('Event Type')
plt.xlabel('Event Type ああああ')
plt.ylabel('Count')
plt.xticks(rotation=45)
plt.tight_layout()
Expand Down
5 changes: 3 additions & 2 deletions nbs/00_core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"from lxml import etree, objectify\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"import re"
"import re\n",
"import japanize_matplotlib"
]
},
{
Expand Down Expand Up @@ -285,7 +286,7 @@
" # プロットの準備\n",
" df.plot(kind='bar', stacked=True, figsize=(10, 6))\n",
" plt.title('Event Type Count per File')\n",
" plt.xlabel('Event Type')\n",
" plt.xlabel('Event Type ああああ')\n",
" plt.ylabel('Count')\n",
" plt.xticks(rotation=45)\n",
" plt.tight_layout()\n",
Expand Down
56 changes: 42 additions & 14 deletions nbs/index.ipynb

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
nbdev
lxml
pandas
matplotlib
matplotlib
japanize-matplotlib
2 changes: 1 addition & 1 deletion settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ status = 3
user = nakamura196

### Optional ###
requirements = matplotlib pandas lxml
requirements = matplotlib pandas lxml japanize-matplotlib
# dev_requirements =
# console_scripts =
# conda_user =
Expand Down

0 comments on commit 9ecf37a

Please sign in to comment.